Skip to main content

image and video datasets and models for torch deep learning

Project description

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

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.16.2-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

torchvision-0.16.2-cp311-cp311-manylinux2014_aarch64.whl (14.0 MB view details)

Uploaded CPython 3.11

torchvision-0.16.2-cp311-cp311-manylinux1_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.11

torchvision-0.16.2-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

torchvision-0.16.2-cp311-cp311-macosx_10_13_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

torchvision-0.16.2-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

torchvision-0.16.2-cp310-cp310-manylinux2014_aarch64.whl (14.0 MB view details)

Uploaded CPython 3.10

torchvision-0.16.2-cp310-cp310-manylinux1_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.10

torchvision-0.16.2-cp310-cp310-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

torchvision-0.16.2-cp310-cp310-macosx_10_13_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

torchvision-0.16.2-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

torchvision-0.16.2-cp39-cp39-manylinux2014_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.9

torchvision-0.16.2-cp39-cp39-manylinux1_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.9

torchvision-0.16.2-cp39-cp39-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

torchvision-0.16.2-cp39-cp39-macosx_10_13_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9macOS 10.13+ x86-64

torchvision-0.16.2-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

torchvision-0.16.2-cp38-cp38-manylinux2014_aarch64.whl (14.0 MB view details)

Uploaded CPython 3.8

torchvision-0.16.2-cp38-cp38-manylinux1_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.8

torchvision-0.16.2-cp38-cp38-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

torchvision-0.16.2-cp38-cp38-macosx_10_13_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8macOS 10.13+ x86-64

File details

Details for the file torchvision-0.16.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8692ab1e48807e9604046a6f4beeb67b523294cee1b00828654bb0df2cfce2b2
MD5 05c147ae94df2c01b22340db8d739560
BLAKE2b-256 f9e63c821e7417acd82df89e39f09156ce80d58817b5b4b1ac5453b522bc5dd4

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp311-cp311-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e130b08cc9b3cc73a6c59d6edf032394a322f9579bfd21d14bc2e1d0999aa758
MD5 3829029b388947838b611b0424f26783
BLAKE2b-256 fa2b3177a4e6f0f190a036ec1c64866cf92442919fdfe4a4ee0cccc137e50dfd

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp311-cp311-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e59cc7b2bd1ab5c0ce4ae382e4e37be8f1c174e8b5de2f6a23c170de9ae28495
MD5 861f6f58747257f3edf8e670120b80d3
BLAKE2b-256 6ec8cf445dcf86daf1aed298061ad14b8d335fa594596aeaa6b951231328ffd1

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bef30d03e1d1c629761f4dca51d3b7d8a0dc0acce6f4068ab2a1634e8e7b64e0
MD5 d6066b479b2cc7241ffdf66a69978b24
BLAKE2b-256 efa2f16cac894c4c71585b3411707502ed8d607945fb4a695857621565bd728d

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 67b1aaf8b8cb02ce75dd445f291a27c8036a502f8c0aa76e28c37a0faac2e153
MD5 ff9637adf08ac58f4161d7536a31fab2
BLAKE2b-256 3b0a59f82c490e82c3f3671deb374b1d53e3285ff91b76cae46f99b5b3c3e2d7

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f4032ebb3277fb07ff6a9b818d50a547fb8fcd89d958cfd9e773322454bb688
MD5 4aea93e2166fdbdbd06a27168beaee4a
BLAKE2b-256 f727c0faba9135bf3f110810e7e7896233c92edb92827ef824649f08d24adebd

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp310-cp310-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 96c7583700112a410bdc4e1e4f118c429dab49c29c9a31a2cc3579bc9b08b19d
MD5 828d8a2883c73b4956982f55c0d80436
BLAKE2b-256 54787350fe2e9e4979d754f0a87191bd0cdc120c2fcfb163a036ca2c70276c54

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp310-cp310-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e89f10f3c8351972b6e3fda95bc3e479ea8dbfc9dfcfd2c32902dbad4ba5cfc5
MD5 35df9f50e3fb2b56af5d672f618a0985
BLAKE2b-256 daae76bd3682465730dea7be21f36a8160a911a470de6f26228904f222e7fefe

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b024bd412df6d3a007dcebf311a894eb3c5c21e1af80d12be382bbcb097a7c3a
MD5 73c0c338152183a1123b0e57c564e44d
BLAKE2b-256 1625186bc3ab670eec24d7fe799f5e5b096bc1a456bc88fa85decae78dc2f20c

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bc86f2800cb2c0c1a09c581409cdd6bff66e62f103dc83fc63f73346264c3756
MD5 3d41011e5951ae3d0c657e26030323ec
BLAKE2b-256 053c687b31e39de3a220d4ba4db403819d9d2dfbecf5e77f6509ff377ccf7de2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.16.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for torchvision-0.16.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 41dd4fa9f176d563fe9f1b9adef3b7e582cdfb60ce8c9bc51b094a025be687c9
MD5 50df3adce2934befbbe9f9e7084e083a
BLAKE2b-256 afbcc4167983786553726bbf932f499385a1f914fd4981d651ea4a7d634caa5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.2-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8199acdf8ab066a28b84a5b6f4d97b58976d9e164b1acc3a9d14fccfaf74bb3a
MD5 24c44ffc903ddf02d1176ddfd57c4c36
BLAKE2b-256 78d8c3d166701949b657ef13e39cd9a619daf47443e8c4c97316b6cbd50f1d13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.2-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3f4bd5fcbc361476e2e78016636ac7d5509e59d9962521f06eb98e6803898182
MD5 7ffb0e3c9e01308d6a78690349dcf818
BLAKE2b-256 a3192f586c109711337ba5c5b713c03d56b42a74aee966ac0bba64458dea84a1

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82805f8445b094f9d1e770390ee6cc86855e89955e08ce34af2e2274fc0e5c45
MD5 467785f7d39331a4fd61a527b8265595
BLAKE2b-256 00746898499aa56693d8fa35c045e7195029aca5305fced117780f1289640dbb

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 56115268b37f0b75364e3654e47ad9abc66ac34c1f9e5e3dfa89a22d6a40017a
MD5 247c6e31273eea10724f8135b061dea0
BLAKE2b-256 505bfde5d91a5934cd5a5f78fc88b40c3382dd46d28c1c8e6efc8039c8d3e340

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchvision-0.16.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for torchvision-0.16.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7fd22d86e08eba321af70cad291020c2cdeac069b00ce88b923ca52e06174769
MD5 1706fbb756be91c09d85b6dee5e3733b
BLAKE2b-256 544bb0861005f5d4370b3529f31d5e6461c4faf9bbbcbe916480cceebc885aa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.2-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 335959c43b371c0474af34c1ef2a52efdc7603c45700d29e4475eeb02984170c
MD5 9021bfaa827d8e22c656517152be650a
BLAKE2b-256 6a6efc57d91362ad0e0c3da3fcfe10679358d377300b30992f1f13c1a1d9e80e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bc5f274e4ecd1b86062063cdf4fd385a1d39d147a3a2685fbbde9ff08bb720b8
MD5 153eeaa872982045eb22d229ef01aa0e
BLAKE2b-256 3c4e8b8783baaa4dfef96de31fa4243b6367f931489ed840a38e0fa32230c5e4

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b065143d1a720fe8a9077fd4be35d491f98819ec80b3dbbc3ec64d0b707a906
MD5 ffc5b353cc1ada41e212fbdfd5754cdd
BLAKE2b-256 64533b757838d3f557b2c47fd694644e44754ae34e570519b44b5d9a6c8527ad

See more details on using hashes here.

File details

Details for the file torchvision-0.16.2-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.2-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b82732dcf876a37c852772342aa6ee3480c03bb3e2a802ae109fc5f7e28d26e9
MD5 4c6bdaf2e9f8871f7836df06ac9afbba
BLAKE2b-256 c5dd476e5c8284af8419a71adf28522b5028e2d556826ef95d6da3eb29894031

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