Skip to main content

PyTorch video dataset library

Project description

torchvideo

Build Status PyPI versions codecov Documentation Status

A PyTorch library for video-based computer vision tasks. torchvideo provides dataset loaders specialised for video, video frame samplers, and transformations specifically for video.

Get started

Set up an accelerated environment in conda

$ conda env create -f environment.yml -n torchvideo
$ conda activate torchvideo

# The following steps are taken from
# https://docs.fast.ai/performance.html#installation

$ conda uninstall -y --force pillow pil jpeg libtiff
$ pip uninstall -y pillow pil jpeg libtiff
$ conda install -y -c conda-forge libjpeg-turbo
$ CFLAGS="${CFLAGS} -mavx2" pip install --upgrade --no-cache-dir --force-reinstall --no-binary :all: --compile pillow-simd
$ conda install -y jpeg libtiff

NOTE: If the installation of pillow-simd fails, you can try installing GCC from conda-forge and trying the install again:

$ conda install -y gxx_linux-64
$ export CXX=x86_64-conda_cos6-linux-gnu-g++
$ export CC=x86_64-conda_cos6-linux-gnu-gcc
$ CFLAGS="${CFLAGS} -mavx2" pip install --upgrade --no-cache-dir --force-reinstall --no-binary :all: --compile pillow-simd
$ conda install -y jpeg libtiff

If you install any new packages, check that pillow-simd hasn't be overwritten by an alternate pillow install by running:

$ python -c "from PIL import Image; print(Image.PILLOW_VERSION)"

You should see something like

6.0.0.post0

Pillow doesn't release with post suffixes, so if you have post in the version name, it's likely you have pillow-simd installed.

Install torchvideo

$ pip install git+https://github.com/willprice/torchvideo.git@master

Learn how to use torchvideo

Check out the example notebooks, you can launch these on binder without having to install anything locally!

Acknowledgements

Thanks to the following people and projects

  • yjxiong for his work on TSN and publicly available pytorch implementation from which many of the transforms in this project started from.
  • dukebw for his excellent lintel FFmpeg video loading library.
  • hypothesis and the team behind it. This has been used heavily in testing the project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for torchvideo, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size torchvideo-0.0.1.tar.gz (48.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page