Real-time Speed violation detection and Lane-Line violation detection using Yolov4 and Deep-Sort
- First clone the repository
- Run the conda-env.yml to install a dedicated conda environment and install all the necessary repositories.
conda env create -f conda-env.yml
conda activate yolov4-gpu
- If you don't have a gpu, comment out 8 and 9 lines and remove '-gpu' segment in 11 th line. (tensorflow==2.3.0 instead of tensorflow-gpu==2.3.0)
- Please note that you need a comparatively powerful gpu in order to get a descent result.
- Download yolov4 pre-trained weights --> https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights
- Move the yolov4.weights file to /data folder
- Excute following command to convert darknet weights to tensorflow model.
python save_model.py --model yolov4
- Run this commad to test the speed violation detection program
python object_tracker_speed_violation.py --output ./outputs/processed_vids/speed.avi --model yolov4
- Run this commad to test the Lane-Line violation detection program
python lane_line_viol_detection.py --output ./outputs/processed_vids/lane.avi --model yolov4
- Run this commad to test the Parking violation detection program
python parking_violation_detection.py --output ./outputs/processed_vids/parking.avi --model yolov4
https://medium.com/@hasanthakdu/lane-line-violation-detection-using-yolo-and-deep-sort-f19774b3c739
https://github.com/theAIGuysCode/yolov4-deepsort