https://github.com/arunponnusamy/cvlib/tree/f46a22f8e13bc4b0267b9057fa88de170d41f96a
我正在检查 cvlib 的示例,并在 spyder Python 3.7 上自行尝试人脸检测工作得很好。性别检测工作得很好,但对象检测不起作用......输出是图像本身。我已经尝试过 BGR2RGB,但没有任何反应。
这是代码
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()