The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.
We recommend Anaconda as Python package management system. Please refer to
Anaconda: pip: From source: In case building TorchVision from source fails, install the nightly version of PyTorch following
the linked guide on the Image Backend
Torchvision currently supports the following image backends: Notes: TorchVision also offers a C++ API that contains C++ equivalent of python models. Installation From source: Once installed, the library can be accessed in cmake (after properly configuring The For an example setup, take a look at In order to get the torchvision operators registered with torch (eg. for the JIT), all you need to do is to ensure that you
You can find the API documentation on the pytorch website: Contributing
See the CONTRIBUTING file for how to help out. 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!
torchtorchvisionpython
master / nightly
master / nightly
>=3.6
1.7.10.8.2>=3.6
1.7.00.8.1>=3.6
1.7.00.8.0>=3.6
1.6.00.7.0>=3.6
1.5.10.6.1>=3.5
1.5.00.6.0>=3.5
1.4.00.5.0
==2.7, >=3.5, <=3.8
1.3.10.4.2
==2.7, >=3.5, <=3.7
1.3.00.4.1
==2.7, >=3.5, <=3.7
1.2.00.4.0
==2.7, >=3.5, <=3.7
1.1.00.3.0
==2.7, >=3.5, <=3.7
<=1.0.10.2.2
==2.7, >=3.5, <=3.7
conda install torchvision -c pytorch
pip install torchvision
python setup.py install
# or, for OSX
# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
conda install libpng or any of the package managers for debian-based and RHEL-based Linux distributions.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
mkdir build
cd build
# Add -DWITH_CUDA=on support for the CUDA if needed
cmake ..
make
make install
CMAKE_PREFIX_PATH) via the TorchVision::TorchVision target:
find_package(TorchVision REQUIRED)
target_link_libraries(my-target PUBLIC TorchVision::TorchVision)
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.examples/cpp/hello_world.
TorchVision Operators
#include <torchvision/vision.h> in your project.
Documentation
Disclaimer on Datasets
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。