SafeVision is an AI-powered real-time surveillance system designed to detect and prevent potential assaults by actively analyzing CCTV feeds. Unlike traditional CCTV systems that passively record incidents, SafeVision detects suspicious activities and sends real-time alerts to authorities for immediate action.
This project aims to create safer public environments by leveraging computer vision and deep learning models that can recognize aggressive behavior, distress, and abnormal crowd patterns.
⚡ Currently, SafeVision uses YOLOv8 for basic crime detection.
🚧 Future enhancements include integrating advanced models for body language analysis, facial expression recognition, and environmental awareness.
- Real-time monitoring of CCTV video feeds.
- Detects suspicious activities using YOLOv8.
- Sends instant alerts with video snapshots and location data.
- Open-source and modular, welcoming contributions for new AI model integrations.
| Category | Tools/Frameworks Used |
|---|---|
| Backend | Flask |
| Computer Vision | OpenCV |
| Current AI Model | YOLOv8 (Crime Detection) |
| Planned Models | PoseFormer, TokenPose, Swin Transformer, ActionFormer |
| Deployment | Docker (Local Deployment) |
| Alert System | Telegram API (Real-Time Notifications) |
| Frontend (Planned) | Flask-based Web GUI |
git clone https://github.com/your-repo/safevision.git
cd safevision# Create virtual environment
python -m venv venv
# Activate
# For Windows:
venv\Scripts\activate
# For macOS/Linux:
source venv/bin/activatepip install -r requirements.txt(Note: If requirements.txt is not present yet, manually install Flask, OpenCV, and Ultralytics)
pip install flask opencv-python ultralytics/models
└── yolov8n.pt # Pretrained YOLOv8 model for crime detection
/static
├── /css # Styling files
├── /images # Images folder (currently empty)
└── /js # Frontend JavaScript animations
/templates
└── home.html # Main frontend page
app.py # Main Flask backend
LICENSE # License file
README.md # Documentation
python app.pyBy default, the app will run at:
You can now access the SafeVision web interface!
- Place your input videos inside a folder (you can modify
app.pyto fetch camera feeds or videos). - Currently, the detection is handled via YOLOv8.
- Future improvements are encouraged (multi-model integration, dashboards, cloud deployment, etc.)
We welcome contributions to enhance SafeVision!
Here are ways you can contribute:
- Integrate advanced AI models (PoseFormer, Swin Transformer, etc.)
- Improve real-time detection accuracy.
- Enhance the alert system (SMS, Email, additional APIs).
- Build a responsive user interface.
- Add testing, CI/CD pipelines, and documentation.
Please read CONTRIBUTING.md for detailed instructions.
- Integrate body language detection model (PoseFormer).
- Add facial expression recognition (Swin Transformer).
- Implement environment/activity recognition (ActionFormer).
- Build basic dashboard for alerts visualization (Flask UI).
Look for issues labeled "Good First Issue" or "Help Wanted"!
- Full multi-model integration with logical risk evaluation algorithms.
- Real-time mobile app notifications for security officers.
- Edge device compatibility for offline processing.
- Integration with city-wide surveillance infrastructure.
- Metro stations, bus stops, and public transport hubs.
- Shopping malls and public spaces.
- University and school campuses.
- Corporate and workplace security.
This project is licensed under the MIT License.
SafeVision empowers cities, institutions, and organizations to move from passive video surveillance to proactive public safety systems, ensuring faster responses, preventing assaults, and creating safer environments through AI.
🚀 We are at the beginning of an exciting journey.
🛠️ Your contributions can directly make public spaces safer.
🌟 Join us! Improve SafeVision together!