Skip to content

Trafic participants recognition, localization and classification on real time video.

Notifications You must be signed in to change notification settings

ivanmrsulja/traffic-participants-detection

Repository files navigation

traffic-participants-detection

Traffic participants (pedestrians, busses, cars and trucks) recognition, localization and classification on real time video made using various ML models from YOLO family, specifically: YOLOv3, YOLOv3-tiny, YOLOv4-tiny. Above all, we also hand-made one YOLOv3 implementation to compare with these pre-configured models. Handmade model is heavily inspired by pjreddie's and experiencor's implementations. All models have been configured to run using CPU only.

200w90766a3c1fc6dfa5.gif

Installation

All required packages can be found in requirements.txt file. You can install them using pip:

pip install -r requirements.txt.

It is recommended that you do that inside a virtual environment.

Data

Files necessary for testing and running are inside zip archives which you can download from Google Drive. After you download these zip archives, extract them on the project's root level.

Archives:

Running the project

You can run the project like any other python script:

python main.py args...

If you are using Linux, you may need to specify python version as well.

args... is only a placeholder for command line arguments.

Command line arguments

Only -rrtv and -a arguments can be placed alongside each other.

These options can also be viewed by running the main.py file with -h flag enabled.

Short option Long option Description
-map --meanAveragePrecision Calculates mean average precision. Defaults to analyzing handmade model.
-smh --simpleMetricsHandmade Calculates simple metrics for handmade model (accuracy, precision, recall and f-value).
-smp --simpleMetricsPreconfigured Calculates simple metrics for preconfigured model (accuracy, precision, recall and f-value). Defaults to 'yolov4-tiny.'
-vpi --visualizePredictionsImage Visualize predictions for image. Defaults to '1.png' in images folder.
-rrtv --runRealTimeVideo Run on video. Defaults to 'test.mp4' in demo_videos folder.
-a --algorithm Choose algorithm to run on video. Defaults to 'yolov4-tiny'.

Demos

YOLOv3 (handmade)

Handmade

YOLOv3

YOLOv3

YOLOv3-tiny

YOLOv3-tiny

YOLOv4-tiny

YOLOv4-tiny

Sources

About

Trafic participants recognition, localization and classification on real time video.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages