Yolov3 Python Error

I am trying to load the yolov3 object detector in python on windows operating system and I cannot even run 2 lines of code without opencv creating errors. Yolo cfg and weights file downloaded from official website.

Here is the code:

import cv2
net = cv2.dnn.readNet(“yolov3-320.weights”, “yolov3-320.cfg”)

Error:

Traceback (most recent call last):
File “C:\Users\Blake\PycharmProjects\YOLO_AGAIN\main.py”, line 3, in
net = cv2.dnn.readNet(“yolov3-320.weights”, “yolov3-320.cfg”)
cv2.error: OpenCV(4.3.0) C:\Users\Blake\AppData\Local\Temp\pip-install-m95o04se\opencv-python_fae686c32a8a46c980efa493995d67c9\opencv\modules\dnn\src\darknet\darknet_io.cpp:847:errror: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function ‘cv::dnn::darknet::ReadDarknetFromWeightsStream’

Please I been working on this for weeks with consisten errors in opencv functions.

hmm, your files do not exist here
(all links go to the same weights file )

related:

That “related” forum was also posted by me, but now I trying to use python to just get something working…

I just renamed my weights file and cfg to make things clear.

Why can’t opencv run this code?

sorry, i cannot reproduce it (neither from c++ nor python)
(but id point at the data, not the code)