Views
No views yet
| Method | Accuracy | F1 (macro) | AUC-ROC |
|---|---|---|---|
| CLIP zero-shot | 23.2% | 21.0% | 0.77 |
| X-CLIP zero-shot | 17.3% | 13.9% | 0.70 |
| This model | 26.2% | 22.1% | 0.80 |
best_model.pt (~1.2 GB) — checkpoint dict with keys {epoch, model_state_dict, optimizer_state_dict, loss, best_loss}1import torch
2from transformers import XCLIPModel, XCLIPProcessor
3from huggingface_hub import hf_hub_download
4
5model = XCLIPModel.from_pretrained("microsoft/xclip-base-patch16")
6ckpt = torch.load(
7 hf_hub_download("yashppawar/xclip-ucf-crime", "best_model.pt"),
8 weights_only=True,
9)
10model.load_state_dict(ckpt["model_state_dict"])
11model.eval()
12
13processor = XCLIPProcessor.from_pretrained("microsoft/xclip-base-patch16")
14# feed 8 frames of shape (C, H, W) via processor(images=frames, return_tensors="pt")@inproceedings{sultani2018real,
title={Real-world anomaly detection in surveillance videos},
author={Sultani, Waqas and Chen, Chen and Shah, Mubarak},
booktitle={CVPR}, year={2018}
}
@inproceedings{ni2022expanding,
title={Expanding language-image pretrained models for general video recognition},
author={Ni, Bolin and others},
booktitle={ECCV}, year={2022}
}