Skip to main content

image and video datasets and models for torch deep learning

Project description

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

We recommend Anaconda as Python package management system. Please refer to pytorch.org for the detail of PyTorch (torch) installation. The following is the corresponding torchvision versions and supported Python versions.

torch

torchvision

python

master / nightly

master / nightly

>=3.6

1.6.0

0.7.0

>=3.6

1.5.1

0.6.1

>=3.5

1.5.0

0.6.0

>=3.5

1.4.0

0.5.0

==2.7, >=3.5, <=3.8

1.3.1

0.4.2

==2.7, >=3.5, <=3.7

1.3.0

0.4.1

==2.7, >=3.5, <=3.7

1.2.0

0.4.0

==2.7, >=3.5, <=3.7

1.1.0

0.3.0

==2.7, >=3.5, <=3.7

<=1.0.1

0.2.2

==2.7, >=3.5, <=3.7

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')

  • libpng - can be installed via conda conda install libpng or any of the package managers for debian-based and RHEL-based Linux distributions.

  • libjpeg - can be installed via conda conda install jpeg or any of the package managers for debian-based and RHEL-based Linux distributions. libjpeg-turbo can be used as well.

Notes: libpng and libjpeg must be available at compilation time in order to be available. Make sure that it is available on the standard library locations, otherwise, add the include and library paths in the environment variables TORCHVISION_INCLUDE and TORCHVISION_LIBRARY, respectively.

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: https://pytorch.org/docs/stable/torchvision/index.html

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!

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.8.2-cp39-cp39-manylinux1_x86_64.whl (12.7 MB view details)

Uploaded CPython 3.9

torchvision-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

torchvision-0.8.2-cp38-cp38-manylinux1_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.8

torchvision-0.8.2-cp38-cp38-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

torchvision-0.8.2-cp37-cp37m-manylinux1_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.7m

torchvision-0.8.2-cp37-cp37m-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

torchvision-0.8.2-cp36-cp36m-manylinux1_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.6m

torchvision-0.8.2-cp36-cp36m-macosx_10_9_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: torchvision-0.8.2-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.7 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 976750a49db2e23dc5a1ed0b5c31f7af51ed2702eee410ee09ef985c3a3e48cf
MD5 b1f267268fe88985cfdd2ce92cf1e728
BLAKE2b-256 183964aa235e1f08c27d9fafd3aa317d081b45914f68a7a2a87b488fd0b69589

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1bd58acc3366ec02266aae56a7a752d43ef07de4a6ba420c4f907d0c9168bb8c
MD5 9bc0bd8c840a5c896dcbeecc7bcd5011
BLAKE2b-256 037ef6cee590418d9ce11a6a92fd2bc5510678e598197370f4a5ad8f8446cbaf

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: torchvision-0.8.2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cd8817e9197fc60ebae37162a445db90bbf35591314a5767ad3d1490b5d65b0f
MD5 c34e5b275826361940b131ca21e89270
BLAKE2b-256 239288de78810119baac2a3d9ae203d1a085df6ea5d3af557a151157436f81d3

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.8.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.8.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 afb76a66b9b0693f758a881a2bf333ed97e3c0c3f15a413c4f49d8dd8bd21307
MD5 2a39262c97eb348c6ee6071ec2aa9271
BLAKE2b-256 44bfedf227dc1afc239ce2958bd3fa9157558a7d374e62fde5b156df827d6a71

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.8.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: torchvision-0.8.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.8 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b068f6bcbe91bdd34dda0a39e8a26392add45a3be82543f6dd523b76484fb56f
MD5 ba6bb84be8b76dcae5d3035e5c2b80a0
BLAKE2b-256 94df969e69a94cff1c8911acb0688117f95e1915becc1e01c73e7960a2c76ec8

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.8.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.8.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 24db8f4c3d812a032273f68563ad5dbd724f5bfbed523d0c6dce8cede26bb153
MD5 2d653feac338e20b1293ebe5115b1bbd
BLAKE2b-256 8a8fcc7e0b18d73663786f28d70eced98cf10288a849687a10fc8fb60dbf7674

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.8.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: torchvision-0.8.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.8 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 951239b5fcb911dbf78c1385d677f5f48c7a1b12859e3d3ec287562821b17cf2
MD5 9e388049050fab938845b2295f6f80e6
BLAKE2b-256 19f1d1d9b2be9f50e840accfa180ec2fb759dd2504f2b3a12a232398d5fa00ae

See more details on using hashes here.

Provenance

File details

Details for the file torchvision-0.8.2-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: torchvision-0.8.2-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for torchvision-0.8.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 86fae370d222f76ad57c57c3bee03f78b8db727743bfb4c1559a3d395159cea8
MD5 20213c77de631ee627d149cc374a594a
BLAKE2b-256 9ea8bd195708a6602ea650472c3be9712288b710d4d743f1fda4ae7f76177229

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