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<4.3'
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.17.0-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

torchvision-0.17.0-cp312-cp312-manylinux1_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.12

torchvision-0.17.0-cp312-cp312-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

torchvision-0.17.0-cp312-cp312-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12 macOS 10.13+ x86-64

torchvision-0.17.0-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

torchvision-0.17.0-cp311-cp311-manylinux1_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.11

torchvision-0.17.0-cp311-cp311-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

torchvision-0.17.0-cp311-cp311-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11 macOS 10.13+ x86-64

torchvision-0.17.0-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

torchvision-0.17.0-cp310-cp310-manylinux1_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.10

torchvision-0.17.0-cp310-cp310-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

torchvision-0.17.0-cp310-cp310-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

torchvision-0.17.0-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

torchvision-0.17.0-cp39-cp39-manylinux1_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.9

torchvision-0.17.0-cp39-cp39-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

torchvision-0.17.0-cp39-cp39-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

torchvision-0.17.0-cp38-cp38-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

torchvision-0.17.0-cp38-cp38-manylinux1_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.8

torchvision-0.17.0-cp38-cp38-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

torchvision-0.17.0-cp38-cp38-macosx_10_13_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8 macOS 10.13+ x86-64

File details

Details for the file torchvision-0.17.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for torchvision-0.17.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b755d6d3e021239d2408bf3794d0d3dcffbc629f1fd808c43d8b346045a098c4
MD5 9c1dc9ef26fa6936c6ecb8063b4ee653
BLAKE2b-256 bea6ed6d3413761b1d3ff572d8436601e0854471ff67c0c986064ad01bcba303

See more details on using hashes here.

File details

Details for the file torchvision-0.17.0-cp312-cp312-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for torchvision-0.17.0-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4608ba3246c45c968ede40e7640e4eed64556210faa154cf1ffccb1cadabe445
MD5 c28e33f5900de561af680a14f8399c53
BLAKE2b-256 f687ed1fb27b3b22b77587c518441a19a2812d153af4e4dadf8d9f74cc21e645

See more details on using hashes here.

File details

Details for the file torchvision-0.17.0-cp312-cp312-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.17.0-cp312-cp312-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8fe14d580557aef2c45dd462c069ff936b6507b215c4b496f30973ae8cff917d
MD5 12a4088fdb1ee4de5de2394b8abbbb71
BLAKE2b-256 3a20c57ef160aa7477478544f05b9ef949625166b49e35f06e987eeb8b0882d6

See more details on using hashes here.

File details

Details for the file torchvision-0.17.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torchvision-0.17.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be39874c239215a39b3c431c7016501f1a45bfbbebf2fe8e11d8339b5ea23bca
MD5 833b562caea511bc8cf7c19e2b102a32
BLAKE2b-256 a816b208d6704061438b80f63937c6a00a70c5e91062bbb281e106e007ecd41b

See more details on using hashes here.

File details

Details for the file torchvision-0.17.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for torchvision-0.17.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 816ae1a4506b1cb0f638e1827cae7ab768c731369ab23e86839f177926197143
MD5 3e5be99cdab52142d756203e515ce56e
BLAKE2b-256 8a27c7860ad0973f6f555bc5e03fbc9e001f79816ff503321b34941ee60fe44c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f8e542cf71e1294fcb5635038eae6702df543dc90706f0836ec80e75efc511fc
MD5 4ce9e80d8097c9cbcd9303c5062e86b6
BLAKE2b-256 b55638e892200f8638032b64f6fc8660049f0d00ccba086cf1dcb884bd6370d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3d2e9552d72e4037f2db6f7d97989a2e2f95763aa1861963a3faf521bb1610c4
MD5 bd7b8c566ba19e5956d1a0228823145b
BLAKE2b-256 5f964300bd970f7de2e5dbf0fe1a78baa8670ea3f09cadca51b05e1dfc346fe3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 acc0d098ab8c295a750f0218bf5bf7bfc2f2c21f9c2fe3fc30b695cd94f4c759
MD5 8456b6c838e534780304e22d4c0e5d16
BLAKE2b-256 c76a5a3e396a4ac5d869acf9bb0db9c301c4780af1b68fdb5883d61d63e595b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3eef2daddadb5c21e802e0550dd7e3ee3d98c430f4aed212ae3ba0358558be1
MD5 9a40bdbbc7700c16ce0a3f10418b4e33
BLAKE2b-256 3e4fad5c2a7d2783649c8ea691441a9f285accae922a1625e21603c45e3ddff4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 10d276821f115fb369e6cf1f1b77b2cca60cda12cbb39a41513a9d3d0f2a93ae
MD5 d1700d9f28f5cba9e429e9e954d7a9af
BLAKE2b-256 3281f81f5c6ecb0ef29affb69d2e615e20b531420ba866dd7cd504f9dc766d8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 71b314813faf13cecb09a4a635b5e4b274e8df0b1921681038d491c529555bb6
MD5 cb17eb76a5539b716077da4110ed7bd2
BLAKE2b-256 7fc910ca7837d786f2a96328ddf3a93767897d5e6eb04cf42b043778a771d04a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3d86c212fc6379e9bec3ac647d062e34c2cf36c26b98840b66573eb9fbe1f1d9
MD5 cf49d7904acf3f2c98b1fb5f996e903c
BLAKE2b-256 4ffdc02da47623d870a53007f4628f69787cbe62a50fcedc3327d03d5951ae5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 605950cdcefe6c5aef85709ade17b1525bcf171e122cce1df09e666d96525b90
MD5 da2b412929a5fb1601f71b553cf171ca
BLAKE2b-256 d85155393d57c2d95311b1675c8cd37d307f5022460cf98746e4df882dfb415c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c55c2f86e3f3a21ddd92739a972366244e9b17916e836ec47167b0a0c083c65f
MD5 ebe63e090b7ab17e5f65debb7aeb254d
BLAKE2b-256 95f55f3f013ddb3eb8561d3313fd5a5951e5883aff4aba8398ad93d1b183a214

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 153882cd8ff8e3dbef5c5054fdd15df64e85420546805a90c0b2221f2f119c4a
MD5 5ec53d25590cb026ea423bacb7102922
BLAKE2b-256 99dadedf05fab34a0ef38abc20b8a86b836a486fdef774641812fe556db8ef5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4c0d4c0af58af2752aad235150bd794d0f324e6eeac5cd13c440bda5dce622d3
MD5 aa77550ba471197c861b54dd5d9a5247
BLAKE2b-256 c2b27dd581240fec0d17fb2865592a84b101e723b48a3f36ff8184aa6ba38300

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 085251ab36340206dc7e1be59a15fa5e307d45ccd66889f5d7bf1ba5e7ecdc57
MD5 ad2531e7e3c00667cd1d1e3aa1f7b685
BLAKE2b-256 14284f9d5ab0646636dac54db3e76445bbcb02c5944b00c796587170d04bc0d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7f373507afcd9022ebd9f50b31da8dbac1ea6783ffb77d1f1ab8806425c0a83b
MD5 12c390d36161f3709dc6a44992160589
BLAKE2b-256 4bbbb3e917f46610854a444bf08e6fd0fa95dd22bbfcab092e83785638daf57a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b53569c52bd4bd1176a1e49d8ea55883bcf57e1614cb97e2e8ce372768299b70
MD5 5134a52b9383b8b22dab394b035aa645
BLAKE2b-256 455f9aa70444832c5285a7ab6f2e916733a525a99e3a58e9e2f8d628287cc88b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b1ced438b81ef662a71c8c81debaf0c80455b35b811ca55a4c3c593d721b560a
MD5 b52989e7a1f0574d112bbf206e124766
BLAKE2b-256 810b051a8a7ed261cb11f01ec6f66975f467bc8a56c5f355d1bf03546daa455e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7887f767670c72aa20f5237042d0ca1462da18f66a3ea8c36b6ba67ce26b82fc
MD5 f577ca6c3b2c4dd9db43d876a98f913e
BLAKE2b-256 d208c438a422459d0d8ffd111590c3f49cc8eced15900412cb9449ec13d929be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e041ce3336364413bab051a3966d884bab25c200f98ca8a065f0abe758c3005e
MD5 5329011ae2b72471cd840a9f7d8ae1d2
BLAKE2b-256 c79224eb045ffc23a1c6a03b6ceaaddad56b193d19c13093bedac1df7c4c4c16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a54a15bd6f3dbb04ebd36c5a87530b2e090ee4b9b15eb89eda558ab3e50396a0
MD5 484fed31c7a991f17906496683ee3fb9
BLAKE2b-256 b4578b9e5817bde4c11fdb069be1523e78f48a1bc97391e73d69b9f35b29c059

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 477f6e64a9d798c0f5adefc300acc220da6f17ef5c1e110d20108f66554fee4d
MD5 ee1b4485fe821d68660598538f1ae54e
BLAKE2b-256 214bcd2bb631e0774d9ec19bd258cdc75da71422be1d5a503b2d2286cfce2300

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 870d7cda57420e44d20eb07bfe37bf5344a06434a7a6195b4c7f3dd55838587d
MD5 5dfa448ba74b36e3e03c48b34387d483
BLAKE2b-256 16e25765a34a0aa4930155ce226f5f68b744f89dbf88d7e0c53ce05ae9b3580f

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