Hi,
i am running into this error while trying running
hailomz compile yolov8s --ckpt=best.onnx --hw-arch hailo8l --calib-path train/images/ --classes 3
Any idea where might be my error? i am still new and learning.
Thank you for any help.
Hi,
i am running into this error while trying running
hailomz compile yolov8s --ckpt=best.onnx --hw-arch hailo8l --calib-path train/images/ --classes 3
Any idea where might be my error? i am still new and learning.
Thank you for any help.
Hi @tomas.skola,
Welcome to the Hailo Community!
When converting a model using the hailomz tool, some layers at the beginning or at the end of the model may be removed during parsing, according to the start and end nodes specified in the configuration YAML file.
Not sure if you are suing Yolov8s or Yolov8n (it seems to be Yolov8n from your screenshot, but you mentioned Yolov8s in the title).
For Yolov8s, the default YAML file used by the hailomz is this one, which is intended to work with the Yolov8s ONNX model available in the Hailo Model Zoo.
As you can see in the YAML, the specified end nodes are:
- /model.22/cv2.0/cv2.0.2/Conv
- /model.22/cv3.0/cv3.0.2/Conv
- /model.22/cv2.1/cv2.1.2/Conv
- /model.22/cv3.1/cv3.1.2/Conv
- /model.22/cv2.2/cv2.2.2/Conv
- /model.22/cv3.2/cv3.2.2/Conv
These names correspond to the last Conv layers before the Concats
Since you are using your own model, I suggest checking if the names of those nodes changed. If so, you can create a new version of the YAML that you can pass as an argument to the hailomz command, with the --yaml option.
Let me know if this works for you.
Thank you for your help. My mistake with naming of topic, you are right aboout using yolov8n.
I checked my onnx and i dont think that nodes changed.
All three concats poiting to right named nodes.
Hi @tomas.skola,
Since the node names are correct, the model should be parsed correctly.
Please verify this with the following command:
hailomz parse yolov8n --ckpt=best.onnx --hw-arch hailo8l
However, there is an additional point that I would like you to check. The issue may be related to the NMS configuration, which is enabled for the YoloV8n model available from the Model Zoo.
As you may have seen, the Model Zoo uses a hierarchical structure. The YAML file contains all the information for model conversion and evaluation. The YAML file points to a model script, which contains instructions that will be used by the DataFlow Compiler at conversion time.
In the model script, the following command is used to include the NMS:
nms_postprocess("../../postprocess_config/yolov8n_nms_config.json", meta_arch=yolov8, engine=
The yolov8n_nms_config.json file contains the configuration for the NMS algorithm, which will be added at the end of the model.
Please check the yolov8n_nms_config.json:
Try the entire conversion again and let me know if it works.
here i am running into error with “-hw-arch hailo8l --calib-path train/images/ --classes 3”
hailomz: error: unrecognized arguments: --calib-path train/images/ --classes 3
But after removing these parametrs -parsing run seemingly ok.
I checks .json file and my HAR output and maybe found problem:
@tomas.skola that’s true, I just corrected the previous command. The parsing stage does not have the classes and calib-path arguments, since those are part of the optimization phase.
Still not sure if i identified problem layer correctly but tried to create new modifed YAML but with no sucess. Still same layer 41 output error.
i meant yolov8n_nms_config.json
@tomas.skola Have you modified the yolov8_nms_config.json as mentioned in the post above?
Please check the yolov8n_nms_config.json:
- Set the number of classes to 3 in the NMS config
- Check if the output layers from the parsed HAR file are coherent and match those in the JSON. You can open the parsed HAR with Netron, as you did before
The NMS config JSON is located at hailo_model_zoo/cfg/postprocess_config/yolov8n_nms_config.json. I suggest to make a backup copy of the NMS config JSON and the model script (.alls) before doing any modification.
Hi, i am sorry for late reply. Dont have much time durring holidays.
Meanwhile i tried to remake whole project. I dont think i changed anything but whole process now working and i sucessfully running custom HEF on rpi hailo.
No idea if i done something different or why it works now but problem was solved.