Type a keyword to search guides, CLI options, detectors, and FAQs.

Benchmarks

PySceneDetect's detectors are tested for accuracy against three public shot-boundary detection datasets. Scoring follows the TRECVID-SBD convention (greedy 1-to-1 nearest-neighbor matching with a configurable frame tolerance for hard cuts, and point-in-interval matching for fades), so results can be compared directly with published research. The benchmark code, dataset loaders, and result summaries (README.md, SWEEP_REPORT.md) are in benchmark/ on GitHub.

The three datasets cover different types of video:

  • BBC Planet Earth: 11 long-form broadcast episodes (hard cuts only).
  • AutoShot: short web and user-generated clips (hard cuts only).
  • ClipShots: 500 short web clips with hard cuts and gradual transitions.

Accuracy at Default Settings

Grouped bar chart of hard-cut F1 score per detector and dataset at default settings. AdaptiveDetector leads on BBC (92) and AutoShot (74); HistogramDetector trails, dropping to 20 on ClipShots.

Hard cuts with exact frame matching (tolerance 0). F1 cells are shaded by score.

The tables below show scores with the v0.7 defaults. Version 0.7.2 changed the HistogramDetector and HashDetector defaults to the tuned values in Parameter Sweeps.

BBC Planet Earth

DetectorRecallPrecisionF1
AdaptiveDetector87.1296.5591.59
ContentDetector84.7088.7786.69
HashDetector92.3075.5683.10
HistogramDetector89.8472.0379.96
ThresholdDetector *0.060.700.11

AutoShot

DetectorRecallPrecisionF1
AdaptiveDetector70.5977.4673.86
ContentDetector63.4976.1969.26
HashDetector56.4876.1164.84
HistogramDetector63.2753.2357.82
ThresholdDetector *0.7538.641.47

ClipShots (hard cuts)

DetectorRecallPrecisionF1
AdaptiveDetector85.9741.2555.75
ContentDetector81.9342.3655.84
HashDetector81.3430.1443.98
HistogramDetector72.2011.4719.80
ThresholdDetector *0.080.580.14

ClipShots (fades)

DetectorRecallPrecisionF1
AdaptiveDetector13.6598.1223.96
ContentDetector26.0398.0441.14
HashDetector18.7794.5331.33
HistogramDetector69.6781.9975.33
ThresholdDetector *5.6999.2410.77

* ThresholdDetector detects fades to and from black, not hard cuts, so near-zero hard-cut scores are expected. It is included here for completeness.

Parameter Sweeps

Sweeping each detector's main parameters shows how accuracy changes across datasets:

Four small-multiple line charts showing hard-cut F1 at 1-frame tolerance versus threshold for detect-content, detect-adaptive, detect-hash, and detect-hist. Each panel has one line per dataset with a dot at that dataset's optimum; BBC and AutoShot peak at lower thresholds than ClipShots in most panels.

Dots mark the highest score for each dataset in the tested range. Long-form broadcast video (BBC) generally works best at lower thresholds than short web clips (ClipShots), so default settings aim for a balanced middle ground.

Grouped bar chart of hard-cut F1 at 1-frame tolerance after parameter tuning. Bars show the best single cross-dataset parameter set per detector and dataset, a black tick marks the v0.7 default, and a dot marks each dataset's own optimum. HistogramDetector shows the largest gap between default and tuned scores, most dramatically on ClipShots (20 vs 48); for ContentDetector and AdaptiveDetector on BBC the default tick sits slightly above the tuned bar.

Scored by mean hard-cut F1 at 1-frame tolerance across all three datasets:

DetectorBest mean F1Best parametersv0.7.2 defaultv0.7 default
AdaptiveDetector76.3adaptive_threshold=3.5, window_width=3, min_scene_len=0.6sadaptive_threshold=3.0, window_width=2adaptive_threshold=3.0, window_width=2
ContentDetector73.4threshold=31, min_scene_len=0.6sthreshold=27threshold=27
HashDetector69.8threshold=0.35, size=8threshold=0.35, size=8threshold=0.395, size=16
HistogramDetector66.3threshold=0.20, bins=128threshold=0.20, bins=128threshold=0.05, bins=256

Full per-dataset breakdowns are in benchmark/SWEEP_REPORT.md.

Running Benchmarks

See benchmark/README.md for dataset setup instructions and full usage:

# Score one detector on one dataset:
python -m benchmark --detector detect-content --dataset BBC

# Grid sweep over detector parameters:
python -m benchmark.sweep --detector detect-content --dataset BBC \
    --params "threshold=15:35:1;min_scene_len=0.0:1.0:0.1"