Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Take home assignment to detect and track the traffic

Notifications You must be signed in to change notification settings

vladserkoff/detect-and-track

Repository files navigation

Traffic monitoring system implementation

An implementation of a traffic monitoring system for counting incoming and outgoing vehicles.

cyberpunk.mp4

Slightly more formal and boring description of the system can be found in the system description document.

Hopefully more interesting is the presentation which, unfortunately, is not rendered by GitHub and has to be downloaded and opened locally.

Usage

Docker

The easiest way is to use the provided docker-compose.yml file. By default it expects that the machine has an Nvidia GPU and docker is configured to use it. If that is not the case, comment out deploy section of the docker-compose.yml and append "--device", "cpu" to the command field.

docker-compose up

This will process the video from data/Video.mp4 and save the result to outputs/Video.mp4.

Local

Local installation allows for more interactive usage when the video is processed in real time on the screen. This requires first installing the dependencies:

conda env create -f environment.yml
conda activate somecompany

Then the program can be run with:

python -m main -s ./path/to/Video.mp4

Tests

Tests can be (successfully!) run with:

python -m unittest discover tests

Technical details

This program is written in python and uses pytorch for deep learning and opencv for computer vision. Models are provided by huggingface and ultralytics packages. For a more exhaustive list of dependencies see environment.yml.

About

Take home assignment to detect and track the traffic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published