GithubHelp home page GithubHelp logo

askill / video-summary Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 6.0 116.77 MB

A CPU based video summarization and classification tool. Extracts every movement out of a given video, aggregates the extracted changes into movement layers, which can be exported or further analysed and classified..

Python 100.00%
video videosynthesis video-reader video-synopsis

video-summary's Introduction

Video Summary and Classification

Example:

    usage:
    main.py input_video.mp4 output_dir ?config_file.json

docs/demo.gif
What you see above is a 15 second excerpt of a 2 minute overlayed synopsis of a 2.5h video from an on campus web cam.
The synopsis took 40 minutes from start to finish on a 8 core machine and used a maximum of 6Gb of RAM.

However since the contour extraction could be performed on a video stream, the benchmark results show that a single core would be enough to process a video faster than real time.

Heatmap

Benchmark

Below you can find the benchmark results for a 10 minutes clip, with the stacked time per component on the x-axis.
The tests were done on a machine with a Ryzen 3700X with 8 cores 16 threads and 32 Gb of RAM.
On my configuration 1 minutes of of the original Video can be processed in about 20 seconds, the expected processing time is about 1/3 of the orignial video length.

  • CE = Contour Extractor
  • LE = LayerFactory
  • LM = LayerManager
  • EX = Exporter

docs/demo.gif

Configuration

./Application/Config.py

    "min_area": 100,            min area in pixels, of a single contour, smaller is ignored
    "max_area": 9000000,        max area in pixels, of a single contour, larger is ignored
    "threshold": 6,            luminance difference threshold, sensitivity of movement detection
    "resizeWidth": 600,         video is scaled down internally
    "inputPath": None,          overwritten in main.py
    "outputPath": None,         overwritten in main.py
    "maxLayerLength": 5000,     max length of Layer in frames
    "minLayerLength": 10,       min length of Layer in frames
    "tolerance": 100,           max distance (in pixels) between contours to be aggragated into layer
    "maxLength": None,          
    "ttolerance": 60,           number of frames movement can be apart until a new layer is created
    "videoBufferLength": 100,   Buffer Length of Video Reader Componenent
    "LayersPerContour": 2,      number of layers a single contour can belong to
    "avgNum": 10,               number of images that should be averaged before calculating the difference 
                                (computationally expensive, needed in outdoor scenarios due to clouds, leaves moving in the wind ...)

notes:

optional:

install tensorflow==1.15.0 and tensorflow-gpu==1.15.0, cuda 10.2 and 10.0, copy missing files from 10.0 to 10.2, restart computer, set maximum vram

video-summary's People

Contributors

askill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.