cvlib detect common objects function doesn't work

Question:

I’m new to cvlib module…..

I tried to use the detect_common_objects function from cvlib module but hit the error below.
I’m using cvlib version 0.2.7 and cv2 version 4.5.3.

import cvlib as cv
import cv2
image2019_0=cv2.imread('/content/drive/MyDrive/Project CV x Traffic/car_image_2019_Jan/0.jpg')
bbox, label, conf = cv.detect_common_objects(image2019_0, model = 'yolov4', enable_gpu = True)

error:
enter image description here

Asked By: SM9595

||

Answers:

Try with the latest version of OpenCV (4.5.5.62). You can upgrade the package to the newest version as below

pip install --upgrade opencv-python

If you want to use older version of OpenCV, downgrade cvlib to 0.2.6 as below

pip install cvlib==0.2.6

The issue you are facing is due to version incompatibility.

Answered By: Arun Ponnusamy
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.