Urban vehicle numbers have grown far faster than the capacity of traffic police to watch every intersection and parking lane, and the result is a steady stream of hit-and-run incidents, wrong-parking, and double-parking cases that pass unrecorded under conventional patrol- and CCTV-based enforcement. This paper describes an Edge AI vehicle-surveillance pipeline built to close that gap while running entirely on low-cost, offline-capable hardware — a laptop or a Raspberry Pi — with no cloud backend and no purpose-built sensors. Vehicles are localised and classified frame by frame with YOLOv8, and a DeepSORT tracker then follows each detected vehicle through the sequence so that its position can be monitored continuously. A collision is inferred when two tracked bounding boxes overlap sharply, measured through Intersection over Union, together with an abrupt motion change captured by Lucas–Kanade optical flow; if the vehicle involved does not remain at the scene within a five-second grace period, the event is recorded as a hit-and-run. Separately, restricted-zone polygons combined with a configurable stay-duration check are used to catch vehicles parked illegally or blocking a live lane. Whenever any of these violations is confirmed, EasyOCR reads the offending number plate, and the system saves a short evidentiary clip, a still image, and a PDF summary before pushing an SMS, an email, and a dashboard notification to the relevant personnel. Implemented purely in Python and OpenCV, the resulting system is inexpensive to deploy at intersections, parking lots, and campus checkpoints.
Introduction
The study proposes an intelligent, real-time traffic surveillance and violation detection system using deep learning and computer vision. With increasing urbanization and vehicle numbers, manual traffic enforcement and conventional CCTV monitoring have become insufficient for detecting violations promptly. The research focuses on three major violations: hit-and-run incidents, wrong parking in restricted areas, and double parking that obstructs traffic flow.
The proposed system aims to overcome the limitations of existing surveillance methods by integrating vehicle detection, tracking, collision analysis, license plate recognition, evidence collection, and automated alerts into a single, affordable solution. Unlike cloud-dependent systems, it is designed to operate locally on standard laptops or Raspberry Pi devices using Python and OpenCV, reducing infrastructure requirements and dependence on continuous internet connectivity.
The literature review examines 12 studies covering edge-based surveillance, vehicle tracking, parking detection, automatic license plate recognition (ALPR), and collision detection. Previous systems demonstrate the usefulness of deep learning but often focus on individual violations, require powerful GPUs, or depend on additional sensors. The proposed research addresses this gap by combining multiple enforcement functions in one edge-friendly pipeline.
Proposed methodology
The system consists of nine interconnected stages:
Video acquisition and preprocessing: OpenCV captures live or recorded video, resizes and normalizes frames, and identifies relevant regions such as traffic lanes and restricted parking zones.
Vehicle detection: YOLOv8 identifies cars, motorcycles, buses, and trucks in each frame, generating bounding boxes, class labels, and confidence scores.
Vehicle tracking: DeepSORT uses motion prediction through Kalman filtering and appearance information to maintain consistent vehicle identities across successive frames.
Collision and hit-and-run detection: Intersection over Union (IoU) measures overlap between tracked vehicles, while Lucas–Kanade optical flow examines sudden changes in motion. When both indicators suggest a collision, the system monitors the involved vehicles for five seconds. A vehicle that leaves rather than remaining at the scene is flagged as a suspected hit-and-run offender.
Parking violation detection: Polygon-defined restricted areas identify wrong parking, while dwell-time checks detect vehicles blocking active lanes alongside already parked vehicles.
Automatic license plate recognition: EasyOCR extracts alphanumeric plate information from the offending vehicle's image and attaches it to the incident record.
Evidence collection: The system saves a ten-second video clip, a still image, and a PDF report containing the timestamp, violation type, and recognized registration number.
Real-time alerts: Confirmed incidents trigger SMS notifications through Twilio, emails through SMTP, and in-app alerts through a Flask dashboard.
Dashboard and database: A Flask-based interface displays the camera feed and incident history, while an SQLite database stores violation records for later retrieval.
Key contributions
The primary contribution is the integration of multiple traffic enforcement functions into a unified, locally operated system. By combining YOLOv8, DeepSORT, optical flow, and EasyOCR, the proposed architecture aims to identify vehicles, detect suspicious events, recognize registration plates, preserve supporting evidence, and notify authorities automatically.
Its principal advantages include:
Reduced dependence on manual monitoring and continuous CCTV review.
Real-time detection and reporting of selected traffic violations.
Automatic preservation of incident evidence for investigation.
Lower infrastructure costs through edge-based processing.
Potential applicability to roads, campuses, parking facilities, and other monitored locations.
Conclusion
This paper has set out an Edge AI vehicle-surveillance design that ties YOLOv8 detection, DeepSORT tracking, IoU-and-optical-flow collision analysis, polygon-based parking checks, and EasyOCR plate reading into one pipeline able to catch hit-and-run incidents, wrong parking, and double parking as they happen. Because it keeps a video clip, an image, and a PDF report for every confirmed case and pushes SMS, email, and dashboard alerts out immediately, the design cuts down how much manual watching is needed and gives whoever responds a documented case to act on rather than a vague report. Running end-to-end on Python and OpenCV, on nothing more than a laptop or Raspberry Pi and without cloud servers or dedicated sensors, the system is affordable enough to scale across many sites, and later phases could extend it to red-light running, overspeeding, and finer-grained behaviour-anomaly detection.
References
[1] S. Charran R and R. K. Dubey, \"Edge-AI Perception Node for Cooperative Road-Safety Enforcement and Connected-Vehicle Integration,\" arXiv preprint arXiv:2601.07845, Jan. 2026.
[2] B. A. Patil and S. Ghule, \"Next-Gen Smart Traffic Violation Detection Using Edge AI and IoT for Safer Urban Mobility,\" Int. J. Latest Technol. Eng. Manag. Appl. Sci. (IJLTEMAS), vol. 14, no. 13, pp. 138–142, Oct. 2025. doi: 10.51583/IJLTEMAS.2025.1413SP030.
[3] A. Scandurra et al., \"Next-gen Traffic Surveillance: AI-Assisted Mobile Traffic Violation Detection System,\" arXiv preprint arXiv:2311.16179, Nov. 2023.
[4] N. K. Anisha, M. Prabu, S. P. Krishnendhu, and J. S. Anni, \"DeepYOLO—An Efficient Real-Time Vehicle Detection System Using YOLOv8 and DeepSORT Algorithm,\" in Lecture Notes in Networks and Systems, vol. 1515, Springer, Singapore, Jan. 2026, pp. 1–10. doi: 10.1007/978-981-96-8799-2_12.
[5] D. Djarah, A. Benmakhlouf, G. Zidani, and L. Khettache, \"Online Multi-object Tracking with YOLOv9 and DeepSORT Optimized by Optical Flow,\" Eng. Technol. Appl. Sci. Res., vol. 14, no. 6, pp. 17922–17930, Dec. 2024. doi: 10.48084/etasr.8770.
[6] \"Intelligent Traffic System: YOLOv8 and DeepSORT in Car Detection, Tracking and Counting,\" Int. J. Res. Appl. Sci. Eng. Technol. (IJRASET), vol. 12, Mar. 2024. doi: 10.22214/ijraset.2024.59201.
[7] N. Sharma, S. Baral, M. P. Paing, and R. Chawuthai, \"Parking Time Violation Tracking Using YOLOv8 and Tracking Algorithms,\" Sensors, vol. 23, no. 13, p. 5843, Jun. 2023. doi: 10.3390/s23135843.
[8] S. S. Kathait, A. Kumar, R. Patidar, K. Agrawal, and S. Sawal, \"Computer Vision and Deep Learning Based Approach for Violations Due to Illegal Parking Detection,\" Int. J. Comput. Appl., 2025. doi: 10.5120/ijca2025924477.
[9] \"Advanced Deep Learning Techniques for Automated License Plate Recognition,\" MDPI/PMC, 2024.
[10] \"A Deep Learning-Based System for Automatic License Plate Recognition Using YOLOv12 and PaddleOCR,\" Appl. Sci., vol. 15, no. 14, p. 7833, 2025. doi: 10.3390/app15147833.
[11] V. Adewopo and N. Elsayed, \"Smart City Transportation: Deep Learning Ensemble Approach for Traffic Accident Detection,\" arXiv preprint arXiv:2310.10038, Oct. 2023.
[12] \"Towards a Closer Fusion of Active and Passive Safety: Optical Flow-Based Detection of Vehicle Side Collisions,\" in Proc. IEEE Intelligent Vehicles Symp. (IV), 2011. doi: 10.1109/IVS.2011.5940446.