yolov5-seg-ncnn
yolov5-seg-ncnn copied to clipboard
Can you share a way convert model pt to ncnn
i used to convert pretrained model yolov5s-seg.pt to ncnn by pnnx tool, but its content of param file is not same content of your param file provided
this is command convert model: ./pnnx yolov5s-seg.torchscript inputshape=[1,3,640,640]
I have same problem, I try onnx to ncnn and torchscript to pnnx to ncnn
same problem @FeiGeChuanShu 飞哥救急呀,如何将yolov5s-seg.pt(v7.0) 转换为ncnn?
Refer @FeiGeChuanShu https://github.com/FeiGeChuanShu/yolov5-seg-ncnn/issues/1#issuecomment-1253376316
How to modify the following commands to generate the correct ncnn model files.
$ python export.py --weights yolov5s-seg.pt --include torchscript
$ ./pnnx yolov5s-seg.torchscript inputshape=[1,3,640,640]
Note that, yolov5s-seg.pt is downloaded from yolov5-7.0.
https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s-seg.pt
Refer @FeiGeChuanShu #1 (comment)
How to modify the following commands to generate the correct ncnn model files.
$ python export.py --weights yolov5s-seg.pt --include torchscript $ ./pnnx yolov5s-seg.torchscript inputshape=[1,3,640,640]
Note that, yolov5s-seg.pt is downloaded from yolov5-7.0.
https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s-seg.pt
output and input of converted model seem different with pre-converted model provided by FeiGeChuanShu.
@nqthai309 yes. i have the same issue. So i write "How to modify the following commands to generate the correct ncnn model files." No response from @FeiGeChuanShu. Maybe there is something he modified but do not want to show out, just post export.py and pnnx .
@nqthai309 @superbayes @xellDart It seems block issues
of pnnx . I have put an issue https://github.com/Tencent/ncnn/issues/4488
https://github.com/Tencent/ncnn/issues/4489#issue-1561097873
@Digital2Slave Thanks bro <3
@Digital2Slave Any update regarding this issue? I am also facing the same issue, I tried ONNX to NCNN approach also and torchscript > PNNX > NCNN but the output param file is different from provided by @FeiGeChuanShu . It seems he used a different approach :/
@MjiS I change to use yolov8 segment model. You can refer wiki https://github.com/Digital2Slave/ncnn-android-yolov8-seg/wiki/Conver-yolov8-model-to-ncnn-model.
By the way, because the yolov5 segment model may different between versions. The convert NCNN model file maybe also different from @FeiGeChuanShu .
@Digital2Slave Thank you for your guidance but I want to run segmentation in real time like yolov5-seg. There is no app for Yolov8s-seg model or do I need to make specific changes to it to run the segmentation model?
@Digital2Slave Thank you for your guidance but I want to run segmentation in real time like yolov5-seg. There is no app for Yolov8s-seg model or do I need to make specific changes to it to run the segmentation model?
Refer https://github.com/Digital2Slave/ncnn-android-yolov8-seg