Skip to content

Raghuraam21/Violence-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Violence Detection System 🚨

A web-based AI system to detect violent events (fights, fire, crashes) in videos using CLIP-based models with real-time alerts.

Demo


🌟 Features

  • πŸ“‚ 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

πŸ“ Project Structure

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

πŸš€ Requirements

  • Python 3.8+
  • pip

πŸ“Š Python Dependencies

  • Flask
  • opencv-python
  • numpy
  • torch
  • transformers
  • pillow
  • werkzeug

πŸ”§ Usage

  1. Run the server
python app.py
  1. Visit in your browser
http://127.0.0.1:5000/
  1. Upload a video
  • Max size: 70MB
  • Wait for analysis to complete
  1. Watch for alerts
  • Overlay text
  • Sound + visual warnings
  • Notification popup

Technical Highlights

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.

βœ… Future enhancements

πŸ” Role-based access

☁️ Cloud storage

πŸ“ˆ Admin dashboards

πŸš” Law enforcement integration

πŸŽ₯ Multi-camera support

✨ Made with passion by Raghuraam ✨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors