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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11

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

Uploaded CPython 3.11 macOS 11.0+ ARM64

torchvision-0.16.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.16.0-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10

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

Uploaded CPython 3.10 macOS 11.0+ ARM64

torchvision-0.16.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.16.0-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9

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

Uploaded CPython 3.9 macOS 11.0+ ARM64

torchvision-0.16.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.16.0-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

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

Uploaded CPython 3.8 macOS 11.0+ ARM64

torchvision-0.16.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.16.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for torchvision-0.16.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9ee3d4df7d4a84f883f8ad11fb6510549f40f68dd5469eae601d7e02fb4809b2
MD5 5b5b4d01abac52ca15eeb2392a45d7d6
BLAKE2b-256 20acab6f42af83349e679b03c9bb18354740c6b58b17dba329fb408730230584

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9ed5f21e5a56e466667c6f9f6f93dba2a75e29921108bd70043eaf8e9ba0a7cc
MD5 34fac009d5f6ce481ab3b1c3a5b316d6
BLAKE2b-256 ab1a56e7df23d2ef1526094f7f895f00a2151a67ffa36dfb85d7c24246b25d81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp311-cp311-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6a24a1e83e4bc7a31b39ef05d2ca4cd2182e95ff10f525edffe1473f7ce16ca1
MD5 4125a91d55950b9d83d075f24e9bb4b0
BLAKE2b-256 08aa033a0a1bca4a3b8f81f97709024e053da37cf5c970f3dc5d76233c920b99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2294a6514a31a6fda562288b28cf6db57877237f4b56ff693262f237a7ed4035
MD5 30240d84cde2925c17395ec952f829f3
BLAKE2b-256 dd4885ef87f1548620d7c3743cbe135b90d8cf673fc7b8594361917558d765b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 31fdf289bdfb2976f65a14f79f6ddd1ee60113db34622674918e61521c2dc41f
MD5 6c3a1864aa8c53df94cb4cd4ef4fb9bc
BLAKE2b-256 238446481327771d4f63feb59dd0d9e1cd6a42e985dbd371965f486a5bf9f323

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 62f01513687cce3480df8928fcc6c09b4aa0433d05ac75e82877acc773f6a568
MD5 5cba3566827dcce3ddd1817a774bd21f
BLAKE2b-256 59af426c2b90f5c4f8aba778746465af9e662680570e950e02379e91c6138285

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e4327e082b703921ae52caeee4f7839f7e6c73cfc5eedea468ecb5c1487ecdbf
MD5 f4342eb983b717f4fde0bb8688a48d70
BLAKE2b-256 8229824940e810a81c419a9d35d6c400bd8f99f322878bdd637ac769a597cf0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp310-cp310-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9e3a2012e463f498de21f6598cc7a266b9a8c6fe15788472fdc419233ea6f3f2
MD5 d1d11cd93e51e3bbc5dee7341c3b27a9
BLAKE2b-256 84eb4f6483ae9094e164dc5b9b792e377f7d37823b0bedc3eef3193d416d2bb6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef5dec6c48b715353781b83749efcdea03835720a71b377684453ee117aab3c7
MD5 5a9a971fa88b406972ccbaf6df45190f
BLAKE2b-256 de5c63da40bcac00e06eae06b52b4a82ba089b44d2cbd232020fe9194ea75ea9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 16c300fdbbe91469f5e9feef8d24c6acabd8849db502a06160dd76ba68e897a0
MD5 775f9351dbdc5d0d97efb41cfd2f1a1f
BLAKE2b-256 76890cdc6f497cbbb83dd51804cd4f788b7f5bd529f07b5417b50fe9c5655b76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9b8f06e6a2f80576007b88846f74b680a1ad3b59d2e22b075587b430180e9cfa
MD5 a3ea59b3699de33729b516785ed623ca
BLAKE2b-256 ec361ecc19249def521b3b948baee32903148b1f399d2dd5a9a5692942e8383c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5a47108ae6a8effdf09fe35fd0c4d5414e69ca8d2334e87339de497b7b64b0c9
MD5 1da1b3cd16d77b18993aca2fb352a931
BLAKE2b-256 375b1a50f2fc60ae48d3a3212c5547c293da2e169ce023733ed4dad203f7fb79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8cb501061f6654da494dd975acc1fa301c4b8aacf96bdbcf1553f51a53ebfd1f
MD5 2b871adb6ba1659f44843279a24568b1
BLAKE2b-256 8b6400e53316beb2f19edcaa0eb283b6087cb4d5275112f24b8ea0d8b49c1d5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f044cffd252fd293b6df46f38d7eeb2fd4fe931e0114c5263735e3b8c9c60a4f
MD5 35e83ff6dcf75a44a4e80b6587f4a786
BLAKE2b-256 7dfd9c2b3d0200532dc4a6211ef0fcf78c0556a27e3b03800333d4caa32bedc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 de7c7302fa2f67a2a151e595a8e7dc3865a445d952e99d5c682ba78f312fedc3
MD5 bcd58ae016957d42efcf57c701e2fe1e
BLAKE2b-256 12462a12963c071ac4b85eea63b5b414d7fc62c971dde497279247f852fcc113

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 550c9793637c5369fbcb4e4b6b0e6d53a4f6cc22389f0563ad60ab90e4f1c8ba
MD5 22595d84f7d3f0bf9fe66362b504695e
BLAKE2b-256 cc1bd781261269b3d0a5da35feda8e0b5ca7d25f5d08945bc6fba809e8cb7cbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 79875f5247337723ec363762c2716bcfc13b78b3045e4e58847c696f03d9ed4d
MD5 b00a783077dd3287bb59f54011049b51
BLAKE2b-256 746b8147ee4574083ce5bf83ce9eef06d873eeaf4ff390a7eee6d2fc05918bf8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 eddd91da4603f1dbb340d9aca82344df64605a0897b17014ac8e0b54dd6e5716
MD5 657309ca0c8baad8c9a4abcc3c372544
BLAKE2b-256 c952d3f1c4253ad17e4ab08a2230fb184a3a180e2348db6c144c64977335b654

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 597f60cb03e6f758a00b36b38506f6f38b6c3f1fdfd3921bb9abd60b72d522fd
MD5 d28aabe5a7c9208697d8c760a39bcc84
BLAKE2b-256 88e64f317ff73334f25c899d50c5dfd645e4c8a7d1837ed26a27d5ba244ec387

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torchvision-0.16.0-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0c6f36d00b9ce412e367ad6f42e9054cbc890cd9ddd0d200ed9b3b52dd9c225b
MD5 a460a2e22f4ff6425dcd828cc0d08462
BLAKE2b-256 db44ec7cf9cb0eec61da15ea08c0b81453634c57693b50525d3986a0486ac7da

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