๐Ÿšจ Smart Violence Alert System (SVAS) Team Member: Aditanshu Bhardwaj Mishra Project Type: AI + Computer Vision + Real-Time Alert System Hackathon Submission Category: Safety & Surveillance / Smart Cities

๐Ÿง  Problem Statement How can we use AI to detect violent incidents in public spaces and respond in real time?

Public places like schools, streets, and stations often lack quick detection and response to violent behavior. Manual surveillance is slow, error-prone, and expensive. There is a need for a smart, automated system that can detect violence from CCTV feeds and trigger emergency responses immediately.

๐ŸŽฏ Solution Overview The Smart Violence Alert System (SVAS) is an AI-powered solution that:

Detects real-life violence from video feeds using deep learning

Triggers an automatic alert and simulates an emergency call

Locates the incident using IP-based geolocation

Displays the location on a live interactive map

Provides a simple, responsive Streamlit-based frontend

๐Ÿ’ก Key Features Real-time video analysis using webcam or uploaded videos

Pretrained ResNet18 model for spatial feature extraction

LSTM model for temporal sequence classification

Streamlit app for end-user interaction and monitoring

Geocoder library to fetch location from IP

Folium to display incident location on a live map

Emergency call simulation for rapid response testing

๐Ÿงช Dataset We used the Real-Life Violence Situations Dataset from Kaggle. It contains two labeled categories:

Violence

NonViolence

Each clip contains real-world surveillance scenarios with human activity.

๐Ÿ”ง Technologies Used Backend & ML:

Python

PyTorch

OpenCV

Torchvision (ResNet18)

LSTM (Custom implementation)

Frontend & Visualization:

Streamlit

Folium

Geocoder

NumPy, Matplotlib

๐Ÿ› ๏ธ Project Structure bash Copy Edit ๐Ÿ“ models/ โ””โ”€โ”€ model_def.py # ResNet18 + LSTM model definition

๐Ÿ“ utils/ โ”œโ”€โ”€ feature_extractor.py # Extracts and saves frame features โ””โ”€โ”€ detection.py # Performs violence prediction

๐Ÿ“ services/ โ”œโ”€โ”€ call_service.py # Simulates emergency call โ””โ”€โ”€ location_service.py # Fetches user's location from IP

๐Ÿ“„ app.py # Streamlit frontend ๐Ÿ“„ violence_detection.ipynb # Jupyter notebook for training ๐Ÿš€ How It Works User uploads a video or enables the webcam.

Frames are extracted and passed through the CNN (ResNet18).

Feature sequences are processed by the LSTM model.

If violence is detected:

An emergency call is simulated.

IP location is fetched.

Location is displayed on a live map.

The interface shows results and summary of detection.

๐Ÿ“ˆ Results High test accuracy in detecting violent sequences

Robust frame-by-frame prediction

Quick alert generation and mapping

Modular, scalable codebase for future expansion

๐ŸŒ Real-World Applications Smart surveillance in public spaces, metros, malls, and campuses

Crowd monitoring during protests or public events

Domestic or institutional safety where violence detection is critical

๐Ÿ”ฎ Future Scope Integrate with real-time IP CCTV streams

Add audio analysis for screaming or panic sounds

Connect with real control rooms via APIs

Use YOLOv8 or transformers for more complex scene understanding

๐Ÿ™Œ Conclusion SVAS is a real-time, AI-powered violence detection system designed for public safety. It combines deep learning, computer vision, and live alerting to bring security one step closer to automation.

Built With

Share this project:

Updates

Submission history