Vehicle Counting and Velocity Estimation by YOLO v4 and DeepSORT
CUDA Toolkit version 10.1 https://developer.nvidia.com/cuda-10.1-download-archive-update2
Install the proper dependencies either via Anaconda or Pip.
# Tensorflow CPU
conda env create -f conda-cpu.yml
conda activate yolov4-cpu
# Tensorflow GPU
conda env create -f conda-gpu.yml
conda activate yolov4-gpu
# TensorFlow CPU
pip install -r requirements.txt
# TensorFlow GPU
pip install -r requirements-gpu.txt
Download sample video at here, put the video file into the 'data/video' folder of this repository.
# Convert darknet weights to tensorflow model
python save_model.py --model yolov4
# Run the Vehicle Counting Code with YOLOv4 and DeepSORT on video
python vehicle_count_velocity.py --video ./data/video/MVI_2966.MP4 --output ./outputs/output.mp4 --model yolov4
yolov4-deepsort by theAIGuysCode