Я пишу код, используя Python для обнаружения лица с помощью прямой трансляции с камеры MacBook. Код обнаруживает камеру, но выключается через 2 секунды и не получает видеопотока. Ниже мой код:
detector = VideoObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath(os.path.join(execution_path , "yolo.h5"))
detector.loadModel()
camera = cv2.VideoCapture(0) --This turn camera light
video_path=detector.detectObjectsFromVideo(camera_input=output_file_path=os.path.join(execution_path, "camera_detected_1"), frames_per_second=29, log_progress=True)
detector.detect
Дайте мне знать, что мне нужно сделать по-другому.