PERSIST: Persistent-State Discrimination for Shot Boundary Detection

BMVC 2026

Tingyu Lin1, Christian Stippel1, Armin Dadras1,2, Jakob Zenzmaier3, Florian Kleber1, Wolfgang Aigner2, Robert Sablatnig1

1 Computer Vision Lab, TU Wien
2 Institute of Creative\Media/Technologies, St. Pölten University of Applied Sciences
3 Ludwig Boltzmann Institute for Digital History

Shot boundary detection for video files and decoded frames. Get shot intervals, cut/gradual transitions and optional per-frame scores with one model.

Project page Code Paper

Quick start

Install PERSIST and run it on a video (Python 3.10+):

python -m pip install "git+https://github.com/linty5/PERSIST.git@v1.1.0"
persist_sbd video.mp4

The model downloads automatically on first use and is cached for later runs. Results are saved to video.persist.json. CUDA is used when available; otherwise, PERSIST runs on CPU.

Python inputs and outputs

import persist_sbd

model = persist_sbd.load()
result = model.detect("video.mp4")
print(result.shots)  # [(first_frame, last_frame), ...]
result.save_json("shots.json")

Reuse model for more videos. For decoded RGB uint8 frames, use model.detect_frames(frames, fps=25).

Frame indices start at zero and interval endpoints are inclusive.

Folders and per-frame scores

Process a folder and save JSON and CSV results:

persist_sbd videos/ -o results -f json,csv

Add -r to include subfolders, --skip-existing to resume, or --per-frame to save frame scores in JSON. In Python, use result.save_json("scores.json", per_frame=True).

CPU and offline use

For a smaller CPU-only installation, install CPU PyTorch before PERSIST:

python -m pip install torch --index-url https://download.pytorch.org/whl/cpu

Choose CPU explicitly with persist_sbd video.mp4 --device cpu or persist_sbd.load(device="cpu").

Download the default model in advance, then use cached files without networking:

persist_sbd --download
persist_sbd video.mp4 --local-files-only

The Python equivalent is persist_sbd.load(local_files_only=True). For a local model, keep config.json and model.safetensors in the same folder and use --model ./persist-model or persist_sbd.load("./persist-model").

Model and defaults

The release includes the paper's seed11, epoch-10 checkpoint, converted to safetensors without changing the model parameters. The inference threshold defaults to 0.5, while the validation-selected threshold of 0.68 is retained in the model configuration for reproducibility.

The model has 13.2M parameters and occupies approximately 53 MB in FP32 safetensors format. Defaults use PyAV decoding and score every frame.

For detailed options and output fields, see the usage guide.

Citation

@inproceedings{lin2026persist,
  author    = {Lin, Tingyu and Stippel, Christian and Dadras, Armin and
               Zenzmaier, Jakob and Kleber, Florian and Aigner, Wolfgang and
               Sablatnig, Robert},
  title     = {{PERSIST}: Persistent-State Discrimination for Shot Boundary Detection},
  booktitle = {Proceedings of the British Machine Vision Conference (BMVC)},
  year      = {2026}
}

License and acknowledgements

The code and released checkpoint use Apache-2.0.

This distribution includes and modifies software from MMAction2. Copyright 2018-2019 Open-MMLab. All rights reserved. Licensed under the Apache License, Version 2.0.

Portions of the dual-rate backbone are adapted from TransNetV2. Copyright (c) 2020 Tomáš Souček. Licensed under the MIT License. The complete license text is available in THIRD_PARTY_LICENSES/TransNetV2-LICENSE.

Downloads last month
169
Safetensors
Model size
13.2M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for linty5/PERSIST