Skip to content

DebajyotiTalukder2001/Traffic-Monitoring-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 

Repository files navigation

Traffic Monitoring System

  • Developed a system that effectively detects, tracks, and counts vehicles, estimates their speeds, and identifies speed limit violations with 95% accuracy, promoting proactive traffic management and safety.

  • Achieved robust performance across diverse video datasets by effectively integrating YOLOv8's state-of-the-art pretrained model and implementing a centroid tracking algorithm, ensuring adaptability to real-world traffic scenarios.

  • Technically speaking, YOLOv8 is a group of convolutional neural network models created and trained using the PyTorch framework. YOLO (You Only Look Once) is one of the most popular object detection algorithms in the fields of Deep Learning, Machine Learning, and Computer Vision. YOLOv8 is the latest version of the YOLO (You Only Look Once) AI models developed by Ultralytics.

  • YOLOv8 is the latest family of YOLO based Object Detection models from Ultralytics providing state-of-the-art performance. Leveraging the previous YOLO versions, the YOLOv8 model is faster and more accurate while providing a unified framework for training models for performing Object Detection, Instance Segmentation, and Image Classification. YOLOv8 is more efficient than previous versions because it uses a larger feature map and a more efficient convolutional network.

  • This system can efficiently detect, track, and count vehicles moving in either direction and estimate the speed of the vehicles. It can also detect vehicle speed limit violations to ensure road traffic safety. I have Used the centroid tracking algorithm to track the vehicles. The centroid tracking algorithm works by tracking the centroids of the vehicles detected by YOLOv8.

  • The system was evaluated on the YOLOv8’s pretrained model (e.g., yolov8s.pt). All YOLOv8 models for object detection are already pre-trained on the COCO dataset, which is a huge collection of images of 80 different types. It was Tested on different videos, and average accuracy achieved by the system is up to 95%.

Models Available in YOLOv8:

There are five models in each category of YOLOv8 models for detection, segmentation, and classification. YOLOv8 Nano is the fastest and smallest, while YOLOv8 Extra Large (YOLOv8x) is the most accurate yet the slowest among them.

YOLOv8 comes bundled with the following pre-trained models:

  • Object Detection checkpoints trained on the COCO detection dataset with an image resolution of 640.

  • Instance segmentation checkpoints trained on the COCO segmentation dataset with an image resolution of 640.

  • Image classification models pretrained on the ImageNet dataset with an image resolution of 224.

*** I have used the YOLOv8’s pre-trained model, i.e., yolov8s.pt, in my project.

Technologies:

  • Programming Language: Python (Version-3.11).

  • Platform: Visual Studio Code IDE.

  • Libraries: Pandas (1.5.3), NumPy (1.24.3), Python-OpenCV (4.8.1.78) & Ultralytics (8.0.147).

  • Libraries Installation: Go to Terminal in windows > pip install package_name==version

Documentation:

Screenshots:

Sample-1:

Screenshot (1538)

Screenshot (1506)

Screenshot (1508)

Screenshot (1541)

1

Screenshot (1511)

Screenshot (1514)

Screenshot (1516)

Sample-2:

Screenshot (1517)

Screenshot (1518)

2

Screenshot (1528)

Screenshot (1531)

Screenshot (1532)

1

Sample-3:

Screenshot (1501)

Screenshot (1497)

Screenshot (1503)

Screenshot (1499)

About

This is my B.Tech. final year project on a Traffic Monitoring System using Python-OpenCV and YOLOv8.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages