A demonstration of connecting to real life traffic camers and monitoring traffic (detection + tracking).
The story behind this project is that as a good developer, @coffeelover82 got impatient with the traffic light on his way to work, that without any apparent good reason made him wait every day at 5:00 AM while no other cars were to be seen.
Being the feinschmecker that he is, he decided to get back at that damn traffic light, and optimze traffic lights world wide.
This project is the the work in progress of this effort.
Detection | Tracking |
---|---|
All requierements are available in Pipfile
To install required dependencies run:
cd path/to/repo
pipenv install
For downloading pre trained yolo weights run:
python __main__.py -s
For running the code run play.py
cd path/to/repo
python __main__
You will be asked to choose a camera from a list.
You can also pass the camera as an argument:
cd path/to/repo
python __main__.py -c 70
Or specify location of an existing local video file:
cd path/to/repo
python __main__.py -c /path/to/video/file.avi
While viewing the stream, the following commands are available:
s - For tracking a specific region of interest.
q - For closing the window.