def main(path_model, path_img, path_detect): detector = ObjectDetection() detector.set_model_type_as_yolo_v3() detector.set_model_path(path_model) detector.load_model() detections = detector.detect_objects(input_source=path_img, output_image_path=path_detect, minimum_percentage_probability=30) print(pd.DataFrame(detections))
def main(path_model, path_img, path_detect): detector = ObjectDetection() detector.set_model_type_as_yolo_v3() detector.set_model_path(path_model) detector.load_model() our_time = time() custom = ObjectDetection.custom_objects(person=True, dog=True) detections = detector.detect_custom_objects( custom_objects=custom, input_source=path_img, output_image_path=path_detect, minimum_percentage_probability=30) print("IT TOOK : ", time() - our_time) print(pd.DataFrame(detections))