๐จ 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
- folium
- geocoder
- git
- google-maps
- ipywidgets
- jupyter-notebook
- kaggle
- lstm
- matplotlib
- numpy
- opencv
- pandas
- python
- pytorch
- resnet18
- scikit-learn
- streamlit
- torchvision
- vs-code
Log in or sign up for Devpost to join the conversation.