SceneSolver
CCTV Incident Classifier
2 min readupdated
SceneSolver (preethamaleti/crimescenesolver) is an image classification model built to automatically detect and label offenses in closed-circuit television (CCTV) footage. It takes video feed frames as input and classifies them into 6 categories: robbery, explosion, shoplifting, shooting, fighting, or normal action. The model is based on the OpenAI CLIP multimodal architecture (clip-vit-base-patch32), fine-tuned by author preethamaleti with a linear classifier added on top of the visual projection. Unlike the general-purpose base CLIP, this checkpoint is tailored specifically for real outdoor and indoor security camera footage, making it useful for video analytics developers and researchers.
Key features
- Trained on the UCF-Crime dataset with a sample of 64 keyframes per incident and dense frame-by-frame annotations.
- Supports 6 target classes: Robbery, Explosion, Shoplifting, Shooting, Fighting, and Normal Action.
- The repository includes pre-trained
best_model.pthweights (849 MB) and alabel_encoder.ptfile for mapping outputs to class names. - Runs via standard PyTorch and
transformerslibraries on GPU or CPU.
What you can do
- Integrate it into a CCTV archive primary triage pipeline to quickly search for alarm events.
- Use it in academic projects on anomaly detection and automated video report generation.
Example
import torch
from transformers import CLIPModel
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(repo_id="preethamaleti/crimescenesolver", filename="best_model.pth")
encoder_path = hf_hub_download(repo_id="preethamaleti/crimescenesolver", filename="label_encoder.pt")
label_encoder = torch.load(encoder_path, map_location="cpu", weights_only=False)
model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
model.load_state_dict(torch.load(model_path, map_location="cpu", weights_only=False), strict=False)Read more
DetailsBase: openai/clip-vit-base-patch32 (MIT license)
Weights file size: 849 MB (VRAM requirements not specified)
Limitations: accuracy may drop in low light, with heavy lens distortion, or when the camera view is obstructed; human review is required for legal and investigative tasks.










Comments