ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

运行example 的yolov5 报错

Open BigFaceBoy opened this issue 2 years ago • 2 comments

平台:mac m2 下载的模型:https://github.com/nihui/ncnn-assets/blob/master/models/yolov5s.bin https://github.com/nihui/ncnn-assets/blob/master/models/yolov5s.param 修改example/yolov5.cpp #define YOLOV5_V60 0 #define YOLOV5_V62 0

$ % ls OIP-C.jpg yolov5 yolov5s.bin yolov5s.param % ./yolov5 OIP-C.jpg [0 Apple M2 Ultra] queueC=0[1] queueG=0[1] queueT=0[1] [0 Apple M2 Ultra] bugsbn1=0 bugbilz=0 bugcopc=0 bugihfa=0 [0 Apple M2 Ultra] fp16-p/s/a=1/1/1 int8-p/s/a=1/1/1 [0 Apple M2 Ultra] subgroup=32 basic/vote/ballot/shuffle=1/1/1/1 [0 Apple M2 Ultra] fp16-matrix-16_8_8/16_8_16/16_16_16=0/0/0 16 = 0.45370 at 16.03 98.47 382.97 x 300.53 2023-11-13 14:54:32.668 yolov5[53492:6354976] XType: Using static font registry. 2023-11-13 14:54:32.747 yolov5[53492:6354976] +[NSXPCSharedListener endpointForReply:withListenerName:replyErrorCode:]: an error occurred while attempting to obtain endpoint for listener 'ClientCallsAuxiliary': Connection interrupted

BigFaceBoy avatar Nov 13 '23 07:11 BigFaceBoy

生成onnx 需要加 --train参数 或者使用pnnx导出

sxj731533730 avatar Jan 19 '24 03:01 sxj731533730

针对onnx模型转换的各种问题,推荐使用最新的pnnx工具转换到ncnn In view of various problems in onnx model conversion, it is recommended to use the latest pnnx tool to convert your model to ncnn

pip install pnnx
pnnx model.onnx inputshape=[1,3,224,224]

详细参考文档 Detailed reference documentation https://github.com/pnnx/pnnx https://github.com/Tencent/ncnn/wiki/use-ncnn-with-pytorch-or-onnx#how-to-use-pnnx

nihui avatar Aug 05 '24 09:08 nihui