I'm having trouble loading YOLOv3's into OpenCV's dnn module. I'm following this tutorial but instead of using the full YOLOv3 I'm using Tiny YOLOv3 trained on my own dataset.
On line 84 layerOutputs = net.forward(ln) I get the openCV error:
[ERROR:0] global /io/opencv/modules/dnn/src/dnn.cpp (3066) getLayerShapesRecursively OPENCV/DNN: [Concat]:(concat_20): getMemoryShapes() throws exception. inputs=2 outputs=1/1
[ERROR:0] global /io/opencv/modules/dnn/src/dnn.cpp (3069) getLayerShapesRecursively input[0] = [ 1 128 28 28 ]
[ERROR:0] global /io/opencv/modules/dnn/src/dnn.cpp (3069) getLayerShapesRecursively input[1] = [ 1 256 27 27 ]
[ERROR:0] global /io/opencv/modules/dnn/src/dnn.cpp (3073) getLayerShapesRecursively output[0] = [ 1 128 28 28 ]
[ERROR:0] global /io/opencv/modules/dnn/src/dnn.cpp (3075) getLayerShapesRecursively Exception message: OpenCV(4.2.0) /io/opencv/modules/dnn/src/layers/concat_layer.cpp:102: error: (-201:Incorrect size of input array) Inconsistent shape for ConcatLayer in function 'getMemoryShapes'
Traceback (most recent call last):
File "yolo-server.py", line 86, in <module>
layerOutputs = net.forward(ln)
cv2.error: OpenCV(4.2.0) /io/opencv/modules/dnn/src/layers/concat_layer.cpp:102: error: (-201:Incorrect size of input array) Inconsistent shape for ConcatLayer in function '
where ln = [ln[i[0] - 1] for i in net.getUnconnectedOutLayers()]
Here's my code & here's the cfg Here is the weights I used.
Attempt @ Soln
I tried it using COCO & got results, meaning i highly suspect it has to do with the CFG file? But when I try my cfg & weights using darknet it works - so I guess there's a bigger error I'm making inside my cfg that darknet skips over? I've also scoured the internet but couldn't find anything digestible to the error I'm making.