Vote Course1 Week1 Ungraded Lab Failed to parse NetParameter file in function cv.detect_common_objects

Hi,
In the following line:
“bbox, label, conf = cv.detect_common_objects(img_filepath,model=model, confidence=confidence)”
I get the the error:
“error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wef8acrf\opencv\modules\dnn\src\darknet\darknet_importer.cpp:207: error: (-212:Parsing error) Failed to parse NetParameter file: C:\Users\User.cvlib\object_detection\yolo\yolov3\yolov3-tiny.cfg in function 'cv::dnn::dnn4_v20200609::readNetFromDarknet”.

It is Ungraded Lab Part 1 - Deploying a Machine Learning Model. I activated virtual environment, install requirements and did’t change anything in the notebook. I use Juputer Notebook on Windows 10
Does anyone have any ideas how to fix this?
Thanks!

1 Like

Hi, the same for me. unfortunately.
Failed to parse NetParameter file: C:\Users.cvlib\object_detection\yolo\yolov3\yolov3-tiny.cfg in function ‘cv::dnn::dnn4_v20210608::readNetFromDarknet’

The error occurs after failing to download the yolov3-tiny-weight for the first time calling cv.detect_common_objects API. To fix this problem, you have to download the configure file and weights manually and move them into a certain directory …cvlib\object_detection\yolo\yolov3. There are three files you need to download,
yolov3_classes.txt, yolov3-tiny.cfg, yolov3-tiny.weights. The yolov3-tiny.weight is about 33MB and if your file size is much smaller than it, you may need to remove and redownload it from web.

https://github.com/pjreddie/darknet/raw/master/cfg/yolov3-tiny.cfg
https://pjreddie.com/media/files/yolov3-tiny.weights
https://github.com/arunponnusamy/object-detection-opencv/raw/master/yolov3.txt