Last active
August 10, 2020 06:49
-
-
Save OlafenwaMoses/235530a485204209a8de43489a10a7ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from imageai.Detection import VideoObjectDetection | |
import os | |
execution_path = os.getcwd() | |
detector = VideoObjectDetection() | |
detector.setModelTypeAsYOLOv3() | |
detector.setModelPath( os.path.join(execution_path , "yolo.h5")) | |
detector.loadModel() | |
video_path = detector.detectObjectsFromVideo(input_file_path=os.path.join( execution_path, "traffic-mini.mp4"), | |
output_file_path=os.path.join(execution_path, "traffic_mini_detected_1") | |
, frames_per_second=29, log_progress=True) | |
print(video_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
please provide the yolo.h5 file