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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 macOS 10.13+ x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 macOS 10.13+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

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

Uploaded CPython 3.9 macOS 10.13+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

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

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e11af530585574eb5ca837b8f151bcdd57c10e35c3af56c76a10f3281d2a2f2c
MD5 f75bc55c841437ec1d7862c7cf367700
BLAKE2b-256 132423cdf7e7dc33e5c01588c315f8424d31afa9edb05a80168f3d44f7178ff7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3d34601614958c4e30f53ec0eb7bf3f282ee72bb747734be2d75422831a43384
MD5 2b447dc6c448eee4539cd09b6d687c12
BLAKE2b-256 7cf3c1edac2cea1573a38816f7949b942894765a8aafeb395f9febf0cd9b07c6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4f9d5b192b336982e6dbe32c070b05606f0b53e87d722ae332a02909fbf988ed
MD5 60948f3567740b3c78c9f5e93efece2c
BLAKE2b-256 363ba1d0a681ec3abb1bb8ff92c303ed73c0437050d9ac2b210273dc26f3fd8f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3391757167637ace3ef33a67c9d5ef86b1f8cbd93eaa5bad45eebcf266ea6089
MD5 b4199678aa170bf39d935f0ffe7e1469
BLAKE2b-256 4723dea81d5d93b3a4254ffedd095f6bca3cf70d544a3650678249faf1d20257

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4aea5cf491c6c21b1cbdbb1bf2a3838a59d4db93ad5f49019a6564d3ca7127c7
MD5 c82644c6339b7c0557c6d3b111425595
BLAKE2b-256 3b45e2390cdb86ee9e2b40385373d8c24bcb7b608f47549605d34a878abe8bfe

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 92c76a5092b4033efdb183b11fa4854a7630e23c46f4a1c3ffd70c30cb5be4fc
MD5 eeb4e48c1ed59ba0393de0db1bfcf0df
BLAKE2b-256 140f9c650b3d20fd8bf24d61dc2f59d734b64f3ab4473b8699dacf44a8a41140

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 632887b22e67ce32a3ede806b868bba4057601e46d680de14b32a391eac1b483
MD5 3b5af5cf6fba8303dd345af4e65f5e7b
BLAKE2b-256 14e0542fd0594d49ea8320951f924af0ded2543d3af8498d6ed10e12173214b7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c82e291e674a18b67f92ddb476ae18498fb46d7032ae914f3fda90c955e7d86f
MD5 8f6a67ab6132ec78e87892f640eb2a08
BLAKE2b-256 a3731aa7a38ec9b20ebc55bd6ac70c6c134333933c3be4572e4885d609cd1625

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25da6a7b22ea0348f62c45ec0daf157731096babcae65d222404081af96e085c
MD5 a9c0d331e8a3c8cd915d44aedb4ce80a
BLAKE2b-256 02b6a540edc7ebcd510d42611e4344bbaa9c73e0c262750652e276866b43e33e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 987132795e5c037cb74e7be35a693999fdb2f603152266ee15b80206e83a5b0c
MD5 7b777d668a11b708f80c6e97a37ab4d3
BLAKE2b-256 4bf67049c63eb322c7a705610edf4e93c9d6435f861ec94e5639b1a0016ba678

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 75e33b198b1265f61d822aa66d646ec3df67a712470ffec1e0c37ff46d4103c1
MD5 e8b8a5431729dfe7d80ae4457577b7fe
BLAKE2b-256 d5aa0b7cc4f81d127ae522f1ccb6f7eaf12839bdb3501846c2202775c7ea6a83

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 153f753f14eba58969cdc86360893a57f8bf63f8136c7d1cd4388108560b5446
MD5 3e94a701c513e51cdc04e994271de259
BLAKE2b-256 e81e108a750971d89a2b9dfb307866a7d88caf86e90e1f3cda63d01c9a4e5b02

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 72fde5fdb462e66ebe25ae42d2ee11434cbc395f74cad0d3b22cf60524345cc5
MD5 6ca08181103fcd83ce5c479c34e39df0
BLAKE2b-256 35f8746aab24005484577247a0caabd1cbbc9ed1e31c4fd92f3273310fd92206

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a15e88a93a7501cc75b761a2dcd07aaedaaf9cbfaf48c8affa8c98989ecbb19d
MD5 1397f18ded39d4d2b13e6b9b7f8c0e39
BLAKE2b-256 a72e5677e79d26e62f7cf0b98c3781f82cdd51dfb0bf71e7bb03ad176c5f1adc

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f14d201c37176dc4106eec76b229d6585a1505266b8cea99d3366fd38897b7c0
MD5 0a36c38031b021b464f66e8a81ca475a
BLAKE2b-256 b1d94228947ca56483aebb2162163cc1aee8abc29ebd2c05747863e22145f6b2

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 13782d574033efec6646d1a2f5d85f4c59fcf3f403367bb407b15df07adc87e0
MD5 3a262d090dbd9c0e393778fa9661fcd7
BLAKE2b-256 fc27d16f6210d20c98fbc33809e06340a8fbdc283857be7644772c18242aec14

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fab67ddc4809fcc2a04610b13cac5193b9d3be2896b77538bfdff401b13022e5
MD5 9f0eee6004045946b163cf798392dd75
BLAKE2b-256 5b2706bd36eca6442bb2f5715a86f5fa8fa3a102ebd74ffd45f985df4e61eea4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 73271e930501a008fe24ba38945b2a75b25a6098f4c2f4402e39a9d0dd305ca6
MD5 3dcda6ef7068ec529139117a8e02aef0
BLAKE2b-256 ee87c770561befafe03b17f9dbbdedaeb877728f9918af9770e8f7d26f400b54

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1d614b3c9e2de9cd75cc0e4e1923fcfbbcd9fdb9f08a0bbbbf7e135e4a0a1cfa
MD5 9893ccf47dca8bdfdd589777a41a8bcb
BLAKE2b-256 fc96bb09b13c6e46a94f193f3f36948876c5e5b6b737647951ccf8f95e4df059

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4f2cad621fb96cf10e29af93e16c98b3226bdd53ae712b57e873c3deaf061617
MD5 7e8629064dffadb2b93fe0512fda3009
BLAKE2b-256 dd9a69ffe826b5d7a05fa3b3f21f3517cff74d28bb3f14a91cd76b5cd0e5aea7

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