An AI-powered surveillance system that detects and alerts incidents of physical violence in real-time using computer vision and deep learning.
The Violence Detection System is an AI-powered surveillance solution designed to automatically identify physical violence in real-time using video feeds. It extracts frames from live or recorded videos, processes them using pose estimation to detect human keypoints, and classifies the activity through a deep learning model. When violent behavior is detected, the system triggers visual alerts and logs the incidents with timestamps. A user-friendly dashboard built with Streamlit displays incident summaries and analytical insights such as total incident count and model accuracy. This project aims to enhance public safety in areas like schools, malls, and streets through automated monitoring.s a real-time intelligent surveillance system that detects incidents from camera feeds using pose estimation and alert mechanisms. It enables automated monitoring and quick response in sensitive environments such as campuses, offices, or public spaces.
- Python
- OpenCV
- MediaPipe / Pose Estimation
- NumPy, Matplotlib
- Streamlit
Final Year Project/
│
├── components/ # 📦 UI Components for Streamlit app
│ ├── alert_box.py # 🔔 Displays alert messages (e.g., incident detected)
│ ├── analytics_panel.py # 📊 Shows analytics like total incidents, accuracy, etc.
│ └── incident_cards.py # 🧾 Displays incident summaries in card format
│
├── data/ # 📂 Placeholder for datasets (videos, frames, etc.)
│
├── models/ # 🧠 Pretrained or custom-trained ML/DL models
│
├── src/ # 🛠️ Core logic and model inference scripts
│ └── predictions.py # 🔍 Handles prediction logic using the trained models
│
├── utills/ # 🧰 Utility scripts for data and session handling
│ ├── data_preprocessing.py # 🧼 Cleans and prepares data for training/prediction
│ ├── frame_to_keypoints.py # 🎯 Converts video frames to keypoints for analysis
│ └── session_utill.py # 💾 Manages Streamlit session state
│
├── app.py # 🚀 Main entry point for running the Streamlit web app
│
├── requirements.txt # 📜 Python dependencies required to run the project
- Extract frames from live feed or video.
- Convert each frame to keypoints using pose estimation.
- Preprocess and feed keypoints to trained model.
- Classify actions and detect abnormal incidents.
- Display alerts or analytics on UI.
Follow the steps below to set up the project on your local machine:
- Clone the Repository
git clone https://github.com/Faizan-Kakar/violence-detection-system.git
cd violence-detection-system- Open the project in your preferred IDE (e.g., Visual Studio Code)
- Launch VS code
- Go to File → Open Folder... → Select the cloned project folder.
- Open a terminal inside the IDE
- In VS Code, go to Terminal → New Terminal.
- Install all required dependencies
pip install -r requirements.txtRun the main file
streamlit run app.py- Train on more diverse datasets
- Add real-time database or alert system
Faizan Khan
AI/ML Developer | Final Year Student
LinkedIn • Portfolio