I need some debugging help. I’ve retrained both yolov8x and yolov8s against custom dataset. All work well with inferencing tests using sample images and a new weights file.
I have converted my weights PT file to ONNX
I have successfully compiled my ONNX file into an HEF
Note I did not change much from the provided alls, yaml, and json config files. However I did touch up the number of classes to 1011, and added model_optimization_config(calibration, batch_size=1) to alls because I was running out of memory on GPU compiling.
Next, I moved my model over to RPI5 with 8L accelerator.
I compiled Hailo-Application-Code-Examples/runtime/cpp/object_detection/general_detection_inference without changes
Then, I run using build/x86_64/vstream_detection_example_cpp -hef=birds-yolov8s.hef -input=Cardinal.jpg -num=200
The process runs but without meaningful/accurate detection results.
Tail end of results before ending:
-I- Inference finished successfully
-I-----------------------------------------------
-I- birds-yolov8s
-I-----------------------------------------------
-I-----------------------------------------------
-I- Inference & Postprocess
-I-----------------------------------------------
-I- Average FPS: 36.71
-I- Total time: 5.45 sec
-I- Latency: 27.24 ms
-I-----------------------------------------------
What additional details could be helpful to understand my attempt? I am struggling to see a successful inference result.
I went through the whole process again starting with retraining yolov8s using my custom dataset and made sure I am on all the latest versions of Hailo.
Removing this allows the compile to proceed without the error about conv42. Couple questions:
I am specifying a list of end-node-names per the parse but I still get the error. Why does the error still occur even after supplying the end-node-names?
If compile succeeds without nms post processing, what do I do next to make sure this will create a functional HEF? I am assuming it won’t have bounding box and class identification in the output without NMS pos-process?
You mentioned in the referenced post that you can manually post-process after inference. Can you point me to any CPP code examples of this?
Thank you so much for your help! I feel I might be within inches of success!
Hi @mikepwright
If you are able to compile without postprocess included, the postprocessors needs to run outside. Our PySDK package can help with this. If you are ok to try our PySDK, I can provide you the steps involved.
yes, I was able to compile to HEF. For testing the model, I had switched to C++ because I was getting some kind of OOM error on the RPI5 with Python but if you have an end to end example using PySDK I can give it a try. Thanks @shashi
@shashi Just a quick update… I have been able to successfully compile and run detections with my custom yolo11n weights. This article together with yours input helped me generate the working HEF. Thank you!
Now on to packaging it all up and managing it with Nomad!