Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求助:yolo11直接导出的ncnn模型,example代码推理乱框 #5775

Open
dixiatielu opened this issue Nov 13, 2024 · 1 comment
Open

Comments

@dixiatielu
Copy link

dixiatielu commented Nov 13, 2024

detail | 详细描述 | 詳細な説明

导出模型时使用yolo cli

yolo export model=cc_yolo11n.pt format=ncnn

看到 #5721 说yolov11可以直接使用v8的例程,因此直接编译了examples/yolov8.cpp
将生成的cc_yolo11n_ncnn_model下的model.ncnn.param以及model.ncnn.bin分别改名为yolov8.paramyolov8.bin。编译yolov8.cpp后运行./yolov8 test.png 乱框。将实例代码yolov8.cpp中的class_names[]改为自行训练的类型名称和数量也是类似的结果。
image

测试了ultralytics的官方coco数据集预训练模型yolo11n.pt,使用同样的方法导出为ncnn格式,并无此问题。可以正常输出检测结果。

求助排查思路,是需要更改.param文件还是实例yolov8.cpp代码以适应自训练的模型么?

自训练模型为fp32精度。基于yolo11n,使用yolo cli命令行训练
以下是我的模型的.param文件
yolov8n.param.txt

Tasks

No tasks being tracked yet.
@dixiatielu
Copy link
Author

使用ultralytics的yolo cli进行自训练的这个ncnn模型的推理没有问题。但使用examples/yolov8.cpp中的代码便无法推理。

yolo predict model='cc_yolo11n_ncnn_model' source=color_circle_test3.mp4 show=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant