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.2 0.17 >=3.8, <=3.11
2.1 0.16 >=3.8, <=3.11
2.0 0.15 >=3.8, <=3.11
older versions
torch torchvision Python
1.13 0.14 >=3.7.2, <=3.10
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.18.1-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

torchvision-0.18.1-cp312-cp312-manylinux2014_aarch64.whl (14.0 MB view details)

Uploaded CPython 3.12

torchvision-0.18.1-cp312-cp312-manylinux1_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.12

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11

torchvision-0.18.1-cp311-cp311-manylinux1_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.11

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10

torchvision-0.18.1-cp310-cp310-manylinux1_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.10

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9

torchvision-0.18.1-cp39-cp39-manylinux1_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.9

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8

torchvision-0.18.1-cp38-cp38-manylinux1_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.8

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

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ed6340b69a63a625e512a66127210d412551d9c5f2ad2978130c6a45bf56cd4a
MD5 f70809f7e01a2e0cd52adb495d426e9c
BLAKE2b-256 0f0530ed3e81a610a236426eed6ac57ae0f1bbc4d526008e331f750e34e88c06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 13d24d904f65e62d66a1e0c41faec630bc193867b8a4a01166769e8a8e8df8e9
MD5 1fa36dc30e249e6278235e9cf918cde9
BLAKE2b-256 a05521e2849ecdab10a04392e2f892f5c70eff72adf71507e852e091e8c5f88f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp312-cp312-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f118d887bfde3a948a41d56587525401e5cac1b7db2eaca203324d6ed2b1caca
MD5 96781960820d28b3995b9c49532167cb
BLAKE2b-256 cfea02b9fdc72aac151313c95f214fdbb50f95152f33e7cb7ae4e14d717bfa01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2be6f0bf7c455c89a51a1dbb6f668d36c6edc479f49ac912d745d10df5715657
MD5 4a3bb9bdee33dc63431c3691a85665f7
BLAKE2b-256 4e9092c927d4ca82934c3a1cb0ee3374067bd79f7a465395c1261d3eb17a511f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 52f7436140045dc2239cdc502aa76b2bd8bd676d64244ff154d304aa69852046
MD5 edb5df4204190619140a9cfd68277c33
BLAKE2b-256 e4c3a21a75dd2de8114a6876f16a36b033e3e62f8ade68085a711b24f4b57c17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ceb993a882f1ae7ae373ed39c28d7e3e802205b0e59a7ed84ef4028f0bba8d7f
MD5 6699059f3683d571fe2f88ecf02102cd
BLAKE2b-256 04d813287fc08ed60553033233f47478b8af9f56e2432333e9ad1400a28084db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9077cf590cdb3a5e8fdf5cdb71797f8c67713f974cf0228ecb17fcd670ab42f9
MD5 54abcbb1a76b0ea6f66a8ead43f6c9a7
BLAKE2b-256 82d8fad23c368781b6e6df254287511683b4d151132de64c47a6fea5c3280ba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 80b5d794dd0fdba787adc22f1a367a5ead452327686473cb260dd94364bc56a6
MD5 d5d03b20e850d5cf358618a086239912
BLAKE2b-256 0f028d3f83e01cf7fd72884fe84d4ff737ce774c5a7653bb826cf7acd39179f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ef7bbbc60b38e831a75e547c66ca1784f2ac27100f9e4ddbe9614cef6cbcd942
MD5 73f07a34c572c5ea6748cc3d20ebfca9
BLAKE2b-256 4e623816637079b77875077678bd7087285a5b5589664f94f5ceb2d080cc024c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 573ff523c739405edb085f65cb592f482d28a30e29b0be4c4ba08040b3ae785f
MD5 663125a1902a0696ec375049ce11895c
BLAKE2b-256 9d7e38b7d6689e988f23a2c07782e045abaf2d54c7b63086f164c4dbd41228b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0b3bda0aa5b416eeb547143b8eeaf17720bdba9cf516dc991aacb81811aa96a5
MD5 b98803fa7013517c56222abbb2bf5454
BLAKE2b-256 080417425bf3c0620465ee182cea5c674db4debab87ed0627145d38039cb2a9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e694e54b0548dad99c12af6bf0c8e4f3350137d391dcd19af22a1c5f89322b3
MD5 ecba43b07e9590054d5d252f9196ee66
BLAKE2b-256 f231867be50508348030afea933e859bd7bbeb86924a6c2e35faf7777fbd6f55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5c8366a1aeee49e9ea9e64b30d199debdf06b1bd7610a76165eb5d7869c3bde5
MD5 40c42aacd0666857d9e8ae2ef9dbfcf0
BLAKE2b-256 3f735dadc116a8e6115f0f3c015ed0c415d301330ddb385bc6c501686e019443

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 54bfcd352abb396d5c9c237d200167c178bd136051b138e1e8ef46ce367c2773
MD5 2959e57e34e9cbee15f68711919ac669
BLAKE2b-256 099329e01f8b4cd81d16b3020f3dab0c7837efc1c099b8998fd581e36e4dbdd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 da83c8bbd34d8bee48bfa1d1b40e0844bc3cba10ed825a5a8cbe3ce7b62264cd
MD5 aaab165cf7dc10b8569a846459b39fd3
BLAKE2b-256 77b776e7c97aea1df00aabef8413d0048c0f693bb44027e57362768199f4e8e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 975b8594c0f5288875408acbb74946eea786c5b008d129c0d045d0ead23742bc
MD5 91e1d5a560ed74ac59712d1f03162f4b
BLAKE2b-256 e826e414c50dd13a19f5a4a68e32503e86066ce1b2cdf84b6ec49d25e3a85465

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 64a2662dbf30db9055d8b201d6e56f312a504e5ccd9d144c57c41622d3c524cb
MD5 9799e0596eef41efd3fd13b951ac9191
BLAKE2b-256 b17019daf159f0c2ffcc906bb5de0ed87e97accd84d3b322c4a52425861be985

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9726c316a2501df8503e5a5dc46a631afd4c515a958972e5b7f7b9c87d2125c0
MD5 4ee5b8758c18845c6ea853fb68a5ab3b
BLAKE2b-256 cc41e059049363387d027cf76405c51fbc85b88eb369df9881cea20110286179

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 02085a2ffc7461f5c0edb07d6f3455ee1806561f37736b903da820067eea58c7
MD5 ae2903a34d3cd031226799079e1ad578
BLAKE2b-256 13b2d0afeea84eb660468c965d7e3606542f511c9436ddbe80e596acb39fad03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.18.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1c3864fa9378c88bce8ad0ef3599f4f25397897ce612e1c245c74b97092f35e
MD5 ff53007d1fa07f1ead81b02e029fb491
BLAKE2b-256 768fd8f9aa2c34e75d378ec8f20b82bc49695c0701cdb293fb7feed2ec8dd839

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