All Projects → albanie → Shot Detection Benchmarks

albanie / Shot Detection Benchmarks

A comparison of ffmpeg, Shotdetect and PySceneDetect for shot transition detection

Projects that are alternatives of or similar to Shot Detection Benchmarks

Dl Visualization
This is the source code for the animations in the series "Visualizing Deep Learning"
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Understaing Datasets Estimators Tfrecords
Try to use tf.estimator and tf.data together to train a cnn model.
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Nipype tutorial
Learn Nipype with these tutorial notebooks - go here to see them online -->
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Python Tutorials
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Data Science Bowl 2018
DATA-SCIENCE-BOWL-2018 Find the nuclei in divergent images to advance medical discovery
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Pythondata
python数据分析代码资料
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Okfn.github.com
Open Knowledge Labs website (and general issue tracker).
Stars: ✭ 75 (-1.32%)
Mutual labels:  jupyter-notebook
Pymc3 quickstart guide
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Tracktor
Python and OpenCV based object tracking software
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Branchynet
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Feature Detection
Oriented FAST and Rotated BRIEF using opencv
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Kelime kok ayirici
Derin Öğrenme Tabanlı - seq2seq - Türkçe için kelime kökü bulma web uygulaması - Turkish Stemmer (tr_stemmer)
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Suspeitando
Projeto de análise de contratos com suspeita de superfaturamento e má qualidade na prestação de serviços.
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Eigenvectors From Eigenvalues
PyTorch implementation comparison of old and new method of determining eigenvectors from eigenvalues.
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Show ast
An IPython notebook plugin for visualizing ASTs.
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Ml2021 Spring
李宏毅 (Hung-Yi Lee) 機器學習 Machine Learning 2021 Spring
Stars: ✭ 69 (-9.21%)
Mutual labels:  jupyter-notebook
Machine Learning For Beginners
Start writing machine learning code in just 10 hours
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Bayesian Machine Learning
Notebooks about Bayesian methods for machine learning
Stars: ✭ 1,202 (+1481.58%)
Mutual labels:  jupyter-notebook
Tutorials 2016
Geophysical Tutorials for 2016
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook
Battle tested
Fully automated python fuzzer built to test if code actually is production ready in seconds.
Stars: ✭ 76 (+0%)
Mutual labels:  jupyter-notebook

Shot Detection Benchmarks

This is a comparison of the shot transition detection performance of FFmpeg (in particular, the ffprobe tool), Shotdetect and PySceneDetect (in content mode).

Data

The test data consists of three youtube videos which were chosen to represent the various kinds of footage that might require shot detection:

The gameshow clip is filmed in a reasonably well-lit environment with crisp shot transitions. The sports clip contains slower shot transitions and a great deal of movement from the players, but fairly constrained camera movements. The movie clip is an action scene with vibrant colors and rapid camera movement. Each video was annotated manually for shot transitions.

Results

For each dataset, the tools are first evaluated with their suggested defaults, then with parameters found through hand tuning. This tuning is done with the intention of maximizing the area under the precision-recall curve, typically by reducing the detection thresholds (see notebooks for chosen parameters).

NOTE: Depending on your application, you might prefer to keep a high precision at the expense of lower recall, in which case the default settings for each tool are reasonable.

TV Gameshow

gameshow results gameshow results - tuned

On the TV gameshow clip (a UK Deal Or No Deal episode), all shot detectors achieve almost perfect precision and recall with their default settings (the ffprobe and PySceneDetect curves lie beneath the Shotdetect curve). The only error they make is caused by some jank in the original footage (visible around 1:02 seconds on the youtube video). The default thresholds were left unchanged.

Sports

sports results sports results - tuned

The sports footage (an international football match) proved considerably more challenging for the shot detectors. With the default settings, the recall for every tool is fairly poor with PySceneDetect slightly outperforming the other tools. With tuning, recall could be increased at the expense of precision.

NOTE: This video was more challenging than the first for a couple of reasons. First, the detectors struggled with the fades between shots which are difficult to detect when statistics are computed between consecutive frames. Second, much of the background was green (the football pitch) so that even when shots changed, the background was still dominated by a single color.

Movie

movie results movie results - tuned

The movie footage (a beach-based battle scene from Troy) was considerably easier than the sports but still more challenging than the TV gameshow. All detectors performed reasonably well, although PySceneDetect struggled with recall. Overall, Shotdetect performed best on this video.

Speed

There are significant differences in the speed of each tool. The following timing benchmarks should be considered approximate since they include minor time costs external to the tools (parsing the output string for the results). Despite this, they give a reasonable indicator of the relative speed of each tool. Note that the videos have the same frame rate (25 fps), but different resolutions (this affects the speed of the tools to different degrees).

Tool Gameshow clip Football clip Movie clip
ffprobe 2.46s 6.9s 4.21s
Shotdetect 21.3s 45.5 20.6s
PySceneDetect 5min 27s 1min 57s 56.8s

Details:

  • The time recorded was the best from 3 runs (see notebooks for details)
  • Hardware: mid 2014-Macbook Pro, 3 GHz Intel Core i7
  • ffprobe is written in C, Shotdetect is written (mostly) in C++ and PySceneDetect is written in Python.
  • Both ffprobe and shotdetect were wrapped in Python calls (adding a marginal time cost)
  • Each run includes the time spent parsing the results from console outputs (should be similar for each tool)
  • The benchmark code was written/run using Python 2.7.10.

Notes

In the cases of both PySceneDetect and ShotDetect, the code was modified slightly to expose the confidence of each shot boundary prediction and print to screen rather save to file to make the speed benchmarks fairer (see here and here for the mods).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].