Tested with Python 3.9.2 using Pycharm CE 2021.1 https://www.jetbrains.com/pycharm/download/#section=mac
Depends on Python Module: opencv-python==4.5.1.48
Preparation:
- Download the Trained model from https://drive.google.com/file/d/1TUiI3lLVTSzeAWnkHcuwmnqgrV1udfb2/view?usp=sharing
- Place the downloaded file under the "models" directory
- TEST_VIDEO_FILE_NAME = "video/test.mp4" modify this line on YoloV4.py if you would like to test on different sample file
Now the project should run :)
Customization parameters on YoloV4.py:
- MIN_CONFIDENCE_THRESHOLD = 0.5
- SKIP_FRAMES_TO_SPEEDUP = False , True SKIP_FRAME_COUNT = 60
- DETECT_ALL_CLASSES = False, True desiredClasses = ["person", "car", "motorbike", "bus", "truck", "sheep"]
- SAVE_OUTPUT_VIDEO = False, True OUTPUT_VIDEO_FPS = 30
- SAVE_DETECTED_OBJECT_IMAGES = True, This will save images of the detected objects to disk.
Check out the result https://youtu.be/fUcbuuVpyf4