Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.29.0 instead.
Reason given by maintainers: Contains an incorrect torch dependency

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.8, <=3.10

1.13.0

0.14.0

>=3.7.2, <=3.10

1.12.0

0.13.0

>=3.7, <=3.10

1.11.0

0.12.0

>=3.7, <=3.10

1.10.2

0.11.3

>=3.6, <=3.9

1.10.1

0.11.2

>=3.6, <=3.9

1.10.0

0.11.1

>=3.6, <=3.9

1.9.1

0.10.1

>=3.6, <=3.9

1.9.0

0.10.0

>=3.6, <=3.9

1.8.2

0.9.2

>=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

We don’t officially support building from source using pip, but if you do, you’ll need to use the --no-build-isolation flag. 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 (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.

Python linking is disabled by default when compiling TorchVision with CMake, this allows you to run models without any Python dependency. In some special cases where TorchVision’s operators are used from Python code, you may need to link to Python. This can be done by passing -DUSE_PYTHON=on to CMake.

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!

Pre-trained Model License

The pre-trained models provided in this library may have their own licenses or terms and conditions derived from the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.

More specifically, SWAG models are released under the CC-BY-NC 4.0 license. See SWAG LICENSE for additional details.

Citing TorchVision

If you find TorchVision useful in your work, please consider citing the following BibTeX entry:

@software{torchvision2016,
    title        = {TorchVision: PyTorch's Computer Vision library},
    author       = {TorchVision maintainers and contributors},
    year         = 2016,
    journal      = {GitHub repository},
    publisher    = {GitHub},
    howpublished = {\url{https://github.com/pytorch/vision}}
}

Release files for torchvision 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for torchvision 0.15.0
File
torchvision-0.15.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
torchvision-0.15.0-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
torchvision-0.15.0-cp311-cp311-manylinux1_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-64 Details
torchvision-0.15.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
torchvision-0.15.0-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
torchvision-0.15.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
torchvision-0.15.0-cp310-cp310-manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
torchvision-0.15.0-cp310-cp310-manylinux1_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.5+ x86-64 Details
torchvision-0.15.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
torchvision-0.15.0-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
torchvision-0.15.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
torchvision-0.15.0-cp39-cp39-manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details
torchvision-0.15.0-cp39-cp39-manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
torchvision-0.15.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
torchvision-0.15.0-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details
torchvision-0.15.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
torchvision-0.15.0-cp38-cp38-manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details
torchvision-0.15.0-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
torchvision-0.15.0-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details
torchvision-0.15.0-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details

Total release size: 84.6 MB

Release files / torchvision-0.15.0-cp311-cp311-win_amd64.whl

Download URL torchvision-0.15.0-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
32b3b02b4eb81ea5207f488c28cfd01004574f51b42ddecceeb7e4585d6f61c1
BLAKE2b-256 checksum
How to use checksums
b76c1b55ef665da86d19945a528d85b73a52ab08f6d803105dd267ce2a27626f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp311-cp311-manylinux2014_aarch64.whl

Download URL torchvision-0.15.0-cp311-cp311-manylinux2014_aarch64.whl
Size 865.1 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
69cc75de7ef4c87461580e5da608bd6763ab5bf8cc396323a7c37b5433d42c9b
BLAKE2b-256 checksum
How to use checksums
6f045fd078c82b6e233bc68788fdc8cdedb428c10e52ae0d2519a8660a469370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp311-cp311-manylinux1_x86_64.whl

Download URL torchvision-0.15.0-cp311-cp311-manylinux1_x86_64.whl
Size 6.0 MB
Tags CPython 3.11 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
70a7236260879d1f52b8a9018c8eb1ea3a32dca8c2caff35590be989b1393fd9
BLAKE2b-256 checksum
How to use checksums
f3dbb00054f36c7655a9c09697ec93ae6ff7c5a3d19d722bdfc1499e57bee94b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL torchvision-0.15.0-cp311-cp311-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
82f3313b06d30c7d91d12f43d65a434aa89bf2abac5c044c56cb9d76eee9a5c7
BLAKE2b-256 checksum
How to use checksums
fde7de6a1939a94d343206e8ff1a0231220d2f66f6e112f765af063acdc218d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp311-cp311-macosx_10_9_x86_64.whl

Download URL torchvision-0.15.0-cp311-cp311-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
5e204e4728f1fc922d8e51975b82a83db85566c5addccb17ff607e87dc233f96
BLAKE2b-256 checksum
How to use checksums
a11981950ae4da32f2cd31623ca1b08295be5b64bc6f84d761c2cab09cc48063
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp310-cp310-win_amd64.whl

Download URL torchvision-0.15.0-cp310-cp310-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e4617ce4ed9f86e3e31343c297648011d0425fc9b2d59167664cd89cd28101f9
BLAKE2b-256 checksum
How to use checksums
9be7bb564c29a96e34b295681c55a12fd31ebc98941dac01d999abadc9a0fe51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp310-cp310-manylinux2014_aarch64.whl

Download URL torchvision-0.15.0-cp310-cp310-manylinux2014_aarch64.whl
Size 865.1 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
ab6dbfc49422a904d681045d8a25b8cb761eeb6174c7d05ff70f04900ebc583c
BLAKE2b-256 checksum
How to use checksums
1b19042aab814ab737756a30f669bb620c7e28c677465ae5ba420172fdd3cd7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp310-cp310-manylinux1_x86_64.whl

Download URL torchvision-0.15.0-cp310-cp310-manylinux1_x86_64.whl
Size 6.0 MB
Tags CPython 3.10 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
54027cc9e9d7f862777a1a8bca1d06eac07aff1d974990498859b4c52e4b418b
BLAKE2b-256 checksum
How to use checksums
03f5fc17a39d8be4f625ea70c26a4c2f650ea15b38511dcf6c0e76d7a6810de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL torchvision-0.15.0-cp310-cp310-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6b3a6a8673404a3592ccb23108e21bcf227fe599419d4af8b1b778a2c8e1da05
BLAKE2b-256 checksum
How to use checksums
a6a8f3352ef365267b7519381cf10ab5b31cf83193461ccbe4dc84c18427f391
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp310-cp310-macosx_10_9_x86_64.whl

Download URL torchvision-0.15.0-cp310-cp310-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
d55106216b6733e8f7707086b65f2d1c0a42267da9adaf4a24b20397f8b27fc8
BLAKE2b-256 checksum
How to use checksums
4f6a9a27191962643fe9a5776503af92d989116e0dfdb0b6bdbb89614934fd46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp39-cp39-win_amd64.whl

Download URL torchvision-0.15.0-cp39-cp39-win_amd64.whl
Size 1.2 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
18e0160b413d221c211a4dcbed5d676158e54d76c1d532975502c2cf230cf6d1
BLAKE2b-256 checksum
How to use checksums
7931b4caf2c73296f1f12ae7af6647bf48b51442bd68fd8c40426e5a60f46dd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp39-cp39-manylinux2014_aarch64.whl

Download URL torchvision-0.15.0-cp39-cp39-manylinux2014_aarch64.whl
Size 865.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
6df40a36d39be2758e5280255d3348d64aeda670b81fca77ba76de80c86dbd60
BLAKE2b-256 checksum
How to use checksums
3d6f0d314c484135e282cf8367102161a1bc186cc2c3a9acb9097ce5d17c6dc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp39-cp39-manylinux1_x86_64.whl

Download URL torchvision-0.15.0-cp39-cp39-manylinux1_x86_64.whl
Size 6.0 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
5044d5dc18305a9213b8da451e408e1fd85176072ff2d37ab75839aec8b7282b
BLAKE2b-256 checksum
How to use checksums
2db146d25f1c292b17522c2a710c7126f2199b47f8938d2137f917e467214740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL torchvision-0.15.0-cp39-cp39-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d190d863aebf9ebbc00c26ccd203c410c588d6f987a511e9bf40a32f3847c7c0
BLAKE2b-256 checksum
How to use checksums
d8386ec7b78debbbe36392bea458b38a51cf3a0e223cbc9c31841dfe29e09a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp39-cp39-macosx_10_9_x86_64.whl

Download URL torchvision-0.15.0-cp39-cp39-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
d624b0d58c0417ce6c3a301c6540a45850954cfad7bd941681868f6846cd9171
BLAKE2b-256 checksum
How to use checksums
a8c34d1753d95f167f43309395c926a28e1b65c4bc5a9086d497f3551c377c3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp38-cp38-win_amd64.whl

Download URL torchvision-0.15.0-cp38-cp38-win_amd64.whl
Size 1.2 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
87ed73c3eb7c00434ecd9fe3a342a329d3b83d27c4cafc03bf52bf4362d1b8eb
BLAKE2b-256 checksum
How to use checksums
feca7f14521aca52b01527bcda66ce61c51c88eaf4cf8c4a88bfe8c7d500b5ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp38-cp38-manylinux2014_aarch64.whl

Download URL torchvision-0.15.0-cp38-cp38-manylinux2014_aarch64.whl
Size 13.7 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
76035603bd2bfc9811c732bdb87e9b85298222ed9b5261a12d19ecd9ffa8ebc2
BLAKE2b-256 checksum
How to use checksums
cf049c07ac5dce8fe216bc730b68e37480b3d58676a57d55cc99228fd6c1c35f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp38-cp38-manylinux1_x86_64.whl

Download URL torchvision-0.15.0-cp38-cp38-manylinux1_x86_64.whl
Size 33.8 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
cb9df39b8ae75cc09f2718182bf9a9268ee36c2ef292cff0d0ce91261c2b3529
BLAKE2b-256 checksum
How to use checksums
ba26ff4bf089f2de836fdea923e2f54859fb3910c951c7106a9688edf96f3b5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp38-cp38-macosx_11_0_arm64.whl

Download URL torchvision-0.15.0-cp38-cp38-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2bc53aa30ef18841e4dcbc826ee66d4a9b8baf805e41bfeabdf581868a9f7d8a
BLAKE2b-256 checksum
How to use checksums
ac87f0b1ee255c84923179c8dc57d0220224ff32d5ff55dae20525fcc6ab7897
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / torchvision-0.15.0-cp38-cp38-macosx_10_9_x86_64.whl

Download URL torchvision-0.15.0-cp38-cp38-macosx_10_9_x86_64.whl
Size 1.5 MB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
cc9b09044d9c11e67373e9104fef5859a3808d29c557bcb888c8e64603c3bad8
BLAKE2b-256 checksum
How to use checksums
147eb5ac1d89ab3dfad492f60abb0c26579c52571e33a0d5bbc06f2bcb14b9a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.15.0 This release

20 release files

0.9.1

16 release files

0.8.2

8 release files

0.8.1

6 release files

0.8.0

6 release files

0.7.0

6 release files

0.6.1

8 release files

0.6.0

8 release files

0.5.0

15 release files

0.4.2

9 release files

0.4.1

12 release files

0.4.0

9 release files

0.3.0

12 release files

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page