Skip to content

Desktop app for detecting highway lane violations. Illegal parking, Wrong direction, Illegal over taking can be detected

Notifications You must be signed in to change notification settings

tharakarehan/highway-lane-violation-detector

Repository files navigation

highway-lane-violation-detector

This is a desktop app for detecting highway lane violations. Illegal parking, Wrong direction, Illegal over taking can be detected. This can be implemented realtime on CPU thanks to OpenVino model optimisation. To track objects (vehicles), SORT algorithm with Kalmann Filter (tracker) and Hungarian algorithm (data association) has been used. Pre-trained openvino vehicle detection model (MobileNetV2 SSD) has been used for detection. Tkinter library is used for GUI

Demo: https://www.youtube.com/watch?v=VP6AhOG4vOY

Installation

Create a new conda environment. If you dont have conda installed download miniconda

conda create -n hwlvd python=3.8 

Clone this repository to your computer and navigate to the directory.

Activate new enviroment

conda activate hwlvd  

Install all the libraries used

pip install -r requirements.txt  

Then run the model

python run_sort.py 

Usage

① - Input Directory Button

Select input video for monitoring.

② - Output Directory Button

Select a directory for saving the output if necessary.

③ - Detection Threshold

Insert the threshold value for detection model.

④ - Duration

Insert the duration which is the limit that the program will allow a vehicle not be considered as parked.

⑤ - Standard Deviation

Used for stabilizing the park detection.

⑥ - Direction

Direction the vehicles are supposed to go legally..

⑦ - Save Video Tick

Whether to save the video or not.

⑧ - Load

Load the model and other information (a window will pop out to manually draw the boundaries for lanes).

⑨ - Play

Play the video.

⑩ - Stop

Stop the video.

⑪ - Quit

Quit the program.

⑫ - Illegal Parking Count

Number of vehicles that are detected as illegally parked at the moment.

⑬ - Improper Lane Usage Count

Number of vehicles that are detected as violated the lane discipline at the moment.

⑭ - Reverse Count

Number of vehicles that are detected as driving at the wrong direction at the moment.

⑮ - Latency

The amount of time(ms) that has been spent on processing one frame.

License

MIT

About

Desktop app for detecting highway lane violations. Illegal parking, Wrong direction, Illegal over taking can be detected

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages