Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- violence-detection
|
| 5 |
+
- video-classification
|
| 6 |
+
- pytorch
|
| 7 |
+
- uniformerv2
|
| 8 |
+
- clip
|
| 9 |
+
datasets:
|
| 10 |
+
- rwf-2000
|
| 11 |
+
metrics:
|
| 12 |
+
- accuracy
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# CUE-Net: Violence Detection Model
|
| 16 |
+
|
| 17 |
+
## Model Description
|
| 18 |
+
|
| 19 |
+
CUE-Net (CLIP-based UniFormerV2 Enhanced Network) là mô hình phát hiện bạo lực từ video giám sát, được huấn luyện trên bộ dữ liệu RWF-2000.
|
| 20 |
+
|
| 21 |
+
## Architecture
|
| 22 |
+
|
| 23 |
+
- **Backbone**: CLIP ViT-L/14-336
|
| 24 |
+
- **Framework**: UniFormerV2
|
| 25 |
+
- **Input**: 64 frames × 336 × 336
|
| 26 |
+
- **Classes**: 2 (Fight, NonFight)
|
| 27 |
+
- **Parameters**: ~354M
|
| 28 |
+
|
| 29 |
+
## Performance
|
| 30 |
+
|
| 31 |
+
| Metric | Score |
|
| 32 |
+
|--------|-------|
|
| 33 |
+
| Accuracy | 89.50% |
|
| 34 |
+
| F1-Score | 89.48% |
|
| 35 |
+
|
| 36 |
+
## Usage
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
from slowfast.models.build import build_model
|
| 40 |
+
from slowfast.config.defaults import get_cfg
|
| 41 |
+
|
| 42 |
+
cfg = get_cfg()
|
| 43 |
+
cfg.merge_from_file("config.yaml")
|
| 44 |
+
model = build_model(cfg)
|
| 45 |
+
|
| 46 |
+
# Load checkpoint
|
| 47 |
+
checkpoint = torch.load("cuenet_rwf2000_epoch51.pyth")
|
| 48 |
+
model.load_state_dict(checkpoint["model_state"])
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Training Details
|
| 52 |
+
|
| 53 |
+
- Optimizer: AdamW
|
| 54 |
+
- Learning rate: 4e-4
|
| 55 |
+
- Epochs: 51
|
| 56 |
+
- Batch size: 2-4
|