Dataset Viewer
Auto-converted to Parquet Duplicate
download_url
stringclasses
1 value
status
stringclasses
1 value
https://huggingface.co/datasets/nmcnamee24/ucf-crime-rgb-flow-features/resolve/main/ucf-crime-rgb-flow.zip?download=true
Available

Video Anomaly Detection Preprocessing

Select the dataset in Subset (UCF-Crime, XD-Violence or UCSD-Ped2), then the model in Split (COMMAND or CLVS). Each available combination contains one ZIP download link. Combinations whose ZIP has not been uploaded show an explicit status and no download link.

Currently available: UCF-Crime / COMMAND, XD-Violence / COMMAND and UCSD-Ped2 / CLVS. The Ped2 CLVS ZIP is specific to UCSD Ped2 and is not a UCF-Crime or XD-Violence preprocessing package.

COMMAND: 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

The Dataset Viewer provides ZIP download links. The COMMAND ZIP preserves the original training and test manifests listed below; the model-named viewer splits form a download catalog, not training or test partitions. validation.json is an audit report, not a validation split. Use the download example below to load the actual RGB/flow features.

  • ucf-crime-rgb-flow.zip: recommended download; one approximately 437 MB archive containing both feature streams, the four split lists, and SHA256SUMS.
  • all_rgbs/: 1,900 RGB .npy feature files.
  • all_flows/: 1,900 matching optical-flow .npy feature 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

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.

CLVS: UCSD Ped2 object features

clvs-ucsd-ped2-yolov3-flownet2.zip contains preprocessing for all 16 nominal training sequences and 12 held-out test sequences in UCSD Ped2. It includes YOLOv3 and FlowNet2 object features (87 values per object), the train/test manifest, binary test-frame labels, extraction metadata, a loading guide and SHA-256 checksums. Raw video and model weights are not included.

These features are our implementation's preprocessing, not an official CLVS author release; exact original preprocessing/checkpoint equivalence has not been established. See the README inside the ZIP for preprocessing choices, sources and applicable upstream terms.

COMMAND: XD-Violence RGB and optical-flow features

xd-violence-command-rgb-flow.zip contains 4,750 paired RGB/flow bags (3,950 training and 800 test videos), split manifests, frame annotation metadata, the loading adapter, extraction provenance and SHA-256 checksums. Each stream is a finite float32 array of shape (32, 1024). Four official training videos are missing from the available raw mirror and are identified inside the package.

This extraction uses separate RGB/flow I3D streams, 32 windows of 16 frames at 25 FPS, a center crop and Farneback flow. It is our compatible preprocessing pipeline, not the official feature release or an exact paper reproduction.

Downloads last month
348