Closed moneypi closed 2 years ago
稍等,还没提交呢。o( ̄︶ ̄)o
您好,我今天在测试该项目,我用指令
python detect_plate.py --weights=weights/plate_det_model.pt
确实可以进行测试,但如果用指令
python detect_plate.py --weights=weights/yolov5s.pt
却会看到报错:
Namespace(image='data/images/test.jpg', img_size=640, weights=['weights/yolov5s.pt'])
Fusing layers...
[W NNPACK.cpp:80] Could not initialize NNPACK! Reason: Unsupported hardware.
imgs/2.jpg
2592 2112
Traceback (most recent call last):
File "detect_plate.py", line 177, in <module>
detect_one(model, filename, device)
File "detect_plate.py", line 111, in detect_one
pred = model(img)[0]
File "/home/luke/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/luke/Downloads/License-Plate-Detector/models/yolo.py", line 151, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/home/luke/Downloads/License-Plate-Detector/models/yolo.py", line 167, in forward_once
x = m(x) # run
File "/home/luke/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/luke/Downloads/License-Plate-Detector/models/yolo.py", line 67, in forward
y[..., class_range] = x[i][..., class_range].sigmoid()
IndexError: index 85 is out of bounds for dimension 0 with size 85
是不应该这样使用吗?
yolov5s.pt这个模型是用来做训练的pretrain模型,不要用来测试。
稍等,还没提交呢。o( ̄︶ ̄)o
想问下大佬ncnn版本的cpp文件可否提供下
··· cd Prj-ncnn
cmake .
make ··· 我看教程中还包含这部分,但是代码中已找不到了,是ncnn版本不再维护了吗?