Skip to main content

torchvision

https://travis-ci.org/pytorch/vision.svg?branch=master https://codecov.io/gh/pytorch/vision/branch/master/graph/badge.svg https://pepy.tech/badge/torchvision https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchvision%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v

The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.

Installation

TorchVision requires PyTorch 1.4 or newer.

Anaconda:

conda install torchvision -c pytorch

pip:

pip install torchvision

From source:

python setup.py install
# or, for OSX
# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install

By default, GPU support is built if CUDA is found and torch.cuda.is_available() is true. It’s possible to force building GPU support by setting FORCE_CUDA=1 environment variable, which is useful when building a docker image.

Image Backend

Torchvision currently supports the following image backends:

  • Pillow (default)

  • Pillow-SIMD - a much faster drop-in replacement for Pillow with SIMD. If installed will be used as the default.

  • accimage - if installed can be activated by calling torchvision.set_image_backend('accimage')

C++ API

TorchVision also offers a C++ API that contains C++ equivalent of python models.

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.

Documentation

You can find the API documentation on the pytorch website: http://pytorch.org/docs/master/torchvision/

Contributing

We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.

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!

Metadata

Release files for torchvision 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for torchvision 0.6.1
File
torchvision-0.6.1-cp38-cp38-manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
torchvision-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.9+ x86-64 Details
torchvision-0.6.1-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
torchvision-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details
torchvision-0.6.1-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
torchvision-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64 Details
torchvision-0.6.1-cp35-cp35m-manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
torchvision-0.6.1-cp35-cp35m-macosx_10_6_x86_64.whl CPython 3.5 CPython 3.5 pymalloc macOS 10.6+ x86-64 Details

Total release size: 28.3 MB

Release files / torchvision-0.6.1-cp38-cp38-manylinux1_x86_64.whl

Download URL torchvision-0.6.1-cp38-cp38-manylinux1_x86_64.whl
Size 6.6 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
3af59c61d20bb0bb63dbd50f324fcd975fc5b89fb78e6b5714ae613cd7b734cc
BLAKE2b-256 checksum
How to use checksums
a6490c91252da378c3fc81ed0ca4391cdf507245864e0fad20ef4d4d703ec6bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / torchvision-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl

Download URL torchvision-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl
Size 436.3 kB
Tags CPython 3.8 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
80a8beaa3416035c9640d153b1f0a7c9b09aac8037a032bbc33fd4bc8657b091
BLAKE2b-256 checksum
How to use checksums
6556af4ebc639d329be6b0ea2fe928ca5b685bb3744e83fe347173b5cd1fce61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / torchvision-0.6.1-cp37-cp37m-manylinux1_x86_64.whl

Download URL torchvision-0.6.1-cp37-cp37m-manylinux1_x86_64.whl
Size 6.6 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
52be3710bf495fee9eb8f1cb4d310edd2da94b127b2ca0aa77075c1001bcbb91
BLAKE2b-256 checksum
How to use checksums
f4efc32275c040f12f24adcd6302f0f3cd12cc432e408ce4ea521600e8fd989c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / torchvision-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL torchvision-0.6.1-cp37-cp37m-macosx_10_9_x86_64.whl
Size 436.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
b07e7c5a7274082a8bbe88975c817da10bffaf4020017347d185b5d4eacb891d
BLAKE2b-256 checksum
How to use checksums
713ddca8cab1605bb76bade94b20d1d95ec20e152ce319d55e0c9f8ae64c6a46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / torchvision-0.6.1-cp36-cp36m-manylinux1_x86_64.whl

Download URL torchvision-0.6.1-cp36-cp36m-manylinux1_x86_64.whl
Size 6.6 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
c44819c3c903f2d6d269713a9aa81a9dcb0ab7716b4fc4dbdccf596e6fe894c9
BLAKE2b-256 checksum
How to use checksums
9af1535a407b4a265adf2dd7c2c2458217e37c5fe83ec97234e66c564592a9a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / torchvision-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl

Download URL torchvision-0.6.1-cp36-cp36m-macosx_10_9_x86_64.whl
Size 436.3 kB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
9a544f241e1df7485c1fda64f06af4962ad4af1da6caeda352757ea800dd794d
BLAKE2b-256 checksum
How to use checksums
0b8f9b72f3f485d2d5dfa3e19f001b2a0799cec210a1d54b29c211dd4f4851f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / torchvision-0.6.1-cp35-cp35m-manylinux1_x86_64.whl

Download URL torchvision-0.6.1-cp35-cp35m-manylinux1_x86_64.whl
Size 6.6 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
c122386a4604a6b611626d817981777bb06e747161a4954e4037c2e297fe1d86
BLAKE2b-256 checksum
How to use checksums
d9727b094db5bc202e80a0e7120c654df88e43dcee6d388984da12271e9e7ff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Release files / torchvision-0.6.1-cp35-cp35m-macosx_10_6_x86_64.whl

Download URL torchvision-0.6.1-cp35-cp35m-macosx_10_6_x86_64.whl
Size 436.3 kB
Tags CPython 3.5 CPython 3.5 pymalloc macOS 10.6+ x86-64
SHA-256 checksum
How to use checksums
eb6d7ef73ab8ed756d18c1c11ead3ba1be7b3e2fe5bf475e16a4426d7f3d6eec
BLAKE2b-256 checksum
How to use checksums
7e4dc79dbdb322935b991dbac60aa4cb81a2ef65006a01e15ef89d6a4348e9cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0.post20200127 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

Security for torchvision 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.6.1 This release

8 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page