arunsinghbabal / Traffic-Security

The goal of the project is to classify the vehicles, count their frequency, track them using unique ID and provide safety measures to the users by flagging the suspicious ones.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traffic Security

Aim of the project:

The project was aimed to modernize the highway system by implementing the following steps:

1. Vehicles classification and traffic frequency:

To classify the vehicles and provide the traffic frequency by obtaining individual vehicle counts over a period, which can be used for the road survey, automatic toll collection etc.

2. Vehicle tracking:

To provide vehicle location at a point of time by capturing vehicle image, licence plate image and slight details i.e., driving direction, unique ID number, capturing date and time, which can be used for effective tracking.

3. Saftey measures:

By categorizing the vehicles based on the provided flagged licence plates into suspicious and normal. The CSV file contains all the vehicle details including its licence plate number in text format and whether the vehicle is flagged (suspicious or not) for further preprocessing.

Summary

image

Project Implementation:

Install dependencies:

First create an environment and install the dependencies listed in the requirements.txt file.

(base) Project_folder>conda create -n "environment_name" python=3.8 # Create an environment
(base) Project_folder>conda activate "environment_name" # Activate the created environment
(environment) Project_folder>pip install -r requirements.txt # Install all the dependencies

Vehicle's classification and traffic frequency:

For only vehicle classification and their total count run the following commands:

(base) Project_folder>python main.py" # To run on VGG16 CNN architecture
or
(base) Project_folder>python main.py "VGG" # To run on VGG16 CNN architecture

Demo video

the_output_new.mp4

Output images
1. Vehicle Image
car ID_No 2 is going in direction up on 2021-11-21 at 06_17_42_816463

Vehicle tracking:

It will classify vehicles and count their number along with their images, licence plate and further details. To run, use the following commands:

(base) Project_folder>python main.py "Video+Licence plate" # To run on VGG16 CNN architecture
or
(base) Project_folder>python main.py "Video+Licence plate" "VGG" # To run on VGG16 CNN architecture
or
(base) Project_folder>Python main.py "Video+Licence plate" "mobile" # To run on MobileNetV2 CNN architecture

Demo video

the_output_new.mp4

Output images
1. Vehicle Image
car ID_No 2 is going in direction up on 2021-11-21 at 06_17_42_816463
2. Licence plate image
Licence plate for car ID_No 2 detected on2021-11-21 at 06_47_17_212563

Saftey measures:

After Vehicle's classification, traffic frequency and vehicle tracking, it will flag the vehicles and give the output in the csv format based on the provided details. To run, use the following commands:

(base) Project_folder>python main.py "Video+Licence plate+Text" # To run on VGG16 CNN architecture
or
(base) Project_folder>python main.py "Video+Licence plate+Text" "VGG" # To run on VGG16 CNN architecture
or
(base) Project_folder>python main.py "Video+Licence plate+Text" "mobile" # To run on VGG16 CNN architecture for vehicle's classification, traffic frequency and safety measure and MobileNetV2 for vehicle tracking

Demo video

text.mp4

Output images
1. Vehicle Image
car ID_No 2 is going in direction up on 2021-11-21 at 06_17_42_816463
2. Licence plate image
Licence plate for car ID_No 2 detected on2021-11-21 at 06_47_17_212563
3. Licence plate text
Licence plate for car ID_No 2 detected on2021-11-21 at 07_16_35_185054


4. CSV file


image


About

The goal of the project is to classify the vehicles, count their frequency, track them using unique ID and provide safety measures to the users by flagging the suspicious ones.


Languages

Language:Python 100.0%