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.

Source Distribution

torchvideo-0.0.1.tar.gz (48.3 kB view details)

Uploaded Source

File details

Details for the file torchvideo-0.0.1.tar.gz.

File metadata

  • Download URL: torchvideo-0.0.1.tar.gz
  • Upload date:
  • Size: 48.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3

File hashes

Hashes for torchvideo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dfbf1c85bbe28feebe5ce5f5f16764a9659e271de7fb187fc814ec748d2ed765
MD5 6f2f89fd739ed220ca21225e8f86ef8b
BLAKE2b-256 548bc96892623ce80356e9863a39c6a6a2f1235a397bebfb30dbfefcfb25d4d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page