This project implements an advanced real-time surveillance system that detects violent activities and automatically alerts authorities with crucial information such as the crime location, time, and images. The system uses state-of-the-art computer vision techniques and machine learning models to achieve 95% accuracy in violence detection.
- Real-time Violence Detection: Detects violent actions in real-time using a custom-trained MobileNetV2 model.
- Automated Alerts: Sends automatic alerts to authorities via Telegram, including relevant crime details (location, time, images).
- Optimized for Low-Light Conditions: Achieved 30% better accuracy in detecting violence in low-light conditions by optimizing the model with Deep Sort tracking and advanced computer vision techniques.
- Self-Learning Rate Algorithm: Utilized a custom self-learning rate algorithm, which improved model efficiency by 25%.
- AWS Integration: Gained expertise in AWS and integrated Big Data analytics to streamline real-time data processing, enhancing system response time and scalability.
Real-time violence detection is essential for improving public safety. By implementing an efficient, scalable solution that can recognize violent actions as they happen, this system offers several advantages:
- Timely Alerts: Reduces response times by automatically notifying authorities with accurate crime details.
- Enhanced Accuracy: The use of MobileNetV2 and a self-learning rate algorithm ensures high accuracy, even in challenging real-world scenarios such as low-light conditions.
- Scalability: Integrated AWS cloud services to handle large-scale data processing and analysis.
- Machine Learning: MobileNetV2 for violence detection, optimized with a custom self-learning rate algorithm.
- Tracking: Deep Sort tracking for improved object tracking and violence event recognition.
- Computer Vision: OpenCV for real-time video processing and image enhancement.
- Cloud: AWS for Big Data analytics, enabling efficient real-time data processing.
- Telegram API: For sending automated alerts to authorities with crime details.
- Programming Language: Python, with libraries like TensorFlow, OpenCV, and scikit-learn.
- MobileNetV2:
- Used as the core model for detecting violent activities in video frames.
- Custom Self-Learning Rate Algorithm: The learning rate adapts based on the training progress, leading to better model efficiency and faster convergence.
- Deep Sort Tracking:
- Integrated Deep Sort for improved object tracking, allowing better identification and tracking of objects involved in violent actions (e.g., weapons, people).
- Nighttime Detection Optimization:
- Applied Computer Vision techniques to enhance detection accuracy in low-light conditions, improving the system's performance by 30%.
- 95% Accuracy: Achieved high detection accuracy for violence in real-time surveillance scenarios.
- 25% Improved Model Efficiency: Custom self-learning rate algorithm optimized the MobileNetV2 model.
- 30% Better Low-Light Detection: Enhanced performance in nighttime conditions using Computer Vision and Deep Sort tracking.
- Scalability: Integrated AWS to handle large-scale data processing for real-time analysis.
-
Clone the repository:
bash
Copy code
git clone https://github.com/faizahkureshi232/violence-detection.git cd violence-detection-system
-
Install the dependencies:
bash
Copy code
pip install -r requirements.txt
-
Set up Telegram Bot:
- Create a bot on Telegram and get your bot token from BotFather.
- Add your bot token and the authorities' Telegram chat ID in the
config.py
file.
-
Install AWS SDK (if using AWS services for data analytics):
bash
Copy code
pip install boto3
-
Set up an AWS account and configure the necessary services for data processing and analytics.
-
Start the Surveillance System:
-
To begin monitoring, use the following command to start the real-time violence detection system:
bash
Copy code
python main.py --input <video_stream_or_file>
-
-
Real-Time Alerting:
-
When violence is detected, the system will automatically send a message to the authorities' Telegram chat with the crime location, time, and images:
bash
Copy code
# Message example: "Violence detected at [Location] at [Time]. Image attached."
-
-
Track and Improve the Model:
- The system continuously trains and improves by adapting the model with a self-learning rate, increasing efficiency over time.
plaintext
Copy code
├── data/ # Data folder containing training images, videos, and model outputs ├── models/ # Folder to store the trained models ├── scripts/ # Python scripts for real-time detection, training, and alerting ├── config.py # Configuration file for Telegram bot and AWS settings ├── README.md # This file └── requirements.txt # List of dependencies
This project is licensed under the MIT License. See the LICENSE
file for details.
Faizah M Kureshi
Creator of the Violence Detection System.