Skip to main content

image and video datasets and models for torch deep learning

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.1-cp39-cp39-win_amd64.whl (984.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

torchvision-0.11.1-cp39-cp39-manylinux2014_aarch64.whl (613.7 kB view details)

Uploaded CPython 3.9

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

Uploaded CPython 3.9

torchvision-0.11.1-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.1-cp38-cp38-win_amd64.whl (984.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

torchvision-0.11.1-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.1-cp37-cp37m-win_amd64.whl (984.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

torchvision-0.11.1-cp37-cp37m-manylinux2014_aarch64.whl (14.7 MB view details)

Uploaded CPython 3.7m

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

Uploaded CPython 3.7m

torchvision-0.11.1-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.1-cp36-cp36m-win_amd64.whl (984.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

torchvision-0.11.1-cp36-cp36m-manylinux2014_aarch64.whl (14.7 MB view details)

Uploaded CPython 3.6m

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

Uploaded CPython 3.6m

torchvision-0.11.1-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.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: torchvision-0.11.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 984.7 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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 11e0b162f7a8ee7fa959b9e0f2a15fb858af0b2e6f79f5a0527db55327241d26
MD5 58187896a97e60b2bbba9f9e262cf3e5
BLAKE2b-256 336aeaaa4e492c4bb90bf4bdde37ba84b97e1ff1ba238981cb8595660d626907

See more details on using hashes here.

File details

Details for the file torchvision-0.11.1-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

  • Download URL: torchvision-0.11.1-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 613.7 kB
  • 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.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8bb26e3856f163d9fe9287ad19105e93368e1c1d70d58101a9370d0acdb12865
MD5 3b9ce2dcb4b09a3d3b881bbc863535a9
BLAKE2b-256 ebca571906a2f847b692448560f89a12f8f55c045fde5b365572e946f4d663b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6ac7aa49f81cdab4176131c3004bc86a5e5525d0be430172c78e6e2bb604e675
MD5 8bf73058eb4c5a0360f89dfa57cd3ce0
BLAKE2b-256 0ee4847aa282d07827b6a7cf8d06ac41d740101b7ee59ab96c5bdb03ff2fe0ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 18f9e1d571be810ee9a4b8604f88748e5eb4e545171f0167ad734bf080eacf2d
MD5 a2f36a0e452e59c80ed00a8bca3585bf
BLAKE2b-256 a9e741f08c8e659fe39e35cb705c4fe2515ce582b81765a1f312c8f721e52f6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 984.6 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.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 99c92a02832e84e51c47e303a76e57e09776abf5009b046e9269ea7387d5aadb
MD5 51938994c589dd1f2c5c0a1d46a7b59b
BLAKE2b-256 1ae69def2abf038b71648b92c9582b4f645517159710c6f54973edf44e780f18

See more details on using hashes here.

File details

Details for the file torchvision-0.11.1-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

  • Download URL: torchvision-0.11.1-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 14.7 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.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5dec0014240f93c17837b37a194c6a35ba99da9c3b7c5b8341f7fb2bcc676e04
MD5 345aa6057b78ad509dac7bf74bf634cf
BLAKE2b-256 970a2314b2db4e3dae2d28c94dec632ea008c483ec2acdadd35087f63e397030

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4e41b0a35587d2284468eddff31642704d4b218ea0e5505bb60881a94d2688e6
MD5 fc5ee9d5f6bb39e14286c4ba9278269b
BLAKE2b-256 8a3ed28ffd98b32b68ec6231a75ade1e2113ae56eb0382dcd7ec721b0fb197c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 73fae784c31a5ec7ddddefe0ba36ff3fac5131dc9c8babae3fab4ea9885b682a
MD5 1353091ddeefe9cd2748315232eaedce
BLAKE2b-256 788bee134fe02512e0eb929cc52e7b9bdaf1a3ee5d4a12ed379028314c20bb5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7d28c1cd3f8f470c5faf46b426969d9db1113aa9414fc5a3056e20c7cf91a746
MD5 7465bcb083f6e0c3d29efc9822747ee5
BLAKE2b-256 acf1cfa0ba5effdb820dd0718dfe6004e08e30ae4a954013999dfe8cd88104f8

See more details on using hashes here.

File details

Details for the file torchvision-0.11.1-cp37-cp37m-manylinux2014_aarch64.whl.

File metadata

  • Download URL: torchvision-0.11.1-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 14.7 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.1-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f0be815759290ad81cafdab17973b040f8317fc59c740ad67948ebb9271e763c
MD5 606e40c9ab3ee584937f2f9735979f09
BLAKE2b-256 2b57476b68f9ac30750d7260c42fe62353a91f53d5579ab004ff62b784313c8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3c1ba63eaf36d8dff7e0326dc61a73dbb100530ad4231c56427002689cada00b
MD5 0b1fc0f7fbb4412157080b0f313c7dd1
BLAKE2b-256 9e70b5ef020510ad84538f7a9509bfdde18c054dcff96010f824898377e53ab0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1fde05a1cc41f1fa3771723aad2435eb745513534209e51b349b009769895586
MD5 5beb533eb6f2a85ae821f95932fad242
BLAKE2b-256 df985f5d6c174eabc0aaabb4427f3c52dfb07ada26e8cb96fcce7ef5df1fa8b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 984.8 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.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 0c3bb474e298f3655f419e0f13a0c1ca0ef89f43e0f3f7b7ef603f3f1728543a
MD5 61e0cd796b5486e734dd176de4d88ea1
BLAKE2b-256 2cc5204af8c57f881a2f33e5a9d89e00d145601a538614dbe1a35ece8add4f32

See more details on using hashes here.

File details

Details for the file torchvision-0.11.1-cp36-cp36m-manylinux2014_aarch64.whl.

File metadata

  • Download URL: torchvision-0.11.1-cp36-cp36m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 14.7 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.1-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 75ea4c021e348315a655b3f94734d9ddaf5650a7ace53759dff38a13469c7cfa
MD5 539b0bc94c1db971cb0b8547622a6b8e
BLAKE2b-256 fcbeec0f152f1a38821a752847e5af6c94839041eba60d4af5fd7fb682024846

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b56285c3da0abd11cdf86cad82c4aebbb57ab6975673a4f87d686c612dda66b7
MD5 ace9fbfa5c59d6f41a2cba7cff5659d6
BLAKE2b-256 1ce6d05bd5325f5c285360609fa7b9beeb9b7b54f052fa73cb95a1833bc06d0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.11.1-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.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 597d82e9b186f59695ea19ff96d4b46b74f0be52227b0a77d7cf9a9d20e6801c
MD5 b9967e6c66d049c0735f55fd669f1c25
BLAKE2b-256 01a531c0ce1c040f03662b2134f0fba31639287f512dcc8a8380b1266890c5b3

See more details on using hashes here.

Supported by

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