You Only Look Once v5 and Long Short-Term Memory Implementation for Crowd Anomaly Detection - Wardani, Ken Ratri Retno; Chrisandy, Nicholas; Martina, Inge; Heryanto, Hery (Informatika, Universitas Jenderal Soedirman, 2025)
In Indonesia, 116,000 traffic accidents and 370,747 workplace accidents occurred in 2023, emphasizing the urgent need for effective surveillance systems for monitoring crowded areas such as public sidewalks, roads, workplaces, and school hallways. This study introduces a novel approach combining You Only Look Once v5 (YOLOv5) and Long Short-Term Memory (LSTM) networks for crowd anomaly detection. Unlike traditional methods, this hybrid framework utilizes YOLOv5 for precise feature extraction from video frames and LSTM to capture temporal dependencies for detecting anomalous behaviors. The dataset used includes scenes from the Crowd Anomaly Detection UML Dataset, consisting of a 1-minute and 11-second video extracted into 852 images. Hyperparameter tuning was conducted for epochs and learning rates in the YOLOv5 model, as well as for epochs and units in the LSTM model. The proposed framework achieved remarkable results, with 98% accuracy, 100% precision, and 86% F1-Score. However, improvements in class distribution within the training data could enhance model performance further. These findings demonstrate the potential of the proposed method for real-world applications in improving public safety and effective anomaly detection. This research proves that the proposed method which uses separate feature extraction method before detecting anomaly provides a better result in crowd anomaly detection.