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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.12

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

Uploaded CPython 3.12 macOS 11.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

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

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

torchvision-0.17.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for torchvision-0.17.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cc22c1ed0f1aba3f98fd72b6f60021f57aec1d2f6af518522e8a0a83848de3a8
MD5 ea1219e962138a95b45abab90dced640
BLAKE2b-256 a1e35fd1c7d1836141b0bd253502be910c73d84a34ced27a289ea4ca4975ef3b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 54902877410ffb5458ee52b6d0de4b25cf01496bee736d6825301a5f0398536e
MD5 2bfb0a71319123e07856fefd191fd025
BLAKE2b-256 673cd4e5978681c402992756a6dd6dae17a1aecc7e972befee0eb06feb30f992

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp312-cp312-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 32dc5de86d2ade399e11087095674ca08a1649fb322cfe69336d28add467edcb
MD5 6acf20c7a265f66188bd7cbfc56a7f3a
BLAKE2b-256 6270bb489d4d8ff75eb1b59094b652d3137374e9c05d1646146e8f927c513051

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0fe98d9d92c23d2262ff82f973242951b9357fb640f8888ac50848bd00f5b45
MD5 4a3eaba71633730619059aad9d95ece0
BLAKE2b-256 6207d6e05716052fd1a33423864c4a6d090066acaee6989405832bed246da1f9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5d241d2a5fb4e608677fccf6f80b34a124446d324ee40c7814ce54bce888275b
MD5 ccad606f3b02638edd09c10dabf02cb6
BLAKE2b-256 119106aa4107f9f48476569cb5d9bcdb257b129fe4f9c687c6ce6ecd76e46643

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a2109c1a1dcf71e8940d43e91f78c4dd5bf0fcefb3a0a42244102752009f5862
MD5 e8deb9ae536d6bf9d5baddfbe8427018
BLAKE2b-256 e745419aa0b37254f1fd62b45bb63836066c5eb81e37d70940e0491e95167eed

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e74f5a26ef8190eab0c38b3f63914fea94e58e3b2f0e5466611c9f63bd91a80b
MD5 8a3cf6cdd6b8ba431f2d18a86d78ef70
BLAKE2b-256 df0a39d5cd110ad5c28205d5b0c8189140d8cce39efe5350f1f3d41b185f01b4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5966936c669a08870f6547cd0a90d08b157aeda03293f79e2adbb934687175ed
MD5 b366d367ab17db38fd3887e6431ee013
BLAKE2b-256 3a4912fc5188602c68a789a0fdaee63d176a71ad5c1e34d25aeb8554abe46089

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9106e32c9f1e70afa8172cf1b064cf9c2998d8dff0769ec69d537b20209ee43d
MD5 0c05d8ac62a285314340a985321df62c
BLAKE2b-256 a895affe174621ebc9b32544a918ae6cb758ac06061d0ee51d783e06906ceba1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ea2ccdbf5974e0bf27fd6644a33b19cb0700297cf397bb0469e762c11c6c4105
MD5 086b70f580864d0180f4b18414bb14f1
BLAKE2b-256 2b60d566724f4619cab0520cd3722e36fd6d1ddce0da635534a0e11c6b194d1f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9d4d45a996f4313e9c5db4da71d31508d44f7ccfbf29d3442bdcc2ad13e0b6f3
MD5 337a9eb7a3aee996be397e3aa73cb726
BLAKE2b-256 69663b7392a52bb541efc95afebf72c8574e2530fee39153cb02efc8fc97d82c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ebe5fdb466aff8a8e8e755de84a843418b6f8d500624752c05eaa638d7700f3d
MD5 f9d6d89d63fe651279e6f413ba54f79d
BLAKE2b-256 a2c879d6a72f3e4a99a7ffd0179cc6a6e450178f19bcdc2ee148e7ff1ad6162d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 aaefef2be6a02f206085ce4bb6c0078b03ebf48cb6ff82bd762ff6248475e08e
MD5 bdee3ad03924196017553e83ec5dbd10
BLAKE2b-256 1ae813432ae6be567b577a4c89d1bd50084e4d989b379a7be8050380b5ab3a6e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 33d65d0c7fdcb3f7bc1dd8ed30ea3cd7e0587b4ad1b104b5677c8191a8bad9f1
MD5 f65cd0691c1968c5d3df33696d33fa85
BLAKE2b-256 0ec14fbba2193ada99c963d26b3f3a71eef8767925386c514b3effe5f8afb05e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 06418880212b66e45e855dd39f536e7fd48b4e6b034a11dd9fe9e2384afb51ec
MD5 7a88d4123a082b12b90182592b5190c9
BLAKE2b-256 d13880480fefc8b42432847cd01f943f59bfe0fc7fa106290bb016b2b2ce8b2d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5f427ebee15521edcd836bfe05e86feb5189b5c943b9e3999ed0e3f391fbaa1d
MD5 95a96462509909f88b63454447746ddc
BLAKE2b-256 f5760311d9c51cd6e79577e2b03dcce12c9c76d16e074855223b678a769785e9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0ecc9a58171bd555aed583bf2f72e7fd6cc4f767c14f8b80b6a8725eacf4ceb1
MD5 691c56ada78467e7614e2086b0f6ad07
BLAKE2b-256 27d34ab00369cceb40d0475d793874251f9da3d3ef54fbc9facf63986f8f62cb

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 429d63eb7551aa4d8f6cdf08d109b5570c20cbcce36d9cb95b24556418e4dc82
MD5 877996c593aa5b10779b6e30f059c379
BLAKE2b-256 953d75f4926df30741f3312e7fd0988633faaf6ebf11fd5b926ddb80af96ea3e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8a1b17fb158b2b881f2c8796fe1839a624e49d5fd07aa61f6dae60ba4819421a
MD5 e1976c617162b56a3c8dfb6d44e94e42
BLAKE2b-256 4aa43e7a679c5e8a1cced9d09a77ab090313b0ee9d5233a8ad32df1042740e37

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 58299a724b37b893c7ce4d0b32ea1480c30e467cc114167964b45f6013f6c2d3
MD5 bcdb3704543ece2a9bd11412838be740
BLAKE2b-256 58a537c051d5af64d484f7436518dc423765ff4d546f343d9a6c550a96422bf6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 524405457dd97d9ab0e48df502f819d0f41a113ce8f00470bb9926d9d36efcf1
MD5 5411feb8998b197a5a0bf2f686bb9856
BLAKE2b-256 e8757d753016cf145cdef1e42573d1034f56d299fc70516e13de1eed1968e1ac

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dca22795cc02ca0d5ddc08c1422ff620bc9899f63d15dc36f71ef37250e17b75
MD5 2db01affdb538e465ff8fd7407cfc043
BLAKE2b-256 59734b2df2e67dfd2f2d8d1000dc0fdb66811e6830bb2d0dbc6291e01b7cf41d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bd5dcd14a32945c72f5c19341add94aa7c23dd7bca2bafde44d0f3c4344d17ed
MD5 8cc19600975185a983669effcccebb8f
BLAKE2b-256 306db74f57ecb736f09ca4b9ba8d6140035ca1e534a453a98a7b881be54f17d1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ce76466af2b5a30573939cae1e6e62e29316ceb3ee748091002f312ab0912f6
MD5 021da27b4e2cbfd56a73130afe8416c3
BLAKE2b-256 bb7c7b4653d39ec80017a29961b892d5befc80d6a4deb497f162c77306f300f6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for torchvision-0.17.1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2621097065fa1c827885e2b52102e839a3541b933b7a90e0fa3c42c3de1bc3cf
MD5 83d848633a1b897c6102739ed118b103
BLAKE2b-256 f8071e8637981fed289de95624de4265d4dac31f86000b68662b51433eb6a239

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