CoolFace
Modelpublic

Manas-Maahir/violence-detection-yolov26

sourceHugging Faceagpl-3.0updated 3mo agoView on Hugging Face
0likes41downloads
Model Card

Violence Detection — YOLOv26-s

A single-class object detector that localizes violence in images/video frames. Fine-tuned from Ultralytics yolo26s.pt (COCO-pretrained).

Model details

ArchitectureYOLOv26-s (Ultralytics), task: detect
Base weightsyolo26s.pt (COCO-pretrained)
Classes1 — Violence
Input size512 × 512
Training20 epochs, batch 12, cosine LR, AMP
FrameworkUltralytics 8.4.12

Evaluation (validation set)

MetricValue
mAP@500.928
mAP@50-950.901
Precision0.918
Recall0.784

Training data

Trained on a custom YOLO-format dataset derived from surveillance/anomaly sources. The dataset-preparation scripts reference:

  • —ShanghaiTech Campus anomaly dataset
  • —UCF-Crime dataset
⚠️ These source datasets are released under their own academic/research-use terms and are not redistributed here. Only the fine-tuned weights are shared. Verify you have the right to use this model for your use case.

Usage

python
from ultralytics import YOLO

model = YOLO("best.pt")
results = model("image.jpg")          # or a video / webcam stream

for r in results:
    r.show()                           # display detections
    print(r.boxes.xyxy, r.boxes.conf)  # boxes + confidence

License

This model is derived from Ultralytics YOLO, which is AGPL-3.0. The weights are therefore distributed under AGPL-3.0. For closed-source/commercial use, obtain an Ultralytics Enterprise License.

Limitations

  • —Single-class detector — flags "violence" regions only; no fine-grained action labels.
  • —Trained on surveillance-style footage; may not generalize to other domains.
  • —Not validated for safety-critical or real-world deployment. Human review required.