x4nth055/pythoncode-tutorials

yolo_opencv.py error: (-215:Assertion failed) ifile.is_open() in function 'ReadDarknetFromWeightsFile'

goktugyildirim opened this issue · 0 comments

When I try to convert image to yolo image with "yolo_opencv.py", I get this error:

Traceback (most recent call last):
  File "yolo_opencv.py", line 23, in <module>
    net = cv2.dnn.readNetFromDarknet(config_path, weights_path)
cv2.error: OpenCV(3.4.2) /io/opencv/modules/dnn/src/darknet/darknet_io.cpp:684: error: (-215:Assertion failed) ifile.is_open() in function 'ReadDarknetFromWeightsFile'

How can I solve this problem? Thank you.