pythoncvlib

cvlib detect_common_objects is not working


https://github.com/arunponnusamy/cvlib/tree/f46a22f8e13bc4b0267b9057fa88de170d41f96a

I'm checking examples of cvlib and trying on my own on spyder Python 3.7 Face detection is working very fine.. Gender detection working very fine but object detection is not working... Output is the image itself. I have tried BGR2RGB but nothing happens.

here is code

import cvlib as cv
from cvlib.object_detection import draw_bbox 
import cv2
path = r'C:\Users\user\desktop\cod\object_detection_input.jpg'
image = cv2.imread(path)
bbox, label, conf = cv.detect_common_objects(image)
print(bbox, label, conf)
out = draw_bbox(image, bbox, label, conf)
cv2.imshow("object_detection", out)
cv2.waitKey()
cv2.destroyAllWindows()

Solution

  • I Guess the problem about kernel restart after installation of libraries. When I restart computer. It worked.