The project was aimed to modernize the highway system by implementing the following steps:
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.
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.
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.
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
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
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
2. Licence plate image
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
2. Licence plate image
3. Licence plate text
4. CSV file