fight-detector / README.md
fayedd's picture
pin python 3.11
e6a8689 verified
|
Raw
History Blame Contribute Delete
1.12 kB

A newer version of the Gradio SDK is available: 6.26.0

Upgrade
metadata
title: Fight Detector MVP
emoji: 🎥
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
python_version: '3.11'

Fight / Violence Detector — MVP

Zero-shot video action detection using Microsoft X-CLIP. Upload a clip, get a verdict, alerts are logged to SQLite.

Local run

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python app.py

Open http://localhost:7860

Deploy to Hugging Face Spaces

  1. Create a new Space at https://huggingface.co/new-space (SDK: Gradio, hardware: CPU basic — free).
  2. Add the Space as a git remote and push:
git remote add space https://huggingface.co/spaces/<your-hf-username>/fight-detector
git push space main
  1. Space builds automatically. URL: https://huggingface.co/spaces/<your-hf-username>/fight-detector.

Roadmap

  • Zero-shot X-CLIP baseline
  • Fine-tune VideoMAE on RWF-2000 (see notebooks/01_finetune_videomae.ipynb)
  • Swap MODEL_ID in app.py to your fine-tuned model on HF Hub
  • Telegram alerts
  • RTSP / webcam streaming