Real-Time Traffic Density and Anomaly Monitoring Using YOLOv8, OpenCV and Pattern Recognition for Smart City Applications in Demak

Urban traffic congestion is a persistent issue in medium-sized cities like Demak, leading to delays and potential accidents. This study presents the development of a real-time vehicle density and anomaly detection system using YOLOv8, combined with OpenCV for video analysis, to monitor traffic flow at strategic entry points of Demak City. The system classifies vehicles into four categories (cars, motorcycles, trucks, buses) and determines their direction by detecting crossing lines. A key feature is the recognition of vehicle patterns, particularly the detection of stopped vehicles, flagging anomalies after 30 seconds of stoppage, with tolerance for temporary detection losses. Traffic data is stored in CSV format, enabling periodic analysis and visualization via an interactive graphical user interface (GUI). Evaluation results show the YOLOv8n model achieves 92.5% precision, 88.3% recall, and 89.7% mean average precision ([email protected]), demonstrating improved accuracy and speed over previous YOLO versions. Additionally, the vehicle counting accuracy reaches 94.2% when compared with manual annotations. The proposed system provides a reliable solution for real-time traffic monitoring and early anomaly detection, supporting intelligent transportation systems (ITS) and enabling data-driven traffic management decisions. This research contributes to the advancement of real-time video analytics and pattern recognition for urban traffic control and serves as a scientific reference for the development of smart city infrastructures. Furthermore, this study strengthens the application of pattern recognition in intelligent anomaly detection, providing new insights for researchers in the fields of computer science and informatics.

Institutions

Publication Details

Journal
Jurnal Teknik Informatika (Jutif)
Published
2025-08-18
DOI
https://doi.org/10.52436/1.jutif.2025.6.4.4867
Primary Topic
Legume Nitrogen Fixing Symbiosis
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Real-Time Traffic Density and Anomaly Monitoring Using YOLOv8, OpenCV and Pattern Recognition for Smart City Applications in Demak

Jurnal Teknik Informatika (Jutif)
Legume Nitrogen Fixing Symbiosis
article

Real-Time Traffic Density and Anomaly Monitoring Using YOLOv8, OpenCV and Pattern Recognition for Smart City Applications in Demak

article en

Abstract

Urban traffic congestion is a persistent issue in medium-sized cities like Demak, leading to delays and potential accidents. This study presents the development of a real-time vehicle density and anomaly detection system using YOLOv8, combined with OpenCV for video analysis, to monitor traffic flow at strategic entry points of Demak City. The system classifies vehicles into four categories (cars, motorcycles, trucks, buses) and determines their direction by detecting crossing lines. A key feature is the recognition of vehicle patterns, particularly the detection of stopped vehicles, flagging anomalies after 30 seconds of stoppage, with tolerance for temporary detection losses. Traffic data is stored in CSV format, enabling periodic analysis and visualization via an interactive graphical user interface (GUI). Evaluation results show the YOLOv8n model achieves 92.5% precision, 88.3% recall, and 89.7% mean average precision ([email protected]), demonstrating improved accuracy and speed over previous YOLO versions. Additionally, the vehicle counting accuracy reaches 94.2% when compared with manual annotations. The proposed system provides a reliable solution for real-time traffic monitoring and early anomaly detection, supporting intelligent transportation systems (ITS) and enabling data-driven traffic management decisions. This research contributes to the advancement of real-time video analytics and pattern recognition for urban traffic control and serves as a scientific reference for the development of smart city infrastructures. Furthermore, this study strengthens the application of pattern recognition in intelligent anomaly detection, providing new insights for researchers in the fields of computer science and informatics.

Jurnal Teknik Informatika (Jutif)Vol. 6(4)
Muria Kudus University (ID)
Sustainable cities and communities
Openalex Percentile: Top 34%
Legume Nitrogen Fixing Symbiosis
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Real-Time Traffic Density and Anomaly Monitoring Using YOLOv8, OpenCV and Pattern Recognition for Smart City Applications in Demak · Jurnal Teknik Informatika (Jutif) (2025) | TGRS Research Map | TGRS