Код: Выделить всё
File "/Users/adarsh/DEV/PycharmProjects/CMS/camera.py", line 22, in record
bbox, labels, conf = cvlib.detect_common_objects(frame)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adarsh/DEV/PycharmProjects/CMS/.venv/lib/python3.12/site-packages/cvlib/object_detection.py", line 125, in detect_common_objects
net = cv2.dnn.readNet(weights_file_abs_path, config_file_abs_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.10.0) /Users/runner/work/opencv-python/opencv-python/opencv/modules/dnn/src/darknet/darknet_io.cpp:705: error: (-215:Assertion failed) separator_index < line.size() in function 'ReadDarknetFromCfgStream'
Код: Выделить всё
cap = cv2.VideoCapture(0)
items = []
while cap.isOpened():
ret, frame = cap.read()
bbox, labels, conf = cvlib.detect_common_objects(frame)
output = draw_bbox(frame, bbox, labels, conf)
cv2.imshow('LIVE FOOTAGE', output)
for label in labels:
if label in items:
pass
else:
items.append(label)
if cv2.waitKey(1) == ord('q'):
break
Подробнее здесь: https://stackoverflow.com/questions/790 ... ion-readda