The document proposes using machine learning and computer vision to help prevent accidents at hill stations. Cameras would monitor traffic and OpenCV would detect any non-moving vehicles, indicating an accident. If an accident is detected, a signal would alert drivers at entrances to avoid that route until the issue is cleared. The system aims to reduce accidents and traffic issues caused by incidents in hairpin bends. It would use a one-stage detection algorithm in OpenCV to identify vehicles and prevent accidents and congestion.
Accident prevention and traffic control at hill stations ppt.pptx
1. ACCIDENT PREVENTION AND TRAFFIC CONTROL
AT HILL STATIONS USING MACHINE LEARNING
DR. S. TAMIL SELVAN1, MR. N. NITHYANANTHAN 2, MR. K. NANTHAKUMAR 3,
MR. MD RAHIL MURAD4
ASSISTANT PROFESSOR1, STUDENTS 1 2 3, DEPARTMENT OF COMPUTER SCIENCE
AND ENGINEERING.
2. ABSTRACT
Traffic control is difficult in the hill station, because there is no control system in the hill station and there are
a lot of accidents in the hair-pin bend of the hill station.
Any vehicle is stuck or accident in a hair-pin bend means vehicles from both directions are stuck in the hair-
pin bend, then it will lead to heavy traffic as well as wasting time.
Our project will overcome these issues. We proposed using camera sensor’s monitor the traffic in the hill
station.
We use the OpenCV concept to detect break- downs or accidents on vehicles in the hair-bin bend.
Our OpenCV detects the non-moving vehicle in the hair-pin bend. Once detected, then the sensor transfers
the signal to the light sensors in the mountain foundation and top entrance of the mountain Ing, alerting the
vehicle drivers that there is a break down or accident in the hair-bin bend.
After clearing the issues, the sensor again sends the signal to the vehicle drivers.
3. INTRODUCTION
There has been an increase in demand for motor vehicles in the past years and recent statistics show that
nearly1.25 million people die in road accidents which average around 3,287 deaths a day.
All this leads to the conclusion that the rate of deaths is higher in terms of road accidents and very little has
been done over the years.
Several initiatives were taken up by the government but in vain. In the last few years, several projects have
been launched, all having one goal-improving life on motor roads, increasing safety.
At times, people lose their lives just because they do not get the immediate attention required to them by the
medical professionals in time. In this project, the objective is to significantly reduce the amount of time it
takes by the emergency services to reach accident sites by alerting them as soon as an incident occurs.
4. Each day, 1170 accidents at the hill station. Our project will control the traffic and save a lot of people’s lives.
First, we will detect any vehicle break downs or accidents in the hair-pin bend using the OpenCV machine
learning concept to detect break downs or accidents in hair-pin bend.
In OpenCV we use a one-stage detection algorithm for detecting vehicles.
One stage detection algorithm is the best algorithm for detecting the vehicle in the OpenCV machine learning
concept.
5. LITERATURE SURVEY
A REVIEW ON ROAD ACCIDENT IN TRAFFIC SYSTEM USING DATA MINING
TECHNIQUES-MANINDER SINGH, AMRIT KAUR
IOT BASED ACCIDENT PREVENTION SYSTEM USING MACHINE INTELLIGENCE-ARUN
KUMAR SIVARAMAN
ACCIDENT DETECTION AND PREVENTION USING IOT & PYTHON OPENCV-PRAHARSHA
SARMA, UTKARSH KUMAR, C.N.S. VINOTH KUMAR, M. VASIM BABU
6. EXISTING SYSTEM
Existing uses IOT sensors to detect vehicle accidents. The existing one uses a vibration sensor, the ultrasonic
sensor.
The Arduino is linked with various sensors. The Vibration sensor detects the movements of the vehicle and
reports any abnormal reading.
Then the Ultrasonic sensor is a distance measuring sensor to detect any objects near the vehicle, like potholes
or other vehicles.
After the accident has occurred, the GPS and GPRS modules work together.
The camera is always on and checks for driver’s behavior throughout the journey.
7. PROPOSED SYSTEM
Our project detects any non-moving or accidents occurring in the hair-pin bend and the camera sensors
detect the vehicle.
Which uses the OpenCV concept in machine learning. After detecting it, the vehicle transmits the
signal to the light sensor at the top and down of the hill station.
The light sensors alert the driver to not travel along this route. After clearing the traffic again, the light
sensors intimate the drivers, you can travel this way.
8. ONE-STAGE-DETECTION ALGORITHM
Therefore, in practical application, one-stage detection algorithm is generally adopted as the vehicle
detection algorithm.
A neural network with 30 convolution layers is constructed by improving the basic network structure
of DarkNet-53, which is a road vehicle target detection method based on YOLOv3 [19-21]
9. OPENCV
OpenCV (Open-Source Computer Vision Library) is an open-source computer vision and machine
learning software library.
OpenCV was built to provide a common infrastructure for computer vision applications and to
accelerate the use of machine perception in commercial products.
Being an Apache 2 licensed product, OpenCV makes it easy for businesses to utilize and modify the
code. We use OpenCV to detects the non-moving vehicles in the hair-in bend.
We use one stage detection algorithm for detect the vehicle. Its best algorithm for detect vehicle in the
OpenCV machine learning.
10. MODULE REQUIREMENTS
• Module 1: Load YOLOv4 Object Detection Model and COCO
Classes
• Module 2: Object Detection using YOLOv4
• Module 3: Background Subtraction using MOG2
• Module 4: Masking and Annotating the Frame with Detected
Objects
• Module 5: Main Execution Loop
11. MODULE 1
• Reads in the YOLOv4 object detection model and COCO classes
file using OpenCV’s cv2.dnn.readNetFromDarknet() function
and the built-in open() function, respectively.
• Retrieves the index of the “car” class from the COCO classes list
using Python’s built-in list.index() function.
• Sets the input to the network using the net.setInput() function.
• Retrieves the network’s output using the net.forward() function.
12. MODULE 2
• Preprocesses the input frame using the
cv2.dnn.blobFromImage() function.
• Passes the preprocessed frame through the YOLOv4 model
using the net.setInput() and net.forward() functions.
• Iterates through the layer outputs and detections to retrieve the
class ID and confidence score for each detected object.
• Draws a bounding box around each detected car object with a
confidence score greater than 0.5 using the cv2.rectangle()
function.
13. MODULE 3
• Creates a BackgroundSubtractorMOG2 object using the
cv2.createBackgroundSubtractorMOG2() function with specified
parameters.
• Applies the background subtraction algorithm to the input
frame using the subtractor.apply() function.
• Inverts the resulting mask to create a mask of the background
using the cv2.bitwise_not() function.
• Returns the mask of the moving objects in the scene.
14. MODULE 4
• Retrieves the mask of the moving objects in the scene from
Module 3.
• Masks the input frame with the generated mask using the
cv2.bitwise_and() function.
• Annotates the masked frame with bounding boxes around any
detected car objects using the cv2.rectangle() function.
• Returns the annotated frame.
15. MODULE 5
• Reads each frame from the input video using the
cv2.VideoCapture.read() function.
• Applies the background subtraction, object detection, and annotation
modules to each frame.
• Displays the resulting annotated frame on the screen using the
cv2.imshow() function.
• Exits the program when the user presses the “q” key using the
cv2.waitKey() function.
16. CONCLUSION
Finally, we concluded this project detects the non-moving vehicle using the
OpenCV in machine learning. This project controls traffic and save humans life
in accident. This project is easy to handle traffic and the project can be used by
the police or government.
17. REFFERENCE
1. Learning OpenCV 4 Computer Vision with Python 3" by Joseph Howse, Prateek Joshi, and
Michael Beyeler. Chapter 9 covers object detection, including methods for detecting non-moving
objects.
2. "Mastering OpenCV 4 with Python" by Alberto Fernández Villán. Chapter 9 covers object
detection and tracking, including methods for detecting non-moving objects.
3. "OpenCV 3 Computer Vision with Python Cookbook" by Alexey Spizhevoy and Aleksandr
Rybnikov. Chapter 5 covers object detection, including methods for detecting non-moving
objects.
18. 4. "Practical OpenCV 3 Image Processing with Python" by Adrian Rosebrock. Chapter 8 covers
object detection and tracking, including methods for detecting non-moving objects.
5. "OpenCV with Python Blueprints" by Michael Beyeler. Chapter 7 covers object detection and
tracking, including methods for detecting non-moving objects.
6. "OpenCV 4 Computer Vision Application Programming Cookbook" by David Millan Escrivá.
Chapter 5 covers object detection and tracking, including methods for detecting non-moving
objects.
7. "Python Robotics Projects: Build smart and collaborative robots using Python" by Dr. Gareth J. Evans and
others. Chapter 4 covers object detection and tracking for robotics applications, including methods for
detecting non-moving objects.
19. 8. A review on road accident in traffic system using data mining techniques-Maninder Singh, Amrit
kaur
9. Iot Based Accident Prevention System Using Machine Intelligence-Arun kumar sivaraman
10. Detection And Prevention Using Iot & Python OpenCV-Praharsha Sarma, Utkarsh Kumar,
C.N.S. Vinoth Kumar, M. Vasim Babu