hailo-ai / hailo_model_zoo

The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment
MIT License
272 stars 41 forks source link

Post-processing yolov5s personface output #26

Open aux82716 opened 1 year ago

aux82716 commented 1 year ago

Hi,

As a result of inference of the yolov5s_personface model I get 3 vectors of dimensions [1, 40, 40, 21], [1, 20, 20, 21], [1, 80, 80, 21]; what's the correct/fastest procedure to decode them in order to get a list of detections (such as [x_min, y_min, x_max, y_max, score, class])?

Thanks

nadaved1 commented 1 year ago

The fastest way is using the Tappas' gstreamer post processing implementation of that network.

בתאריך יום ו׳, 21 באוק׳ 2022, 16:06, מאת aux82716 @.***

:

Hi,

As a result of inference of the yolov5s_personface model I get 3 vectors of dimensions [1, 40, 40, 21], [1, 20, 20, 21], [1, 80, 80, 21]; what's the correct/fastest procedure to decode them in order to get a list of detections (such as [x_min, y_min, x_max, y_max, score, class])?

Thanks

— Reply to this email directly, view it on GitHub https://github.com/hailo-ai/hailo_model_zoo/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBIQYEIIH5LDW6NWUGU5R3WEKIMVANCNFSM6AAAAAARLE5XIY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

aux82716 commented 1 year ago

Can you share/point out the code to do that? I'm working in python with pyhailort

nadaved1 commented 1 year ago

The Tappas pipeline called "Multi person multi camera detection" is using exactly this network to detect persons, and blur faces: https://github.com/hailo-ai/tappas/blob/master/apps/gstreamer/general/multi_person_multi_camera_tracking/multi_person_multi_camera_tracking.sh.

The post-processing of this is the same as using YOLOv5, with a minor change on the labels. This function is written in c++, here's the code: https://github.com/hailo-ai/tappas/blob/master/core/hailo/gstreamer/libs/postprocesses/detection/yolo_postprocess.cpp

we have an example notebook that binds this c++ function to python and run the full. Let me know if this is something that is of interest and I'll share through the support system, or privately.

aux82716 commented 1 year ago

Yes, can you share this notebook? Is there the possibility of using only the postprocessing detection script (in python) from the whole program? Thanks

nadaved1 commented 1 year ago

Can you please send me an email to nadave@hailo.ai or open a request here: https://hailo.ai/contact-customer-support/

tiktakdad commented 1 year ago

@nadaved1 I sent the mail to nadave@hailo.ai, reply plz. thanks