Skip to main content

image and video datasets and models for torch deep learning

Project description

torchvision

https://codecov.io/gh/pytorch/vision/branch/master/graph/badge.svg 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

master / nightly

master / nightly

>=3.6

1.7.1

0.8.2

>=3.6

1.7.0

0.8.1

>=3.6

1.7.0

0.8.0

>=3.6

1.6.0

0.7.0

>=3.6

1.5.1

0.6.1

>=3.5

1.5.0

0.6.0

>=3.5

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.

C++ API

TorchVision also offers a C++ API that contains C++ equivalent of python models.

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/docs/stable/torchvision/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.9.1-cp39-cp39-win_amd64.whl (852.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

torchvision-0.9.1-cp39-cp39-manylinux2014_aarch64.whl (491.2 kB view details)

Uploaded CPython 3.9

torchvision-0.9.1-cp39-cp39-manylinux1_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.9

torchvision-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl (13.1 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

torchvision-0.9.1-cp38-cp38-win_amd64.whl (852.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

torchvision-0.9.1-cp38-cp38-manylinux2014_aarch64.whl (11.8 MB view details)

Uploaded CPython 3.8

torchvision-0.9.1-cp38-cp38-manylinux1_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.8

torchvision-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

torchvision-0.9.1-cp37-cp37m-win_amd64.whl (852.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

torchvision-0.9.1-cp37-cp37m-manylinux2014_aarch64.whl (11.8 MB view details)

Uploaded CPython 3.7m

torchvision-0.9.1-cp37-cp37m-manylinux1_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.7m

torchvision-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

torchvision-0.9.1-cp36-cp36m-win_amd64.whl (852.4 kB view details)

Uploaded CPython 3.6m Windows x86-64

torchvision-0.9.1-cp36-cp36m-manylinux2014_aarch64.whl (11.8 MB view details)

Uploaded CPython 3.6m

torchvision-0.9.1-cp36-cp36m-manylinux1_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.6m

torchvision-0.9.1-cp36-cp36m-macosx_10_9_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 852.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 42bec9b8e8a1dcd478751457191f317f843fa463555c141994c809c4b11ad60d
MD5 49a84dd0fa431819f8a330b9d856077d
BLAKE2b-256 c5bec078b97033551a8ffa7b8cf219b2b97a5d09fd03ce4019c4b896571ba2e2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 491.2 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 92c936584e03dfca39ff31bbc4a4fb54edb08fe8362e75dc08a2fa4b43266068
MD5 5da11355672a642555ceea7bf0cdf088
BLAKE2b-256 506d7eccd5f3ce8195b012407589a53c7dbc6327c8fce2bd895e4debb7a78996

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 46b82b6cdccd2cb982819165b6ddaa097629315377ba6bbf77bdcb02c2e83692
MD5 d058dd77599b87da91ad2234183642df
BLAKE2b-256 577e16ed36f9749db8e229621e046a9fa9db5f3f3476a4417d53684c942acd45

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.1 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 091812c9fa405bef12aca9b9c3e671fcae7c0a4945b68705534ba8a401396ad1
MD5 c6e8ebbc7dd549e8afeaa83064c94f38
BLAKE2b-256 a123ba88f128c5da467bdff5e95a063a81faa4a7fc4821af2f53952786cde93e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 852.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 dda0dcb914bcab1a43f823348736b8b1c926bf1fbe9cbb3be892fdbe2ab6d097
MD5 537795346cabbc427e8ef3ec75ac797f
BLAKE2b-256 350944c1a76f3f4fe7d18294b6c8a3eaff21f33ff1af8e857bc4848d12ad8bda

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 85f21862e504590eb4a77b1d9a1742156a296af55827fb8c82296601922b7ac1
MD5 136db224e44491b563d12ad3df89d0de
BLAKE2b-256 b3a9acc8615fa877eb3ea805053d245a93ed035665d0bea633a1765cef36681c

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.4 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0bfcc3ab99128081bfc9a5c3ab31f5227c4df3b802e6d4217dac104bf5ba8636
MD5 63cb1c19ef8cc4b669aaf3868b435330
BLAKE2b-256 8affa5f5206ffc629b4536a54105214721249e2240416d78089dc01c63d00f50

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d38d0d23c6ce6ba15eba094a9319393e429796ab2bab228fa3b996abc9e33c3f
MD5 50a8da2b1673e4322d3d30bce92f4bfa
BLAKE2b-256 ad8b9b67843f3103c2f571913396cb208d10c34da777d31f2082ab62126ec34e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 852.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 86e4facb1cf4670ab3d67b7a947f0c43cd0805ec269a5e22ad0b82be727bcb3b
MD5 e5bad1fea478fa588319924e5304588b
BLAKE2b-256 4af66a7d86254981c28a1a9230b087db34a5429b66578bbc9d3a70d40ebbeef4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b14b5b7fed0b7dc6245c2608b9fd2262d5b375ba998e097b980a1046683ca7f6
MD5 4497eec205d88e5690e30d44c2c008ec
BLAKE2b-256 4bebca5f87018be47cef7327029e2889357047628ccff52fe7b189771124feb5

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.4 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a1421a26b21b8c098935c3375182470c4c4d99d5e14d81ec3ac14a35e7a85285
MD5 ad853c3c6312aa7f29a3fb328424c1fd
BLAKE2b-256 938a82062a33b5eb7f696bf23f8ccf04bf6fc81d1a4972740fb21c2569ada0a6

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8aa438869e3033cbd8749d041d1ca7beb6171ca9f7f47b42e742fabd6900f8fc
MD5 41116196f83033c47d9c78b0540ac18d
BLAKE2b-256 aa281b27b2fc6aad7ce44dfc9ead604ff72ad61f7c60cbad7abe7726f3ea0af8

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 852.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 99cd75163938b4b3728815696d75c0df8b66390c489abed2365a530a040059a1
MD5 cfb07d69575631161d335065a2b606aa
BLAKE2b-256 4b1525966bd3314c93ead674736fba92590a89860dd3946d973b9e0b53977b8e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp36-cp36m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f16ceec2862faaffc8fc19bca20e0e79ffdab18a53e6cb75e42e33d090e80d04
MD5 7c2925a9bf8be529bfbe54cbb6656bdd
BLAKE2b-256 e332b6464ad450d65ffd44543a7cc98043b57e2fd11cbb251ed44c518ab56395

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.4 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8a937cd3b53656e15de03671f8a638b5e8e4c100725b854d73bdb51e41455e9e
MD5 51884067c671c44ffb352da04a3931e2
BLAKE2b-256 74a04bfa036c5b88444e95d0b3b24c6e0d6047b9c5920572c4be3135e24f15ba

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.9.1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for torchvision-0.9.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 da4c4f7363b60b0637354974ea0a29dbc301f66c9f25d92ed5f10637909f3500
MD5 ab36412e462dec274c04112ec5b30779
BLAKE2b-256 2c1919ea4cec5a7048eb2596f1574bed5bfec703c0fe9155b1bad0d9b8d198e4

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