image and video datasets and models for torch deep learning
Project description
torchvision
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!
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
Built Distributions
Hashes for torchvision-0.6.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea39bed9e9497a67c5f66e37d3d5a663a0284868ae8616de81f65c66d9ad802b |
|
MD5 | 46de551538d995d97d90ce9d8ea1c176 |
|
BLAKE2b-256 | 4597ec9acf1c3fae8d440ca9c786ca44e25534f0e155bac46c0e7dec7763eb1f |
Hashes for torchvision-0.6.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 691d68f3726b7392fe37db7184aef8a6b6f7cf6ff38fae769b287b3d6e1eb69a |
|
MD5 | 4f237e4e99f2302a6b281a5c97ec85dd |
|
BLAKE2b-256 | 715a389e5c7d8319a29f00167bdf052b69fd536e9ad713f855f165dbf9ac3781 |
Hashes for torchvision-0.6.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6eb4e0d7dc61030447b98d412162f222a95d848b3b0e484a81282c057af6dd25 |
|
MD5 | e38c90dbc7a4489382c18c1e451b0cc0 |
|
BLAKE2b-256 | 7beda894f274a7733d6492e438a5831a95b507c5ec777edf6d8c3b97574e08c4 |
Hashes for torchvision-0.6.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fa9e4a8381e5e04d0da0acd93f1429347053497ec343fe6d625b1b7fb2ce36e |
|
MD5 | 88b997d932dadb69bfa142b2e2774ce2 |
|
BLAKE2b-256 | fb63fbaffd7340c3c324279fb2b51846ba7f4f7705d469f1cb7578c586848016 |
Hashes for torchvision-0.6.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f43dae3b348afa5778439913ba1f3f176362ffc9e684ef01dc54dae7cf1b82e4 |
|
MD5 | 2358f794edb88103ab21d490dda39488 |
|
BLAKE2b-256 | 6151aa2770a70f612ce9a2fc7da3a1a93f9ecf8746788256fed6b691f9b31ca9 |
Hashes for torchvision-0.6.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8992f10a7860e0991766a788b546d5f11e3e7465e87a72eb9c78675dd2616400 |
|
MD5 | f8940d59a5ebe77fa9fa2b1da980c9de |
|
BLAKE2b-256 | 6822edc555cc6ad8a5e17d508da8447fe60d1e29207ae63164b35853d072774e |
Hashes for torchvision-0.6.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9b08435fdadd89520a78f5a54d196c05878d1a15e37f760d43f72f10bae308f |
|
MD5 | fa03292209aa4626eb6666a357cd3f3a |
|
BLAKE2b-256 | 26bd8be1a9342a9bb7b93f116c59ed8aebcb2eff5677fdc36de1dd3444d66fb3 |
Hashes for torchvision-0.6.0-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ea04a7e0f64599c158d36da01afd0cb3bc49033d2a145be4eb80c17c4c0482b |
|
MD5 | c903d7bb67dea500cc5998391d03c9fb |
|
BLAKE2b-256 | 2472de3dddfcb3e505fd08f99eb767e5091f52c4dd0c274fc2e5941ae6733fc6 |