A web-based AI system to detect violent events (fights, fire, crashes) in videos using CLIP-based models with real-time alerts.
- π Upload and analyze videos (up to 70MB)
- β¨ Detects violence using OpenAI CLIP model
- πΉ Real-time feed with violence overlay
- π¨ Visual & sound alarms when violence is detected
- π’ Browser notifications
- β»οΈ Motion detection optimization
- π Responsive modern web UI
CV/
cv/
app.py # Flask app
assets/
demo.gif # Demo animation
static/
css/
style.css # Styles
js/
script.js # Frontend logic
templates/
index.html # Web page- Python 3.8+
- pip
- Flask
- opencv-python
- numpy
- torch
- transformers
- pillow
- werkzeug
- Run the server
python app.py- Visit in your browser
http://127.0.0.1:5000/
- Upload a video
- Max size: 70MB
- Wait for analysis to complete
- Watch for alerts
- Overlay text
- Sound + visual warnings
- Notification popup
CLIP Model by OpenAI is used for zero-shot classification.
Motion Detection reduces unnecessary frame classification.
Frontend Alerts via JS + HTML5 Audio + Notification API.
Stateless Design: Suitable for further scaling and microservice use.
π Role-based access
βοΈ Cloud storage
π Admin dashboards
π Law enforcement integration
π₯ Multi-camera support
β¨ Made with passion by Raghuraam β¨
