OPtimization problem using own .pt file

We used Roboflow to label the data, trained it on Google Colab, and then downloaded it in .pt format.

I followed the steps on this link, https://github.com/BetaUtopia/hailo8, one by one without the training section.

Everything went smoothly up until the optimization section.

However, when I ran the code below, I received the following error:

hailomz optimize --hw-arch hailo8l --har ./yolov8n.har     --calib-path /home/aura/.hailomz/data/models_files/coco/2023-08-03/coco_calib2017.tfrecord     --model-script /home/aura/yolomodel/hailo_model_zoo/hailo_model_zoo/cfg/alls/generic/yolov8n.alls yolov8n

Afterwards, I tried the following solution I found in this forum, but it didn’t work. Other people have resolved the issue with this solution. Why am I unable to get it to work? Am I missing something?

Have you changed the input resolution?
It seems that there is a mismatch between the output from the model and the NMS inputs as reflected in the JSON file

Since I’m at a beginner level, I didn’t fully understand what you said. Could you please explain a bit more? I tried setting imgsz=128 and imgsz=640 while training the model, but it didn’t work. When you mention input resolution, what exactly are you referring to? Thanks!

Hello, I have made progress on my error. I have obtained the HAR file but I encountered the error in the image while optimizing it. Can you help me? Thank you.

classes:10

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)
nms_postprocess("../../postprocess_config/yolov8n_nms_config.json", meta_arch=yolov8, engine=cpu)

{
	"nms_scores_th": 0.2,
	"nms_iou_th": 0.7,
	"image_dims": [
		640,
		640
	],
	"max_proposals_per_class": 100,
	"classes": 2,
	"regression_length": 16,
	"background_removal": false,
	"background_removal_index": 0,
	"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"
		}
	]
}

Hi,
Something is wrong with the path to the JSON config file:
yolov8n_nms_config.json

Check on that

Thank you for your reply. Where can I check the JSON configuration file?

Thank you very much for your help. Now I have corrected the path of the json config file but now I am still encountering this problem.

@yaserozturk61
Have you been able to solve the issue? I am facing similar issues.