-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
yolov5 训练一个模型,转成fp16用NCNN部署到移动端,发现ncnn侧得分超低,并位置都不对 #3625
Comments
补充说明: 7767517 |
现在强烈建议采用pnnx来转换pytorch模型,这里贴一下nihui新写的使用教程https://zhuanlan.zhihu.com/p/471357671 |
1.yolov5 训练一个车牌检测模型,转成fp16用NCNN部署到移动端
python3 export.py --weights /yolo/yolov5/weights/best.pt --include onnx --train
python3 export.py --weights /yolo/yolov5/weights/best.pt --img 320 --include onnx --train
python3 -m onnxsim /yolo/yolov5/weights/best.onnx /yolo/yolov5/weights/best-sim.onnx
./weights/onnx2ncnn /yolo/yolov5/weights/best-sim.onnx /yolo/yolov5/weights/best.param /yolo/yolov5/weights/best.bin
./weights/ncnnoptimize /yolo/yolov5/weights/best.param /yolo/yolov5/weights/best.bin /yolo/yolov5/weights/best-opt.param /yolo/yolov5/weights/best-opt.bin 65536
2.在安卓用NCNN部署
修改了:以下参数匹配模型输出参数
ex.input("images", in_pad);
ex.extract("output", out);
ex.extract("353", out);
ex.extract("367", out);
参数匹配yolov5n的训练参数
发现同一张图片(车牌做了打码处理)在ncnn侧得分超低,并位置都不对!
![image](https://user-images.githubusercontent.com/95113887/158523946-2839c5cc-99cb-47a2-8066-19162604e683.png)
云端检测得分
NCNN检测得分
![image](https://user-images.githubusercontent.com/95113887/158523964-72d71970-57a1-46e2-81ce-f92756d17b9d.png)
The text was updated successfully, but these errors were encountered: