Real-Time Violence Detection in Surveillance Streams
AVI VERMA · 2025
The escalating threat of violence in public spaces necessitates scalable, automated, and realtime detection systems to enhance urban safety. This study proposes a deep learning-based framework for real-time violence detection, utilizing a fine-tuned DenseNet121 convolutional neural network (CNN) optimized for processing Real-Time Streaming Protocol (RTSP) surveillance streams. Trained on a curated subset of the UCF-Crime dataset comprising 1,000 labeled frames, the model achieves a validation accuracy of 92% and a weighted F1-score of 0.91. Techniques such as data augmentation (e.g., rotation, zoom, shear) and class weight balancing mitigate class imbalance and enhance generalization. The system integrates OpenCV for efficient frame capture, Flask for real-time dashboard visualization, MongoDB for metadata logging, and Dropbox for secure cloud storage. A multithreaded architecture ensures concurrent processing of multiple RTSP streams, maintaining an average performance of 30 fps on a T4 GPU. This end-to-end pipeline demonstrates scalability, robustness, and deployability, offering a practical solution leveraging accessible hardware and open-source tools for smart city surveillance, transportation hubs, and institutional security. By combining deep learning with cloud-aware infrastructure, this work contributes a framework for public safety agencies to enable rapid incident detection and response.