wkt / YoloMobile

A Android Library for YOLOv5/YOLOv7/YOLOv8 Detection and Pose Inference Based on NCNN
Other
42 stars 11 forks source link

部署模型加载失败,无返回结果 #6

Open YinZhang98 opened 7 months ago

YinZhang98 commented 7 months ago

image 按照步骤增加了一个配置文件,使用的模型是项目原本自带的

自己转的模型感觉不太对,使用的是下面的代码: image

我使用的是windows,他转ncnn中间过程下载了pnnx-20240226-windows.zip,模型转换后名字中间加了一个pnnx image

手机上显示的是这个,并没有识别结果 image

大佬这个该怎么改一下,还有就是我这模型转换有问题吗?

YinZhang98 commented 7 months ago

image

wkt commented 7 months ago

使用model.export转换的模型,请使用如下参数配置:

  "name": "yolov8n-640",
  "input_size": 640,
  "param": "yolov8n.param",
  "bin": "yolov8n.bin",
  "box_thr": 0.25,
  "iou_thr": 0.35,
  "ver": 8,
  "input_name": "in0",
  "outputs": [
    {"name": "out0","stride":0,"anchors": [0,0]}
  ]
}

然后根据需要修改 "name","input_size", "param" ,"bin"等字段

ice6 commented 1 month ago

使用model.export转换的模型,请使用如下参数配置:

  "name": "yolov8n-640",
  "input_size": 640,
  "param": "yolov8n.param",
  "bin": "yolov8n.bin",
  "box_thr": 0.25,
  "iou_thr": 0.35,
  "ver": 8,
  "input_name": "in0",
  "outputs": [
    {"name": "out0","stride":0,"anchors": [0,0]}
  ]
}

然后根据需要修改 "name","input_size", "param" ,"bin"等字段

这个如果写到文档里会好一些。