metal3d / keras-video-generators

Keras generators to generate sequences from videos as input
MIT License
99 stars 32 forks source link
keras keras-generators machine-learning machinelearning python3 tensorflow

Codacy Badge PyPI version Build Status

Keras Sequence Video Generators

This package offers classes that generate sequences of frames from video files using Keras (officially included in TensorFlow as of the 2.0 release). The resulting frame sequences work with the Time Distributed, GRU, LSTM, and other recurrent layers.

See articles:

An provided example of usage can be displayed in nbviewer here.

Requirements are:

TensorFlow 2 works as well. This requirements is not integrated in the setup.py to let you choose the version, or to let you try with other backend. We mean that you will need to install a backend yourself (e.g. pip install tensorflow)

If you want to compile the package, you need:

Installation

You can install the package via pip:

pip install keras-video-generators

If you want to build from source, clone the repository then:

python setup.py build

Usage

The module name (keras_video) is different from the installation package name (keras-video-generators). Import the entire module with

import keras_video

or load a single generator:

from keras_video import VideoFrameGenerator

The package contains three generators that inherit the Sequence interface and may be used with model.fit_generator():

Each generator accepts a standard set of parameters:

See the class documentation for all parameters.

Changelog

v1.1.0

v1.0.14

v1.0.13

v1.0.12

v1.0.11

v1.0.10

v1.0.9

v1.0.8

v1.0.7

v1.0.5

v1.0.4