Benchmarks

PySceneDetect's detectors are benchmarked for accuracy against public shot-boundary-detection corpora. Scoring follows the TRECVID-SBD convention (greedy 1-to-1 nearest-neighbor matching with a configurable frame tolerance for hard cuts; point-in-interval matching for fades), so numbers are comparable to published results. The benchmark harness, datasets, and full raw results live in benchmark/ on GitHub.

Three datasets are used, chosen to cover very different content:

  • BBC Planet Earth - 11 long-form broadcast episodes (hard cuts only)
  • AutoShot - short-form web/user-generated clips (hard cuts only)
  • ClipShots - 500 short web clips with hard cuts and typed 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, strict frame-exact matching (tolerance 0). F1 cells are shaded by score.

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/from black, not shot-to-shot transitions; near-zero hard-cut scores are expected. Included for completeness.

Parameter sweeps

Beyond the default values, a sweep over each detector's key parameters shows how accuracy per dataset changes:

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 each dataset's optimum within the shown parameter slice. Long-form broadcast content (BBC) generally prefers lower thresholds than short web clips (ClipShots), so the defaults aim for a robust 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 default
AdaptiveDetector76.3adaptive_threshold=3.5, window_width=3, min_scene_len=0.6sadaptive_threshold=3.0, window_width=2
ContentDetector73.4threshold=31, min_scene_len=0.6sthreshold=27
HashDetector69.8threshold=0.35, size=8threshold=0.395, size=16
HistogramDetector66.3threshold=0.20, bins=128threshold=0.05, bins=256

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

Benchmarking

See benchmark/README.md for dataset download instructions and 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"