Questions About YOLOv8s: conv Nodes and NMS Configuration

Hi everyone,

I have a question regarding the yolov8s.json and yolov8s.alls files. Specifically, I am unable to determine where to locate conv42, conv52, and conv63. Could you please clarify where these are defined or how they can be identified?

yolov8s.alls

quantization_param([conv42, conv53, conv63], force_range_out=[0.0, 1.0])
normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv42, sigmoid)
change_output_activation(conv53, sigmoid)
change_output_activation(conv63, sigmoid)
performance_param(compiler_optimization_level=max)
nms_postprocess("../../postprocess_config/yolov8s_nms_config.json", meta_arch=yolov8, engine=cpu)

I opened my best.onnx file on netron, but unfortunally there weren’t any entries on conv42, conv53, conv63, same with conv41, conv52, conv62

yolov8s.json

"bbox_decoders": [
		{
			"name": "bbox_decoder41",
			"stride": 8,
			"reg_layer": "conv41",
			"cls_layer": "conv42"
		},
		{
			"name": "bbox_decoder52",
			"stride": 16,
			"reg_layer": "conv52",
			"cls_layer": "conv53"
		},
		{
			"name": "bbox_decoder62",
			"stride": 32,
			"reg_layer": "conv62",
			"cls_layer": "conv63"
		}
	]
}

yolov8s.yaml

 nodes:
  - null
  - - /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

From the naming conventions, this seems unclear to me. While I can locate the nodes in the yolov8s_nms_config without issue, my search halts when attempting to find conv4, conv5, or conv6. If these are not nodes, what exactly are they, and how were they derived? Gaining clarity on this would greatly help me understand their connection to the overall structure.

I would greatly appreciate any explanation you could provide on this, and thank you in advance.

@moon2701, with the latest version of the DFC 3.19 and 3.20, you can simplify the alls file as follow:

normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
performance_param(compiler_optimization_level=max)
nms_postprocess(meta_arch=yolov8, engine=cpu)

In case you are curious to see where are conv42, conv52, conv63, you can use hailo visualizer yolov8s.har
These nodes map to the parsed version of the ONNX model into Hailo format.

To see the correspondence from Hailo name to ONNX original name, please use Netron:

netron yolov8s.har

If you click on each node, the attributes window will show you both the new name and the original name.

1 Like