input [0] [3] ==(1 +坐标+类)*函数'getMemoryShapes'中的锚

时间:2019-06-24 07:38:27

标签: python-3.x opencv yolo

我已经在自定义数据集中训练了YOLOv2模型(单班-电池)。在cfg文件中将过滤器更改为30,将类别更改为1,将max_batches更改为2000。我得到了最终的权重,当我尝试使用网络摄像头实时进行预测时,我面临以下问题-

Traceback (most recent call last):
  File "/home/dinesh/workspace/darknet-master/yolo_obj_detection.py", line 75, in <module>
    outs = net.forward(getOutputsNames(net))
cv2.error: OpenCV(4.1.0) /io/opencv/modules/dnn/src/layers/region_layer.cpp:97: error: (-215:Assertion failed) inputs[0][3] == (1 + coords + classes)*anchors in function 'getMemoryShapes'

我正在使用

  

Python-3.6.7

     

OpenCV-4.1.0

使用相同的配置,我已经训练了YOLOV3模型并进行了实时预测,没有任何问题,但是当我使用YOLOV2时,我会遇到此错误。我该如何克服?

0 个答案:

没有答案