Skip to main content

image and video datasets and models for torch deep learning

Reason this release was yanked:

Dependency issue, depends on a version of torch that does not exist on pypi

Project description

torchvision

https://pepy.tech/badge/torchvision https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchvision%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v

The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.

Installation

We recommend Anaconda as Python package management system. Please refer to pytorch.org for the detail of PyTorch (torch) installation. The following is the corresponding torchvision versions and supported Python versions.

torch

torchvision

python

main / nightly

main / nightly

>=3.6, <=3.9

1.9.0

0.10.0

>=3.6, <=3.9

1.8.1

0.9.1

>=3.6, <=3.9

1.8.0

0.9.0

>=3.6, <=3.9

1.7.1

0.8.2

>=3.6, <=3.9

1.7.0

0.8.1

>=3.6, <=3.8

1.7.0

0.8.0

>=3.6, <=3.8

1.6.0

0.7.0

>=3.6, <=3.8

1.5.1

0.6.1

>=3.5, <=3.8

1.5.0

0.6.0

>=3.5, <=3.8

1.4.0

0.5.0

==2.7, >=3.5, <=3.8

1.3.1

0.4.2

==2.7, >=3.5, <=3.7

1.3.0

0.4.1

==2.7, >=3.5, <=3.7

1.2.0

0.4.0

==2.7, >=3.5, <=3.7

1.1.0

0.3.0

==2.7, >=3.5, <=3.7

<=1.0.1

0.2.2

==2.7, >=3.5, <=3.7

Anaconda:

conda install torchvision -c pytorch

pip:

pip install torchvision

From source:

python setup.py install
# or, for OSX
# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

In case building TorchVision from source fails, install the nightly version of PyTorch following the linked guide on the contributing page and retry the install.

By default, GPU support is built if CUDA is found and torch.cuda.is_available() is true. It’s possible to force building GPU support by setting FORCE_CUDA=1 environment variable, which is useful when building a docker image.

Image Backend

Torchvision currently supports the following image backends:

  • Pillow (default)

  • Pillow-SIMD - a much faster drop-in replacement for Pillow with SIMD. If installed will be used as the default.

  • accimage - if installed can be activated by calling torchvision.set_image_backend('accimage')

  • libpng - can be installed via conda conda install libpng or any of the package managers for debian-based and RHEL-based Linux distributions.

  • libjpeg - can be installed via conda conda install jpeg or any of the package managers for debian-based and RHEL-based Linux distributions. libjpeg-turbo can be used as well.

Notes: libpng and libjpeg must be available at compilation time in order to be available. Make sure that it is available on the standard library locations, otherwise, add the include and library paths in the environment variables TORCHVISION_INCLUDE and TORCHVISION_LIBRARY, respectively.

Video Backend

Torchvision currently supports the following video backends:

  • [pyav](https://github.com/PyAV-Org/PyAV) (default) - Pythonic binding for ffmpeg libraries.

  • video_reader - This needs ffmpeg to be installed and torchvision to be built from source. There shouldn’t be any conflicting version of ffmpeg installed. Currently, this is only supported on Linux.

conda install -c conda-forge ffmpeg
python setup.py install

Using the models on C++

TorchVision provides an example project for how to use the models on C++ using JIT Script.

Installation From source:

mkdir build
cd build
# Add -DWITH_CUDA=on support for the CUDA if needed
cmake ..
make
make install

Once installed, the library can be accessed in cmake (after properly configuring CMAKE_PREFIX_PATH) via the TorchVision::TorchVision target:

find_package(TorchVision REQUIRED)
target_link_libraries(my-target PUBLIC TorchVision::TorchVision)

The TorchVision package will also automatically look for the Torch package and add it as a dependency to my-target, so make sure that it is also available to cmake via the CMAKE_PREFIX_PATH.

For an example setup, take a look at examples/cpp/hello_world.

TorchVision Operators

In order to get the torchvision operators registered with torch (eg. for the JIT), all you need to do is to ensure that you #include <torchvision/vision.h> in your project.

Documentation

You can find the API documentation on the pytorch website: https://pytorch.org/vision/stable/index.html

Contributing

See the CONTRIBUTING file for how to help out.

Disclaimer on Datasets

This is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset’s license.

If you’re a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community!

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

torchvision-0.11.0-cp39-cp39-win_amd64.whl (984.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

torchvision-0.11.0-cp39-cp39-manylinux1_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.9

torchvision-0.11.0-cp39-cp39-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

torchvision-0.11.0-cp38-cp38-win_amd64.whl (984.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

torchvision-0.11.0-cp38-cp38-manylinux1_x86_64.whl (23.3 MB view details)

Uploaded CPython 3.8

torchvision-0.11.0-cp38-cp38-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

torchvision-0.11.0-cp37-cp37m-win_amd64.whl (984.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

torchvision-0.11.0-cp37-cp37m-manylinux1_x86_64.whl (23.3 MB view details)

Uploaded CPython 3.7m

torchvision-0.11.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

torchvision-0.11.0-cp36-cp36m-win_amd64.whl (984.9 kB view details)

Uploaded CPython 3.6m Windows x86-64

torchvision-0.11.0-cp36-cp36m-manylinux1_x86_64.whl (23.3 MB view details)

Uploaded CPython 3.6m

torchvision-0.11.0-cp36-cp36m-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file torchvision-0.11.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 984.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d5b7a9e9bc37e4fc085a4e62af66aaec10af6241f81398ab09ba757fa9518e93
MD5 89cae14a56937b5c3ed9e8e2df496bce
BLAKE2b-256 096662bafe8e9e0d856f908e1b00ee5b43285e5c338eeb5e75fa9054d016165b

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 23.2 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 707b86c2cc2cd44361c741b22e065c942e5a3d54e40ae0f6098c5a321a213070
MD5 aa6372091107a201220c765142c554a1
BLAKE2b-256 284f87ed0d9459149ab506e6a45c23ba188983eeeb86407e70813be2c2b40ab2

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cdcf8e5ac8382f1a6331da7b04f0eef783e2fcf03f96baf30fcd0dea7c95bf3f
MD5 52ed25f07aed0816f354384de1c0faa0
BLAKE2b-256 dcfc89117041425c5336ccfb088a94c58837d1a566fc99c390ac07146abe13a4

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 984.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0ef0f5fe5c247610adcda8532967e58ff3ae08b9e13b7d0468b8847d7865ff0d
MD5 d09d867d075cfa7700531daf9d8781d2
BLAKE2b-256 bbd39bd258b669f30a7bd9803f63e04b95530fcfa80039d8af817dc89945c757

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 23.3 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 de8b520f4ae872e8399aa7f4885c8998a8dd2b7d35bcf48ecbc700f05ef0261a
MD5 e14a9e81781de121a62d15beab635113
BLAKE2b-256 8d2678230f895a1a6cfba22cbf088abf5d3ab5ef0fe29ea0a6a741ec3a633a2e

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 764c66bd378caf0dad29822e0d60e8135ae33effa2dff068ad644a897f786cec
MD5 655938a907acf7ecd4054c0b99c0a9ef
BLAKE2b-256 8c6d1597d0054a14875784d79922ebcac6b6c27f880ec66bbe8a27297b541bab

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 984.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 29d1927488292fc425a2b419e0b0bebdce2991a49bae1c684aa849390eb7417b
MD5 54cc935d93bb0727624df0ccaa5219ff
BLAKE2b-256 1d205490929839b7c6d7a3ead94002476e16a91685c93a0b9ce21017c14b2616

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 23.3 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e3bf9804bbe59aeadc7360eca04c87c1271fce6ae19b1e4c5e164efeadc550bf
MD5 26fb91bd922bfa2c09c7dbe6e97a5af3
BLAKE2b-256 dab7963a68b759ef93cc390c81e7ee533e9648ad4dbf3ce35085d239708b1041

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9def7d31c1815226903a8966e65cf522fd1d1ddc5c5bd45534bf79e57fab119
MD5 0620ba945d78f7c77f4e13618d70b9b1
BLAKE2b-256 34c4fdfc151301a5f2cac634ee717efb2211eb42061ba75a7c1d8ef834984a1b

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 984.9 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 fba986cbe01f3bae878202ff82ebe74034cd80638f2095821b852016d16a0a13
MD5 bea12ebe8108e590ba3a9f089873cffd
BLAKE2b-256 f09d8f6d8976987f206eeee67cfb16ccc29858670f4d6be08f701b4e66733d43

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 23.3 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ff5293b59b81bddbbe80d3562fae820f985d7b6571ece6a8370daa6dbc777221
MD5 4e3a6d0f6dbf19ccb83fede032a0d089
BLAKE2b-256 3a0e8ba504796996b6c18eb6dfc70ce71256a3d719744a503f4b71d05adb2393

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.11.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.11.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 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.1

File hashes

Hashes for torchvision-0.11.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a1a7627e6397de7a7190403278c15eb3f177219a9a8147bd56b95e9759be1517
MD5 92076894bb4d8c0e868eda56b5187c84
BLAKE2b-256 f4992b559aace4f7cc68255c9d97f27280c0b0f89e91069bcc870de21ae509d1

See more details on using hashes here.

Provenance

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