UVA-Computer-Vision-Lab/OmniShotCut

OmniShotCut is a sensitive and more informative SoTA on Shot Boundary Detection task. (NeurIPS 2026)

OmniShotCut — What It Does

OmniShotCut is a tool that automatically finds where shots change in a video — the moments when one camera angle or scene ends and another begins. This is called shot boundary detection.

It works across many video types: anime, vlogs, games, short-form clips, sports, screen recordings, and more. It can also tell apart two kinds of changes:

  • Sudden jumps — an instant cut from one shot to the next.
  • Transitions — gradual changes like dissolves, fades, and wipes.

It does this with a Shot-Query Transformer, a machine-learning model that looks at the whole video and decides where boundaries are.

How You Use It

  1. Install it with pip install git+https://github.com/UVA-Computer-Vision-Lab/OmniShotCut.git (you also need PyTorch with CUDA and an ffmpeg binary on your system).
  2. Load a model — either from a local checkpoint file or from HuggingFace.
  3. Run inference on a video file, a numpy array, or a torch tensor of frames.

Example:

import omnishotcut
cut_model = omnishotcut.load("uva-cv-lab/OmniShotCut_v1.5", filename="OmniShotCut_ckpt.pth")
ranges = cut_model.inference("video.mp4", mode="clean_shot")

ranges is a list of [start_frame, end_frame] pairs — each pair is one detected shot.

Two Output Modes

  • mode="clean_shot" (default) — returns only clean cuts, no transitions.
  • mode="default" — also returns transitions (dissolves, wipes, fades) with their labels, as intra_labels and inter_labels.

Model Versions

The project offers three trained models:

Model Size Notes
v1.5 (recommended) 52.8M params Best real-world quality — fewer false cuts on continuous camera motion or lighting changes, better recall of dense fast cuts. Drop-in replacement for the paper model.
paper 34.5M params Reproduces the results in the paper (Table 1).
preview 41M params Early preview release.

What Else Is Included

  • A Gradio demo — run python app.py to get a local web interface.
  • A command-line inference script — python inference.py with flags for checkpoint path, input video, overlap window length, and mode. Results save to results.json, with a visualization folder showing colored bars per shot.
  • Online demo on HuggingFace Spaces.

Who Uses It

Several other research projects cite OmniShotCut for preprocessing video data — splitting videos into clean clips, detecting transitions, and segmenting multi-shot videos for training data curation (e.g., Hy-Nomas, DreamX-Creator, Sekai2, ContextMaster, AlayaWorld).

Current Status

  • ✅ Released: paper, inference weights, Gradio demo, pip package, v1.5 weights
  • ⬜ Not yet released: benchmark code, training code, and data curation scripts

Key Requirements

  • Python 3.10 (recommended)
  • PyTorch with CUDA
  • ffmpeg binary on your PATH (used for frame-accurate video decoding)

Input Flexibility

Besides video file paths, inference() accepts raw frame arrays — either numpy or torch tensors of shape (T, H, W, 3) in RGB, with arbitrary height/width (frames are resized internally). This makes it easy to feed frames directly from your own video-loading pipeline.

Related

  • Project
  • Project
  • Project
  • Project
  • Project