SAVRN
Search Contact SAVRN

Open-weight model · Video classification

videomae-violence-detector

by Oleg Radzhabov HappyGook/videomae-violence-detector

This model is a fine-tuned version of MCG-NJU/videomae-base for binary violence classification (violent / non-violent). It builds on Nikeytas/videomae-crime-detector-production-v1, which was itself fine-tuned from videomae-base on a subset of UCF Crime.

Parameters86M
Context
Weights345.0 MB
Licensemit
AccessOpen weights
Monthly Downloads684

Runs On

What it takes to serve videomae-violence-detector (86M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Oleg Radzhabov, published under mit, revision 975dadb8f6d7.

This model is a fine-tuned version of MCG-NJU/videomae-base for binary violence classification (violent / non-violent). It builds on Nikeytas/videomae-crime-detector-production-v1, which was itself fine-tuned from videomae-base on a subset of UCF Crime. Starting from that checkpoint, this model was further fine-tuned on the Bus Violence Dataset to close the domain gap to public-transport surveillance footage. - UCF Crime (jinmang2/ucfcrime) — inherited from the base checkpoint - Bus Violence Dataset (Zenodo) — real moving-bus footage, binary violent / non-violent labels, used for domain-specific fine-tuning Evaluated on a held-out Bus Violence Dataset test split (n = 280). The base…

Read Oleg Radzhabov's full model card

Model Card for Model ID

This model is a fine-tuned version of MCG-NJU/videomae-base for binary violence classification (violent / non-violent).

It builds on Nikeytas/videomae-crime-detector-production-v1, which was itself fine-tuned from videomae-base on a subset of UCF Crime. Starting from that checkpoint, this model was further fine-tuned on the Bus Violence Dataset to close the domain gap to public-transport surveillance footage.

Dataset & Training

Fine-tuned on: - UCF Crime (jinmang2/ucf_crime) — inherited from the base checkpoint - Bus Violence Dataset (Zenodo) — real moving-bus footage, binary violent / non-violent labels, used for domain-specific fine-tuning

Performance

Evaluated on a held-out Bus Violence Dataset test split (n = 280).

Model n Accuracy Error FPR FNR Precision Recall TP TN FP FN
Nikeytas/videomae-crime-detector-production-v1 (zero-shot, no bus-violence fine-tuning) 280 0.48 0.52 0.64 0.40 0.48 0.60 84 50 90 56
This model (fine-tuned on Bus Violence Dataset) 280 0.87 0.13 0.11 0.14 0.88 0.86 120 124 16 20

The base UCF-Crime checkpoint transfers poorly to on-bus footage out of the box (near chance-level accuracy, high false-positive rate), which is consistent with the domain-shift findings reported for transport-surveillance data (illumination changes, vehicle/passenger motion, scrolling backgrounds). Fine-tuning on in-domain bus violence footage substantially improves all metrics.

Quick Start

pip install transformers torch torchvision opencv-python pillow
import torch
from transformers import AutoModelForVideoClassification, AutoProcessor
import cv2
import numpy as np

# Load model and processor
model = AutoModelForVideoClassification.from_pretrained("<your-repo-id>")
processor = AutoProcessor.from_pretrained("<your-repo-id>")

def classify_video(video_path, num_frames=16):
    cap = cv2.VideoCapture(video_path)
    frames = []

    total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
    indices = np.linspace(0, total_frames - 1, num_frames, dtype=int)

    for idx in indices:
        cap.set(cv2.CAP_PROP_POS_FRAMES, idx)
        ret, frame = cap.read()
        if ret:
            frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
            frames.append(frame_rgb)
    cap.release()

    inputs = processor(frames, return_tensors="pt")
    with torch.no_grad():
        outputs = model(**inputs)
        predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
        predicted_class = torch.argmax(predictions, dim=-1).item()
        confidence = predictions[0][predicted_class].item()

    label = "Violent" if predicted_class == 1 else "Non-Violent"
    return label, confidence

video_path = "path/to/your/video.mp4"
prediction, confidence = classify_video(video_path)
print(f"Prediction: {prediction} (Confidence: {confidence:.3f})")

Technical Specifications

  • Base Model: MCG-NJU/videomae-base (via Nikeytas/videomae-crime-detector-production-v1)
  • Architecture: Vision Transformer (ViT) adapted for video
  • Input Resolution: 224x224 pixels per frame
  • Temporal Resolution: 16 frames per video clip
  • Output Classes: 2 (binary: violent / non-violent)
  • Training Framework: HuggingFace Transformers

Configuration

Architecture
VideoMAEForVideoClassification
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Model type
videomae

Identity and Version

Repository
HappyGook/videomae-violence-detector
Publisher
Oleg Radzhabov
Task
Video classification
Modality
Video
Library
Not stated by the source
Parameters
86M parameters
Languages
en
Revision
975dadb8f6d7c5d3119ad40341c3622ee5f8ff43
First published
2026-07-24
Last updated
2026-07-24

Files and Weights

5 files, 345.0 MB in total. The weights are 1 file totalling 345.0 MB in safetensors.

Weights1 file · 345.0 MB
Configuration2 files · 1.2 KB
Documentation1 file · 3.9 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights345.0 MB d849b28ae5cc
config.jsonConfiguration770 B
preprocessor_config.jsonConfiguration415 B
README.mdDocumentation3.9 KB
.gitattributesRepository1.5 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
345.0 MB
Download from Oleg Radzhabov

Released by Oleg Radzhabov through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published345.0 MB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About videomae-violence-detector

How much GPU memory does videomae-violence-detector need?

About 0.2 GB at 16-bit and 0.1 GB at 4-bit: the weights (86M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run videomae-violence-detector on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use videomae-violence-detector commercially?

Yes. videomae-violence-detector is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

Model · Video classification

videomae-base-finetuned-ucf101-subset

Hon Nguyen

This model is a fine-tuned version of MCG-NJU/videomae-base on an unknown dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 5e-05 - trainbatchsize: 8 - evalbatchsize: 8 - lrschedulertype: linear - trainingsteps: 370 - Transformers 5.16.1 - Pytorch 2.14.0+cu126 - Datasets 5.0.1 - Tokenizers 0.23.2

Open weights cc-by-nc-4.0 86M parameters transformers

Model · Video classification

finetuned-ucf101-subset

Hon Nguyen

This model is a fine-tuned version of MCG-NJU/videomae-base on an unknown dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 5e-05 - trainbatchsize: 8 - evalbatchsize: 8 - lrschedulertype: linear - trainingsteps: 370 - Transformers 5.16.1 - Pytorch 2.11.0+cu128 - Datasets 5.0.1 - Tokenizers 0.23.1

Open weights cc-by-nc-4.0 86M parameters transformers

This model is a fine-tuned version of MCG-NJU/videomae-base-finetuned-kinetics on an unknown dataset. It achieves the following results on the evaluation set: The following hyperparameters were used during training: - learningrate: 5e-05 - trainbatchsize: 16 - evalbatchsize: 16 - lrschedulertype: linear - lrschedulerwarmupratio: 0.1 - trainingsteps: 348 - Transformers 4.49.0 - Pytorch 2.6.0+cu126 - Datasets 3.3.2 - Tokenizers 0.21.0

Open weights cc-by-nc-4.0 86M parameters transformers

Model · Video classification

VideoMAEv2-Base

OpenGVLab

VideoMAEv2-Base model pre-trained for 800 epochs in a self-supervised way on UnlabeldHybrid-1M dataset. It was introduced in the paper [[CVPR23]VideoMAE V2: Scaling Video Masked Autoencoders with Dual Masking](https://arxiv.org/abs/2203.12602) by Wang et al. and first released in GitHub. You can use the raw model for video feature extraction. Here is how to use this model to extract a video feature

Open weights cc-by-nc-4.0 86M parameters

Model · Video classification

vi-sign-language-videomae-base

Star Duong

This repository houses a fine-tuned VideoMAE (Base) model optimized for multi-class Vietnamese Sign Language Recognition (VSLR). The model architecture adapts self-supervised video representations to accurately classify short video clips of sign gestures into distinct Vietnamese text labels. The model processes short video sequences by partitioning them into spatiotemporal patches, mapping sequential gestures (such as "Ăn", "Bệnh viện", "Xin lỗi") to their corresponding semantic classes. The training routine was monitored closely across key evaluation metrics to prevent overfitting while maximizing classification accuracy on the validation split. The plot below illustrates the progression…

Open weights mit 86M parameters transformers

VideoMAE model pre-trained for 1600 epochs in a self-supervised way and fine-tuned in a supervised way on Kinetics-400. It was introduced in the paper VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training by Tong et al. and first released in this repository. Disclaimer: The team releasing VideoMAE did not write a model card for this model so this model card has been written by the Hugging Face team. VideoMAE is an extension of Masked Autoencoders (MAE) to video. The architecture of the model is very similar to that of a standard Vision Transformer (ViT), with a decoder on top for predicting pixel values for masked patches. Videos are presented to…

Open weights cc-by-nc-4.0 87M parameters transformers