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

master / nightly

master / nightly

>=3.6

1.8.0

0.9.0

>=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/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.10.1-cp39-cp39-win_amd64.whl (936.1 kB view details)

Uploaded CPython 3.9Windows x86-64

torchvision-0.10.1-cp39-cp39-manylinux1_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.9

torchvision-0.10.1-cp39-cp39-macosx_10_9_x86_64.whl (14.2 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

torchvision-0.10.1-cp38-cp38-win_amd64.whl (936.2 kB view details)

Uploaded CPython 3.8Windows x86-64

torchvision-0.10.1-cp38-cp38-manylinux1_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.8

torchvision-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

torchvision-0.10.1-cp37-cp37m-win_amd64.whl (936.2 kB view details)

Uploaded CPython 3.7mWindows x86-64

torchvision-0.10.1-cp37-cp37m-manylinux1_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.7m

torchvision-0.10.1-cp37-cp37m-macosx_10_9_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

torchvision-0.10.1-cp36-cp36m-win_amd64.whl (936.3 kB view details)

Uploaded CPython 3.6mWindows x86-64

torchvision-0.10.1-cp36-cp36m-manylinux1_x86_64.whl (22.1 MB view details)

Uploaded CPython 3.6m

torchvision-0.10.1-cp36-cp36m-macosx_10_9_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 936.1 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.10.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6c8fe90213be4bce590ac9647b34db022d5d1ae94f309a733b9a64e65232173a
MD5 1726e6a59d0378009476e70b95da97b6
BLAKE2b-256 a584f3a7889475114eac2e6f2a83c115ece887474389a6c866b3ebfc0e89e364

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 22.1 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.10.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ac8dfbe4933013dda898b815e2476ebbc35e3a16b9352dfdd66e773c77755bec
MD5 a3b13f4b965a7220f4c50895025dcd4e
BLAKE2b-256 e7cd701539d8763529861f3bb76b90f7cbedb2edc7920101d9772fd77b921cf1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 14.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.10.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1c186f42b4f8aa9a01c56c3a758693b0447aa169afb9fba0051177f8fecbd691
MD5 27d87a948fade6450c9c4270e3f16236
BLAKE2b-256 4b136259967e57bc1c8f7bfc8fddbd0b79ef9a31297403736e4a7c927c22d81a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 936.2 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.10.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 453e935212193e89b4bbb8d51082d8138631c2f8a420390284b1946d893df6eb
MD5 af8cc2f26604f110f8f64d5446621d8f
BLAKE2b-256 3359047bdb8c3dd2bc34e6e20cde495b6317605422f8d4c718430866fc28c171

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 22.1 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.10.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d6420bf21b9d0bdbabe55d64c8b11c61f8eb077948a55d5707946fcb17d97cec
MD5 0bc49b00f88827484f1fde62e43ec5c1
BLAKE2b-256 4b9b3eac77b49101cb731725c113a41f6355f316aed47a3a48964c9e95e0e3b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 14.3 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.10.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d7c2d6c20244404fc9ca3568c88c305cb5a81d526d5912d52d22c64999bd4353
MD5 bd7715b392ea396682be080dc580fd84
BLAKE2b-256 ed6ea3d9945e12468735ea5503f2501260d3d2532bdf039bbce68eafb0f6c38d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 936.2 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.10.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 4ebffeee5468a0934952030eaba1de1dbb08154132235ee1d9049e41dfb1600d
MD5 5def3e8a6e96ee5dc7df67b2013e486d
BLAKE2b-256 a9fb2329c2ddb214336524b7abcae046c69fdaa17f8d6b34462c8155490711e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 22.1 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.10.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 99d3e01e1d67d12bcc88e826431b70cad5b8e4729a277c04601f83358a120508
MD5 6745858b8835c51bd95c0885f1738e8f
BLAKE2b-256 566cdaa50a536812da895a4eecaefdffbffd90736c47898d942501080a5b42a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 14.3 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.10.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cd7e2b1a89d5a08f24325fc12441f5ba2822f407489377ac7841bf351a1f4d37
MD5 ff386f7e3b609a98c52d48331a629192
BLAKE2b-256 396b5c93b16c43cb157851afda3568ef9f72818e9f622cc310904b6ad1543f72

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 936.3 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.10.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e504d9d51eae60a98925aee4a3fd58655abd5669659ad7431f7791a93af166fc
MD5 bcce683bba7232abe5ff66fe942c57f1
BLAKE2b-256 8b3d207d7ff1c41dc2bdc5f322828531cda9ce361203866855bd64c20dbb06f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 22.1 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.10.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 46a70a30ea7aeab63e67504778f2565fbb1c153fdd8e1a8c6a22193aec4dbddd
MD5 d9067cfe0d90c0c3c3cd001cc0cfdaac
BLAKE2b-256 8e3b73e2cf095f0a9d0f26b008cbfc009512c53bb2a445723aaad54b33e58cb5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.10.1-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 14.3 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.10.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bc99a984b162ee5626787eaee885d9fec1a5f16837f9d0c8223cca3269b9e47d
MD5 6e6ce3d01aa687f009a09079f0ba23f2
BLAKE2b-256 734298bfffa67cfc4bb4f373f4115e6314d4ae221f0669281c9dfb69366eb16a

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