The dataset could not be loaded because the splits use different data file formats, which is not supported. Read more about the splits configuration. Click for more details.
Error code: FileFormatMismatchBetweenSplitsError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
UCF-Crime RGB and Optical-Flow Features
Precomputed paired RGB and optical-flow feature arrays for all 1,900 UCF-Crime videos, organized into 13 anomaly categories and one normal category. Each video has both appearance (RGB) and motion (optical flow) features. Raw videos are not included.
Representation
Each all_rgbs/<category>/<video>.mp4.npy and matching all_flows/<category>/<video>.mp4.npy file is a NumPy float32 array of shape (32, 1024): 32 temporal feature vectors with 1,024 values per stream. Concatenating RGB and flow along the last axis gives (32, 2048). The 3,800 feature files total 498,560,000 bytes (498.56 MB). All arrays were checked for shape, dtype, finite values, and complete pairing before upload.
These are existing upstream extractions, not a new feature-extraction run. The exact extractor checkpoint and temporal pooling settings have not been independently verified. These are temporally pooled embeddings, not raw RGB images, dense optical-flow fields, or frame-level feature sequences. The paired streams can be concatenated for models expecting RGB/flow inputs of shape (32, 2048).
Files and splits
ucf-crime-rgb-flow.zip: recommended download; one approximately 437 MB archive containing both feature streams, the four split lists, andSHA256SUMS.all_rgbs/: 1,900 RGB.npyfeature files.all_flows/: 1,900 matching optical-flow.npyfeature files.train_normal.txt: 810 rows, representing 800 unique videos.train_anomaly.txt: 810 unique training videos.test_normalv2.txt: 150 unique test videos.test_anomalyv2.txt: 140 unique test videos.SHA256SUMS: SHA-256 checksums for all feature arrays and four split lists.validation.json: category counts, split coverage, and repeated-entry details.manifest-provenance.json: upstream URLs, revision, and checksums for the split lists.
The original lists are preserved byte-for-byte. The normal training list contains 10 repeated entries: use unique video paths if each training video should be sampled once. Across the four lists there are 1,900 unique videos, with no overlap between lists and no missing RGB or flow arrays.
Training-list lines contain a relative video path. Normal-test lines contain whitespace-separated path, frame count, and normal label. Anomaly-test lines use path|frame_count|[anomaly boundaries]. Append .npy to the video path and resolve it beneath all_rgbs/ and all_flows/.
Download and load
from huggingface_hub import hf_hub_download
from zipfile import ZipFile
import numpy as np
zip_path = hf_hub_download(
repo_id="nmcnamee24/ucf-crime-rgb-flow-features",
repo_type="dataset",
filename="ucf-crime-rgb-flow.zip",
)
relative_path = "Abuse/Abuse001_x264.mp4.npy"
with ZipFile(zip_path) as archive:
with archive.open(f"all_rgbs/{relative_path}") as file:
rgb = np.load(file, allow_pickle=False)
with archive.open(f"all_flows/{relative_path}") as file:
flow = np.load(file, allow_pickle=False)
features = np.concatenate([rgb, flow], axis=-1)
print(features.shape, features.dtype) # (32, 2048) float32
After extracting the downloaded ZIP, verify file checksums from the extracted directory with shasum -a 256 -c SHA256SUMS on macOS or sha256sum -c SHA256SUMS on Linux.
Sources and attribution
- Feature archive:
UCF_and_Shanghai.zip, linked by the upstream video-anomaly-detection repository through Google Drive. - Split lists: seominseok0429/Real-world-Anomaly-Detection-in-Surveillance-Videos-pytorch, revision
f50608606fff034f45e616bdf8ef9a68a5497744. Exact provenance is included inmanifest-provenance.json. - Original dataset: Waqas Sultani, Chen Chen, and Mubarak Shah, Real-world Anomaly Detection in Surveillance Videos, CVPR 2018.
No new license is granted by this mirror. The upstream feature archive's redistribution license has not been independently established; consult the original dataset and feature providers for applicable terms.
- Downloads last month
- 187