Hi, I’m combining three models, one of them (person_model) is tracked, the other ones (hands, landmarks) are combined in a cropped operation. When I receive “results” for the first one (person_model), does include its track_id, bbox, keypoints,etc. but after that I receive results for the other one: landmarks in cropped hands, but track_id is “0”. Here you have important parts of my code:
person_model = dg.load_model(
model_name=f"yolov8n_relu6_coco_pose--640x640_quant_hailort_hailo{HAILO_VERSION}_1",
inference_host_address="@local",
zoo_url="/home/jchidalgo/zoo",
overlay_color=[(255,255,0), (0,255,0), (255,0,0)]
)
hand_det_model = dg.load_model(
model_name=f"yolov8n_relu6_hand--640x640_quant_hailort_hailo{HAILO_VERSION}_1",
inference_host_address="@local",
zoo_url="/home/jchidalgo/zoo",
overlay_show_labels=False,
overlay_show_probabilities=False,
overlay_line_width=1,
overlay_color=[(255,0,0)]
)
# load palm landmarks detection model
palm_model = dg.load_model(
model_name=f"hand_landmark_lite--224x224_quant_hailort_hailo{HAILO_VERSION}_1",
inference_host_address="@local",
zoo_url="/home/jchidalgo/zoo",
overlay_show_probabilities=False,
overlay_show_labels=False,
overlay_line_width=1,
)
model_handLM = degirum_tools.CroppingAndDetectingCompoundModel(
hand_det_model,
palm_model,
crop_extent=30.0,
add_model1_results= True, # Agregar resultados del modelo de detección de manos
)
tracker = degirum_tools.ObjectTracker(
class_list=['person'], #['face'],
track_thresh=0.5,
track_buffer=50,
match_thresh=0.9,
trail_depth=50,
show_overlay=True,
anchor_point=degirum_tools.AnchorPoint.BOTTOM_CENTER
)
degirum_tools.attach_analyzers( person_model, [ tracker ]) #Analizador se agrega al detector de caras
# Create a compound model that combines the three models
#combined_model=degirum_tools.CombiningCompoundModel( model_handLM,person_model )
combined_model=degirum_tools.CombiningCompoundModel(person_model,model_handLM )
VIDEO_WIDTH = 1280 # 640 #960 #
VIDEO_HEIGHT = 720 # 480 #540 #
Here I receive results:
for result in combined_model.predict_batch(frame_source()):
T1 = time.perf_counter() * 1000
if stop_thread:
print("Deteniendo ejecución...")
break
overlay = result.image_overlay() if callable(result.image_overlay) else result.image_overlay
# Enviar el diccionario 'result' descomprimido a la otra Raspberry Pi
# Debe establecerse la conexion Ethernet entre las dos Raspberry Pi: asignar IPs fijas
send_result_to_vue3(result)
“result” only include “track_id” when is the information related to “person_model” but when “result” is generated with information related to “model_handLM” include a track_id=0. I need to know whose hand it is?, to whom belongs? How can achieve this??? The only way I can see now is to check if hand’s bbox is included in person’s bbox, and then get its track_id…