Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 1.64 KB

README.md

File metadata and controls

64 lines (45 loc) · 1.64 KB

Traffic Tracker

This is a rough estimation of traffic flow using OpenCV library. It was tested by Python 3.9 and OpenCV 4.0

Requirements

Make sure you have installed the following requirements:

  • Python3.9
  • OpenCV 4.0
  • numpy, imutils, argparse
git clone https://github.com/saeid-h/Traffic-Tracker.git
# If you do not have python3.9, install it. 
# It might be working with other version of Python, but it's not tested before.

# Make virtual environment
virtualenv -p /usr/bin/python3.9 venv
# Activate the environment
source venv/bin/activate
pip install <libraries>

Demo

Try the main.py

python main.py --video-file $YOURVIDEO 

You may turn off the layer by adding the following switches:

python main.py --video-file $YOURVIDEO --no-speed-check
python main.py --video-file $YOURVIDEO --no-heatmap
python main.py --video-file $YOURVIDEO --no-car-detection

There hyper paramers that you can change them:

--blur-window <int>
--threshold <int>
--object-area <int>
--invalid-length <int>
--dilation-kernel <int>
--dilation-iter <int>
--heatmap-threshold <int>
--speed-limit <int>

You may also download a sample video here