def main(path_model, path_video, path_detect):
    video_detector = VideoObjectDetection()
    video_detector.set_model_type_as_yolo_v3()
    video_detector.set_model_path(path_model)
    video_detector.load_model()

    plt.show()

    video_detector.detect_objects(input_file_path=path_video, output_file_path=path_detect, frames_per_second=20,
                                  per_second_function=for_second, minimum_percentage_probability=30,
                                  return_detected_frame=True, log_progress=True)
def main(path_model, path_video, path_detect):
    detector = VideoObjectDetection()
    detector.set_model_type_as_yolo_v3()
    detector.set_model_path(path_model)
    detector.load_model()

    custom = VideoObjectDetection.custom_objects(person=True, motorcycle=True, bus=True)

    video_path = detector.detect_custom_objects(custom_objects=custom, input_file_path=path_video,
                                                output_file_path=path_detect, frames_per_second=20,
                                                log_progress=True)
    print(video_path)
Example #3
0
def main(camera, path_model, path_output):
    detector = VideoObjectDetection()
    detector.set_model_type_as_yolo_v3()
    detector.set_model_path(path_model)
    detector.load_model()

    video_path = detector.detect_objects(camera_input=camera,
                                         output_file_path=path_output,
                                         frames_per_second=20,
                                         log_progress=True,
                                         minimum_percentage_probability=30)

    print(video_path)