Skip to main content

torchvision

total torchvision downloads documentation

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

Installation

Please refer to the official instructions to install the stable versions of torch and torchvision on your system.

To build source, refer to our contributing page.

The following is the corresponding torchvision versions and supported Python versions.

torch torchvision Python
main / nightly main / nightly >=3.8, <=3.11
2.1 0.16 >=3.8, <=3.11
2.0 0.15 >=3.8, <=3.11
1.13 0.14 >=3.7.2, <=3.10
older versions
torch torchvision Python
1.12 0.13 >=3.7, <=3.10
1.11 0.12 >=3.7, <=3.10
1.10 0.11 >=3.6, <=3.9
1.9 0.10 >=3.6, <=3.9
1.8 0.9 >=3.6, <=3.9
1.7 0.8 >=3.6, <=3.9
1.6 0.7 >=3.6, <=3.8
1.5 0.6 >=3.5, <=3.8
1.4 0.5 ==2.7, >=3.5, <=3.8
1.3 0.4.2 / 0.4.3 ==2.7, >=3.5, <=3.7
1.2 0.4.1 ==2.7, >=3.5, <=3.7
1.1 0.3 ==2.7, >=3.5, <=3.7
<=1.0 0.2 ==2.7, >=3.5, <=3.7

Image Backends

Torchvision currently supports the following image backends:

  • torch tensors
  • PIL images:

Read more in in our docs.

[UNSTABLE] 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.16.2

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.16.2
File
torchvision-0.16.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
torchvision-0.16.2-cp311-cp311-manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
torchvision-0.16.2-cp311-cp311-manylinux1_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-64 Details
torchvision-0.16.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
torchvision-0.16.2-cp311-cp311-macosx_10_13_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.13+ x86-64 Details
torchvision-0.16.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
torchvision-0.16.2-cp310-cp310-manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
torchvision-0.16.2-cp310-cp310-manylinux1_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.5+ x86-64 Details
torchvision-0.16.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
torchvision-0.16.2-cp310-cp310-macosx_10_13_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.13+ x86-64 Details
torchvision-0.16.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
torchvision-0.16.2-cp39-cp39-manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details
torchvision-0.16.2-cp39-cp39-manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
torchvision-0.16.2-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
torchvision-0.16.2-cp39-cp39-macosx_10_13_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.13+ x86-64 Details
torchvision-0.16.2-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
torchvision-0.16.2-cp38-cp38-manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details
torchvision-0.16.2-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
torchvision-0.16.2-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details
torchvision-0.16.2-cp38-cp38-macosx_10_13_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.13+ x86-64 Details

Total release size: 87.6 MB

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

Download URL torchvision-0.16.2-cp311-cp311-win_amd64.whl
Size 1.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
8692ab1e48807e9604046a6f4beeb67b523294cee1b00828654bb0df2cfce2b2
BLAKE2b-256 checksum
How to use checksums
f9e63c821e7417acd82df89e39f09156ce80d58817b5b4b1ac5453b522bc5dd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp311-cp311-manylinux2014_aarch64.whl
Size 14.0 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
e130b08cc9b3cc73a6c59d6edf032394a322f9579bfd21d14bc2e1d0999aa758
BLAKE2b-256 checksum
How to use checksums
fa2b3177a4e6f0f190a036ec1c64866cf92442919fdfe4a4ee0cccc137e50dfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp311-cp311-manylinux1_x86_64.whl
Size 6.8 MB
Tags CPython 3.11 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e59cc7b2bd1ab5c0ce4ae382e4e37be8f1c174e8b5de2f6a23c170de9ae28495
BLAKE2b-256 checksum
How to use checksums
6ec8cf445dcf86daf1aed298061ad14b8d335fa594596aeaa6b951231328ffd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp311-cp311-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bef30d03e1d1c629761f4dca51d3b7d8a0dc0acce6f4068ab2a1634e8e7b64e0
BLAKE2b-256 checksum
How to use checksums
efa2f16cac894c4c71585b3411707502ed8d607945fb4a695857621565bd728d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / torchvision-0.16.2-cp311-cp311-macosx_10_13_x86_64.whl

Download URL torchvision-0.16.2-cp311-cp311-macosx_10_13_x86_64.whl
Size 1.6 MB
Tags CPython 3.11 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
67b1aaf8b8cb02ce75dd445f291a27c8036a502f8c0aa76e28c37a0faac2e153
BLAKE2b-256 checksum
How to use checksums
3b0a59f82c490e82c3f3671deb374b1d53e3285ff91b76cae46f99b5b3c3e2d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

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

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

Download URL torchvision-0.16.2-cp310-cp310-manylinux2014_aarch64.whl
Size 14.0 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
96c7583700112a410bdc4e1e4f118c429dab49c29c9a31a2cc3579bc9b08b19d
BLAKE2b-256 checksum
How to use checksums
54787350fe2e9e4979d754f0a87191bd0cdc120c2fcfb163a036ca2c70276c54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp310-cp310-manylinux1_x86_64.whl
Size 6.8 MB
Tags CPython 3.10 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e89f10f3c8351972b6e3fda95bc3e479ea8dbfc9dfcfd2c32902dbad4ba5cfc5
BLAKE2b-256 checksum
How to use checksums
daae76bd3682465730dea7be21f36a8160a911a470de6f26228904f222e7fefe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp310-cp310-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b024bd412df6d3a007dcebf311a894eb3c5c21e1af80d12be382bbcb097a7c3a
BLAKE2b-256 checksum
How to use checksums
1625186bc3ab670eec24d7fe799f5e5b096bc1a456bc88fa85decae78dc2f20c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / torchvision-0.16.2-cp310-cp310-macosx_10_13_x86_64.whl

Download URL torchvision-0.16.2-cp310-cp310-macosx_10_13_x86_64.whl
Size 1.6 MB
Tags CPython 3.10 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
bc86f2800cb2c0c1a09c581409cdd6bff66e62f103dc83fc63f73346264c3756
BLAKE2b-256 checksum
How to use checksums
053c687b31e39de3a220d4ba4db403819d9d2dfbecf5e77f6509ff377ccf7de2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp39-cp39-win_amd64.whl
Size 1.1 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
41dd4fa9f176d563fe9f1b9adef3b7e582cdfb60ce8c9bc51b094a025be687c9
BLAKE2b-256 checksum
How to use checksums
afbcc4167983786553726bbf932f499385a1f914fd4981d651ea4a7d634caa5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp39-cp39-manylinux2014_aarch64.whl
Size 1.6 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
8199acdf8ab066a28b84a5b6f4d97b58976d9e164b1acc3a9d14fccfaf74bb3a
BLAKE2b-256 checksum
How to use checksums
78d8c3d166701949b657ef13e39cd9a619daf47443e8c4c97316b6cbd50f1d13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp39-cp39-manylinux1_x86_64.whl
Size 6.8 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
3f4bd5fcbc361476e2e78016636ac7d5509e59d9962521f06eb98e6803898182
BLAKE2b-256 checksum
How to use checksums
a3192f586c109711337ba5c5b713c03d56b42a74aee966ac0bba64458dea84a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp39-cp39-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
82805f8445b094f9d1e770390ee6cc86855e89955e08ce34af2e2274fc0e5c45
BLAKE2b-256 checksum
How to use checksums
00746898499aa56693d8fa35c045e7195029aca5305fced117780f1289640dbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / torchvision-0.16.2-cp39-cp39-macosx_10_13_x86_64.whl

Download URL torchvision-0.16.2-cp39-cp39-macosx_10_13_x86_64.whl
Size 1.6 MB
Tags CPython 3.9 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
56115268b37f0b75364e3654e47ad9abc66ac34c1f9e5e3dfa89a22d6a40017a
BLAKE2b-256 checksum
How to use checksums
505bfde5d91a5934cd5a5f78fc88b40c3382dd46d28c1c8e6efc8039c8d3e340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp38-cp38-win_amd64.whl
Size 1.1 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
7fd22d86e08eba321af70cad291020c2cdeac069b00ce88b923ca52e06174769
BLAKE2b-256 checksum
How to use checksums
544bb0861005f5d4370b3529f31d5e6461c4faf9bbbcbe916480cceebc885aa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp38-cp38-manylinux2014_aarch64.whl
Size 14.0 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
335959c43b371c0474af34c1ef2a52efdc7603c45700d29e4475eeb02984170c
BLAKE2b-256 checksum
How to use checksums
6a6efc57d91362ad0e0c3da3fcfe10679358d377300b30992f1f13c1a1d9e80e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp38-cp38-manylinux1_x86_64.whl
Size 6.8 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
bc5f274e4ecd1b86062063cdf4fd385a1d39d147a3a2685fbbde9ff08bb720b8
BLAKE2b-256 checksum
How to use checksums
3c4e8b8783baaa4dfef96de31fa4243b6367f931489ed840a38e0fa32230c5e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

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

Download URL torchvision-0.16.2-cp38-cp38-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4b065143d1a720fe8a9077fd4be35d491f98819ec80b3dbbc3ec64d0b707a906
BLAKE2b-256 checksum
How to use checksums
64533b757838d3f557b2c47fd694644e44754ae34e570519b44b5d9a6c8527ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / torchvision-0.16.2-cp38-cp38-macosx_10_13_x86_64.whl

Download URL torchvision-0.16.2-cp38-cp38-macosx_10_13_x86_64.whl
Size 1.6 MB
Tags CPython 3.8 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
b82732dcf876a37c852772342aa6ee3480c03bb3e2a802ae109fc5f7e28d26e9
BLAKE2b-256 checksum
How to use checksums
c5dd476e5c8284af8419a71adf28522b5028e2d556826ef95d6da3eb29894031
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.16.2 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