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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.12

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

Uploaded CPython 3.12 macOS 11.0+ ARM64

torchvision-0.17.2-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.2-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

torchvision-0.17.2-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.2-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

torchvision-0.17.2-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.2-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

torchvision-0.17.2-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.2-cp38-cp38-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

torchvision-0.17.2-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.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for torchvision-0.17.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3f784381419f3ed3f2ec2aa42fb4aeec5bf4135e298d1631e41c926e6f1a0dff
MD5 8a8425008afa4bfd33aad3a56fc17e21
BLAKE2b-256 fdd18da7f30169f56764f0ef9ed961a32f300a2d782b6c1bc8b391c3014092f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f1c9ab3152cfb27f83aca072cac93a3a4c4e4ab0261cf0f2d516b9868a4e96f3
MD5 391162a5490afab7a2616cde5ea191b2
BLAKE2b-256 52899af25236f7bc31fe74f88bde03bbd63c284d0aefa6d19bd92cc37433470c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp312-cp312-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 77d680adf6ce367166a186d2c7fda3a73807ab9a03b2c31a03fa8812c8c5335b
MD5 6fae964e45f42f1bbb9a7e72ff3e4591
BLAKE2b-256 1ce9830390c704f1471c33faebe964c3ca99113e43ffc3f6653d3188ca04077c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c3acbebbe379af112b62b535820174277b1f3eed30df264a4e458d58ee4e5b2
MD5 633aab02e178e4845a9772261975ed04
BLAKE2b-256 58120be3c13b2694ce2d103d259a4c0692884d52b0b445387101d96965d5b060

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 14fd1d4a033c325bdba2d03a69c3450cab6d3a625f85cc375781d9237ca5d04d
MD5 b8464f2ebc3c8ffaac03d68ba92e26e9
BLAKE2b-256 ffb6a056fb68cae15e8aec4f854f78d4787086d77efa5468a29d5b744eee2a2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6835897df852fad1015e6a106c167c83848114cbcc7d86112384a973404e4431
MD5 4f747de8597a6f7f17d619f06248c72e
BLAKE2b-256 c675d869f600fc33df8b8ca99943e165a4ca23b73c68dc1942098fde0a6b46f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 833fd2e4216ced924c8aca0525733fe727f9a1af66dfad7c5be7257e97c39678
MD5 9b46260a68a77a002ae0f0ba75ce83c7
BLAKE2b-256 568da153903bfd610450258ee7ac5d292d6b8f382aec14f49404845d8ba6207d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3bbc24b7713e8f22766992562547d8b4b10001208d372fe599255af84bfd1a69
MD5 842c4458b677d686ad945610c5119640
BLAKE2b-256 68495e1c771294407bb25e6dbcf169aef5cffefcddf27b0176125a9b0af06a1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e031004a1bc432c980a7bd642f6c189a3efc316e423fc30b5569837166a4e28d
MD5 a1be3fe2e76e4bbb56aff1e2c7723e42
BLAKE2b-256 3615c48f74f8f8d382677ef016b65f09969028a1549b8a518c18894deb95b544

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9b83e55ee7d0a1704f52b9c0ac87388e7a6d1d98a6bde7b0b35f9ab54d7bda54
MD5 f4fe4c3264c9841400e4408df0b7f52c
BLAKE2b-256 4695179dd1bf8fd6bd689f0907f4baed557d2b12d2cf3d7ed1a8ecefe0a63d83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ba2e62f233eab3d42b648c122a3a29c47cc108ca314dfd5cbb59cd3a143fd623
MD5 6009d3a21303baa7b986e3d5e2a24c4b
BLAKE2b-256 0ab8027b3c36e61a26d14d4e9a8413d4a09e5fd8d3e01e3efce78447ca1dc3dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e9e4bed404af33dfc92eecc2b513d21ddc4c242a7fd8708b3b09d3a26aa6f444
MD5 bd068547151b81dbac3ae3c67ce4c1b5
BLAKE2b-256 fb41c8a440ebb1d4958baf02f08f6df56a3a30bea3fdcdc99076cb7da023babe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f400145fc108833e7c2fc28486a04989ca742146d7a2a2cc48878ebbb40cdbbd
MD5 4e135c5d8e65b80656e3cd505783f16e
BLAKE2b-256 e02fd13cb0ffc4808f85b880ef66ab6cfef10bd35e5c151dae68ea18cf6bf636

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecc1c503fa8a54fbab777e06a7c228032b8ab78efebf35b28bc8f22f544f51f1
MD5 81125f8f8d0b9b7ba2fd737fce2901a1
BLAKE2b-256 643da0385fd301e6e2eefb1d9cf2ac97d0c33ebf4a764aba0f066e6e16324916

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1f2910fe3c21ad6875b2720d46fad835b2e4b336e9553d31ca364d24c90b1d4f
MD5 5471faf4041f72321fa201a0e6e400a4
BLAKE2b-256 a270c781e0433ab7b8f6f693580e5065ae17c3785b2836200311765f99535ef8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 067095e87a020a7a251ac1d38483aa591c5ccb81e815527c54db88a982fc9267
MD5 9423c61bb7d07e44ab69c65aef616cbc
BLAKE2b-256 cf36add952d8b6ac65797f9cd524b9f17454f605a9f9a883aa54e7c4644d382d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d506854c5acd69b20a8b6641f01fe841685a21c5406b56813184f1c9fc94279e
MD5 ef22f0e04825f353a1df6bd8cc56cfd1
BLAKE2b-256 ff575d25123994d4fd21b6da62ccb944bdac621ecba0c5fa1ce2aa82387f20f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7dc85b397f6c6d9ef12716ce0d6e11ac2b803f5cccff6fe3966db248e7774478
MD5 4a8a1cbbcef081c70354152429e87716
BLAKE2b-256 2f67ec9a4135390fa5fb9a48aee17e4bdcd5cd011fdf6ba2f91089dacbb887e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 efd6d0dd0668e15d01a2cffadc74068433b32cbcf5692e0c4aa15fc5cb250ce7
MD5 59b80d6cfa04555e8ff99400f57045e6
BLAKE2b-256 d789b3dccad2dfbc3996d0403a3985284db2f1662256bf17ac20ac0ca43a7236

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4868bbfa55758c8107e69a0e7dd5e77b89056035cd38b767ad5b98cdb71c0f0d
MD5 88a063afddb27cc56d2bcbd9bea5110d
BLAKE2b-256 1da6636e67c0c964f9a01f5f27e403a9b64094e17471e0722a90b660116f9bd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2f69570f50b1d195e51bc03feffb7b7728207bc36efcfb1f0813712b2379d881
MD5 2bf4e944b1e28661594ddfb4dd85ca3d
BLAKE2b-256 ed188a11fab0771226e8df4ead963bded04e3603c77b8cae82cd0263f9e19d18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 35ba5c1600c3203549d2316422a659bd20c0cfda1b6085eec94fb9f35f55ca43
MD5 96be0e5d89fe5de60f9d4eead6caf11a
BLAKE2b-256 85d2a0aaa376df6f0027c0913cd3269b4b3896d00609585fc411c1214817f324

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 32dbeba3987e20f2dc1bce8d1504139fff582898346dfe8ad98d649f97ca78fa
MD5 ba7af5512776934bafb4cf0f717aba5f
BLAKE2b-256 c1cffd85ebbfff999bf513b9fddcef16d3f76db2336647e8da98e96110ae2a3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1ece40557e122d79975860a005aa7e2a9e2e6c350a03e78a00ec1450083312fd
MD5 7e27f8234e44d8ae75589e1b069aaf56
BLAKE2b-256 3fb6c357f9ac4f659f4d415f44b554811d53e92b7b062838f925affc01f0a7a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.2-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b83aac8d78f48981146d582168d75b6c947cfb0a7693f76e219f1926f6e595a3
MD5 dc11da9ef48beaacff9859bca126d8c6
BLAKE2b-256 94ceb2ee0129bfe1280ae23e6f45d918072945676b14e80af750d7b3d63eecea

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