detection.sh
demonstrates detection on one video file source and verifies Hailo’s configuration.- This is done by running a
single-stream object detection pipeline
on top of GStreamer using the Hailo-8 device.
./detection.sh [--input FILL-ME]
--network
is an optional flag that sets which network to use. Choose from [yolov3, yolov4, yolov5, mobilenet_ssd], default is yolov5. This will set whichhef file
to use, the correspondinghailofilter
function, and the scaling of the frame to match the width/height input dimensions of the network.--input
is an optional flag, a path to the video displayed (default is detection.mp4).--show-fps
is an optional flag that enables printing FPS on screen.--print-gst-launch
is a flag that prints the ready gst-launch command without running it.--print-device-stats
Print the power and temperature measured on the Hailo device.
In case the selected network is yolo, the app post process parameters can be configured by a json file located in $TAPPAS_WORKSPACE/apps/gstreamer/general/detection/resources/configs
- 'yolov5m_wo_spp_60p' - https://github.com/hailo-ai/hailo_model_zoo/blob/master/hailo_model_zoo/cfg/networks/yolov5m_wo_spp_60p.yaml
- 'yolov4_leaky' - https://github.com/hailo-ai/hailo_model_zoo/blob/master/hailo_model_zoo/cfg/networks/yolov4_leaky.yaml
- 'yolov3_gluon' - https://github.com/hailo-ai/hailo_model_zoo/blob/master/hailo_model_zoo/cfg/networks/yolov3_gluon.yaml
- 'mobilenet_ssd' - https://github.com/hailo-ai/hailo_model_zoo/blob/master/hailo_model_zoo/cfg/networks/ssd_mobilenet_v1.yaml
- 'nanodet_repvgg' - https://github.com/hailo-ai/hailo_model_zoo/blob/master/hailo_model_zoo/cfg/networks/nanodet_repvgg.yaml
cd $TAPPAS_WORKSPACE/apps/gstreamer/general/detection
./detection.sh
The output should look like:
This app is based on our single network pipeline template
Note
It is recommended to first read the Retraining TAPPAS Models page.
You can use Retraining Dockers (available on Hailo Model Zoo), to replace the following models with ones that are trained on your own dataset:
yolov5m
- Retraining docker
- For best compatibility and performance with TAPPAS, use for compilation the corresponsing YAML file from above.
- TAPPAS changes to replace model:
- Update HEF_PATH on the .sh file
- Update
resources/configs/yolov5.json
with your new post-processing parameters (NMS)
- Retraining docker
yolov4
- Retraining docker
- For best compatibility and performance with TAPPAS, use for compilation the corresponsing YAML file from above.
- TAPPAS changes to replace model:
- Update HEF_PATH on the .sh file
- Update
resources/configs/yolov4.json
with your new post-processing parameters (NMS)
- Retraining docker
yolov3
- Retraining docker
- For best compatibility and performance with TAPPAS, use for compilation the corresponsing YAML file from above.
- TAPPAS changes to replace model:
- Update HEF_PATH on the .sh file
- Update
resources/configs/yolov3.json
with your new post-processing parameters (NMS)
- Retraining docker
mobilenet_ssd
- Retraining docker
- For best compatibility and performance with TAPPAS, use for compilation the corresponsing YAML file from above.
- TAPPAS changes to replace model:
- Update HEF_PATH on the .sh file
- Update mobilenet_ssd.cpp
with your new paremeters, then recompile to create
libmobilenet_ssd_post.so
- Retraining docker
nanodet_repvgg
- Retraining docker
- For best compatibility and performance with TAPPAS, use for compilation the corresponsing YAML file from above.
- TAPPAS changes to replace model:
- Update HEF_PATH on the .sh file
- Update nanodet.cpp
with your new paremeters, then recompile to create
libnanodet_post.so
- Retraining docker