object-detection-opencv
object-detection-opencv copied to clipboard
opencv cannot read net - Error of "Unknown layer type"
Hello, I am trying to use your code for running detection of yolo v1. I use python 3.5 I use opencv 4.1.0 The error occurs in line 57: net = cv2.dnn.readNet(args.weights, args.config) It says:
cv2.error: OpenCV(4.1.0) /io/opencv/modules/dnn/src/darknet/darknet_io.cpp:668: error: (-212:Parsing error) Unknown layer type: connected in function 'ReadDarknetFromCfgStream'
I took the weights and config from the original Darknet. I tried weights and cfg for yolov1, as well as for yolov1 tiny, but the same error happens for both. On the other hand, when I tried weights and cfg for yolov3, it succeeded. So, does cv2.dnn modules are not compatible with yolo1? Is that the problem or anything else?
Thanks!