I’m currently learning how to use the DFC tool because I want to convert my custom network .onnx to .hef format using DFC.
As a first step, for learning purposes, I’m looking at the script that converts the YOLOv8n object detection model from ONNX to HEF.
What I don’t understand is how to find the correct postprocessing node names.
According to the following config file from the Hailo Model Zoo repository:
yolov8n_nms_config.json, the postprocess config for yolov8n includes:
"name": "yolov8n/bbox_decoder41",
"stride": 8,
"reg_layer": "yolov8n/conv41",
"cls_layer": "yolov8n/conv42"
However, when I visualize the yolov8n.onnx file using Netron or run the hailomz parse command, I don’t see any node with names like conv41.
How can I identify the correct node names for postprocessing?
Here is the output of the hailomz parse command:
/local/workspace$ hailomz parse --hw-arch hailo8 --ckpt yolov8n.onnx --yaml hailo_model_zoo/cfg/networks/yolov8n.yaml
<Hailo Model Zoo INFO> Start run for network yolov8n ...
<Hailo Model Zoo INFO> Initializing the runner...
[info] Translation started on ONNX model yolov8n
[info] Restored ONNX model yolov8n (completion time: 00:00:00.05)
[info] Extracted ONNXRuntime meta-data for Hailo model (completion time: 00:00:00.20)
[info] NMS structure of yolov8 (or equivalent architecture) was detected.
[info] In order to use HailoRT post-processing capabilities, these end node names should be used:
/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
[info] Start nodes mapped from original model: 'images': 'yolov8n/input_layer1'.
[info] End nodes mapped from original model:
'/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'
[info] Translation completed on ONNX model yolov8n (completion time: 00:00:00.78)
[info] Saved HAR to: /local/workspace/yolov8n.har
Any advice on how the node names in the config (conv41, etc.) relate to the actual ONNX model?
Is there any documentation that explains how to find the correct node names and how to apply configurations to a custom network?