All Projects → Breakthrough → Pyscenedetect

Breakthrough / Pyscenedetect

Licence: other
🎥 Python and OpenCV-based scene cut/transition detection program & library.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pyscenedetect

Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (-62.43%)
Mutual labels:  opencv, image-processing, video-processing
Tensorflow object counting api
🚀 The TensorFlow Object Counting API is an open source framework built on top of TensorFlow and Keras that makes it easy to develop object counting systems!
Stars: ✭ 956 (-20.53%)
Mutual labels:  opencv, image-processing
Metalpetal
A GPU accelerated image and video processing framework built on Metal.
Stars: ✭ 907 (-24.61%)
Mutual labels:  image-processing, video-processing
Grabcutweb
Full web grabcut example using opencvjs
Stars: ✭ 40 (-96.67%)
Mutual labels:  opencv, image-processing
Vpp
Video++, a C++14 high performance video and image processing library.
Stars: ✭ 655 (-45.55%)
Mutual labels:  image-processing, video-processing
Road Detection And Tracking
Involves the OpenCV based C++ implementation to detect and track roads for almost realtime performance
Stars: ✭ 17 (-98.59%)
Mutual labels:  opencv, image-processing
Opencv Tutorials
Tutorials for learning OpenCV in Python from Scratch
Stars: ✭ 36 (-97.01%)
Mutual labels:  opencv, image-processing
Dokai
Collection of Docker images for ML/DL and video processing projects
Stars: ✭ 58 (-95.18%)
Mutual labels:  opencv, video-processing
Opencv Face Filters
Snapchat-like Face Filters in OpenCV
Stars: ✭ 51 (-95.76%)
Mutual labels:  opencv, image-processing
Facer
Simple (🤞) face averaging (🙂) in Python (🐍)
Stars: ✭ 49 (-95.93%)
Mutual labels:  opencv, image-processing
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (-51.62%)
Mutual labels:  opencv, image-processing
Colorfilters
Image thresholding in multiple colorspaces.
Stars: ✭ 60 (-95.01%)
Mutual labels:  opencv, image-processing
Qupath
QuPath - Bioimage analysis & digital pathology
Stars: ✭ 503 (-58.19%)
Mutual labels:  opencv, image-processing
Prlib
Pre-Recognition Library - library with algorithms for improving OCR quality.
Stars: ✭ 18 (-98.5%)
Mutual labels:  opencv, image-processing
Tiler
Tiler is a tool to create an image using all kinds of other smaller images (tiles). It is different from other mosaic tools since it can adapt to tiles with multiple shapes and sizes (i.e. not limited to squares).
Stars: ✭ 4,681 (+289.11%)
Mutual labels:  opencv, image-processing
Graph Based Image Segmentation
Implementation of efficient graph-based image segmentation as proposed by Felzenswalb and Huttenlocher [1] that can be used to generate oversegmentations.
Stars: ✭ 31 (-97.42%)
Mutual labels:  opencv, image-processing
Gocv
Go package for computer vision using OpenCV 4 and beyond.
Stars: ✭ 4,511 (+274.98%)
Mutual labels:  opencv, image-processing
Pycair
Content aware image resizing
Stars: ✭ 425 (-64.67%)
Mutual labels:  opencv, image-processing
Seeds Revised
Implementation of the superpixel algorithm called SEEDS [1].
Stars: ✭ 48 (-96.01%)
Mutual labels:  opencv, image-processing
Catt
Detecting the temperature from an infrared image
Stars: ✭ 60 (-95.01%)
Mutual labels:  opencv, image-processing

PySceneDetect

Video Scene Cut Detection and Analysis Tool

Build Status PyPI Status PyPI Version PyPI License

Latest Release: v0.5.5 (January 17, 2021)

Main Webpage: py.scenedetect.com

Documentation: manual.scenedetect.com

Discord: https://discord.gg/H83HbJngk7


Quick Install: To install PySceneDetect via pip with all dependencies:

pip install scenedetect[opencv]

For servers, you can use the headless (non-GUI) version of OpenCV by installing scenedetect[opencv-headless]. To enable video splitting support, you will also need to have mkvmerge or ffmpeg installed - see the documentation on Video Splitting Support for details.

Requires Python modules click, numpy, OpenCV cv2, and (optional) tqdm for displaying progress. For details, see the dependencies on the downloads page.


Quick Start (Command Line):

Split the input video wherever a new scene is detected:

scenedetect -i video.mp4 detect-content split-video

Skip the first 10 seconds of the input video, and output a list of scenes to the terminal:

scenedetect -i video.mp4 time -s 10s detect-content list-scenes

To show a summary of all other options and commands:

scenedetect help

You can find more examples on the website or in the manual.

Quick Start (Python API):

In the code example below, we create a function find_scenes() which will load a video, detect the scenes, and return a list of tuples containing the (start, end) timecodes of each detected scene. Note that you can modify the threshold argument to modify the sensitivity of the scene detection.

# Standard PySceneDetect imports:
from scenedetect import VideoManager
from scenedetect import SceneManager

# For content-aware scene detection:
from scenedetect.detectors import ContentDetector

def find_scenes(video_path, threshold=30.0):
    # Create our video & scene managers, then add the detector.
    video_manager = VideoManager([video_path])
    scene_manager = SceneManager()
    scene_manager.add_detector(
        ContentDetector(threshold=threshold))

    # Improve processing speed by downscaling before processing.
    video_manager.set_downscale_factor()

    # Start the video manager and perform the scene detection.
    video_manager.start()
    scene_manager.detect_scenes(frame_source=video_manager)

    # Each returned scene is a tuple of the (start, end) timecode.
    return scene_manager.get_scene_list()

To get started, try printing the result from calling find_scenes on a small video clip:

    scenes = find_scenes('video.mp4')
    print(scenes)

See the manual for the full PySceneDetect API documentation.


PySceneDetect is a command-line tool and Python library, which uses OpenCV to analyze a video to find scene changes or cuts. If ffmpeg or mkvmerge is installed, the video can also be split into scenes automatically. A frame-by-frame analysis can also be generated for a video, to help with determining optimal threshold values or detecting patterns/other analysis methods for a particular video. See the Usage documentation for details.

There are two main detection methods PySceneDetect uses: detect-threshold (comparing each frame to a set black level, useful for detecting cuts and fades to/from black), and detect-content (compares each frame sequentially looking for changes in content, useful for detecting fast cuts between video scenes, although slower to process). Each mode has slightly different parameters, and is described in detail below.

In general, use detect-threshold mode if you want to detect scene boundaries using fades/cuts in/out to black. If the video uses a lot of fast cuts between content, and has no well-defined scene boundaries, you should use the detect-content mode. Once you know what detection mode to use, you can try the parameters recommended below, or generate a statistics file (using the -s / --statsfile flag) in order to determine the correct paramters - specifically, the proper threshold value.

Note that PySceneDetect is currently in beta; see Current Features & Roadmap below for details. For help or other issues, you can join the official PySceneDetect Discord Server, submit an issue/bug report here on Github, or contact me via my website.

Usage

Current Features & Roadmap

You can view the latest features and version roadmap on Readthedocs. See docs/changelog.md for a list of changes in each version, or visit the Releases page to download a specific version. Feel free to submit any bugs/issues or feature requests to the Issue Tracker.

Additional features being planned or in development can be found here (tagged as feature) in the issue tracker. You can also find additional information about PySceneDetect at http://www.bcastell.com/projects/PySceneDetect/.


Licensed under BSD 3-Clause (see the LICENSE file for details).

Copyright (C) 2014-2021 Brandon Castellano. All rights reserved.

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].