Spaces:
Sleeping
Sleeping
| 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 | |
| ```bash | |
| 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: | |
| ```bash | |
| git remote add space https://huggingface.co/spaces/<your-hf-username>/fight-detector | |
| git push space main | |
| ``` | |
| 3. Space builds automatically. URL: `https://huggingface.co/spaces/<your-hf-username>/fight-detector`. | |
| ## Roadmap | |
| - [x] 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 | |