PKG-INFO 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. Metadata-Version: 2.1
  2. Name: torchvision
  3. Version: 0.13.1
  4. Summary: image and video datasets and models for torch deep learning
  5. Home-page: https://github.com/pytorch/vision
  6. Author: PyTorch Core Team
  7. Author-email: soumith@pytorch.org
  8. License: BSD
  9. Requires-Python: >=3.7
  10. Provides-Extra: scipy
  11. License-File: LICENSE
  12. torchvision
  13. ===========
  14. .. image:: https://pepy.tech/badge/torchvision
  15. :target: https://pepy.tech/project/torchvision
  16. .. image:: 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
  17. :target: https://pytorch.org/vision/stable/index.html
  18. The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.
  19. Installation
  20. ============
  21. We recommend Anaconda as Python package management system. Please refer to `pytorch.org <https://pytorch.org/>`_
  22. for the detail of PyTorch (``torch``) installation. The following is the corresponding ``torchvision`` versions and
  23. supported Python versions.
  24. +--------------------------+--------------------------+---------------------------------+
  25. | ``torch`` | ``torchvision`` | ``python`` |
  26. +==========================+==========================+=================================+
  27. | ``main`` / ``nightly`` | ``main`` / ``nightly`` | ``>=3.7``, ``<=3.10`` |
  28. +--------------------------+--------------------------+---------------------------------+
  29. | ``1.11.0`` | ``0.12.0`` | ``>=3.7``, ``<=3.10`` |
  30. +--------------------------+--------------------------+---------------------------------+
  31. | ``1.10.2`` | ``0.11.3`` | ``>=3.6``, ``<=3.9`` |
  32. +--------------------------+--------------------------+---------------------------------+
  33. | ``1.10.1`` | ``0.11.2`` | ``>=3.6``, ``<=3.9`` |
  34. +--------------------------+--------------------------+---------------------------------+
  35. | ``1.10.0`` | ``0.11.1`` | ``>=3.6``, ``<=3.9`` |
  36. +--------------------------+--------------------------+---------------------------------+
  37. | ``1.9.1`` | ``0.10.1`` | ``>=3.6``, ``<=3.9`` |
  38. +--------------------------+--------------------------+---------------------------------+
  39. | ``1.9.0`` | ``0.10.0`` | ``>=3.6``, ``<=3.9`` |
  40. +--------------------------+--------------------------+---------------------------------+
  41. | ``1.8.2`` | ``0.9.2`` | ``>=3.6``, ``<=3.9`` |
  42. +--------------------------+--------------------------+---------------------------------+
  43. | ``1.8.1`` | ``0.9.1`` | ``>=3.6``, ``<=3.9`` |
  44. +--------------------------+--------------------------+---------------------------------+
  45. | ``1.8.0`` | ``0.9.0`` | ``>=3.6``, ``<=3.9`` |
  46. +--------------------------+--------------------------+---------------------------------+
  47. | ``1.7.1`` | ``0.8.2`` | ``>=3.6``, ``<=3.9`` |
  48. +--------------------------+--------------------------+---------------------------------+
  49. | ``1.7.0`` | ``0.8.1`` | ``>=3.6``, ``<=3.8`` |
  50. +--------------------------+--------------------------+---------------------------------+
  51. | ``1.7.0`` | ``0.8.0`` | ``>=3.6``, ``<=3.8`` |
  52. +--------------------------+--------------------------+---------------------------------+
  53. | ``1.6.0`` | ``0.7.0`` | ``>=3.6``, ``<=3.8`` |
  54. +--------------------------+--------------------------+---------------------------------+
  55. | ``1.5.1`` | ``0.6.1`` | ``>=3.5``, ``<=3.8`` |
  56. +--------------------------+--------------------------+---------------------------------+
  57. | ``1.5.0`` | ``0.6.0`` | ``>=3.5``, ``<=3.8`` |
  58. +--------------------------+--------------------------+---------------------------------+
  59. | ``1.4.0`` | ``0.5.0`` | ``==2.7``, ``>=3.5``, ``<=3.8`` |
  60. +--------------------------+--------------------------+---------------------------------+
  61. | ``1.3.1`` | ``0.4.2`` | ``==2.7``, ``>=3.5``, ``<=3.7`` |
  62. +--------------------------+--------------------------+---------------------------------+
  63. | ``1.3.0`` | ``0.4.1`` | ``==2.7``, ``>=3.5``, ``<=3.7`` |
  64. +--------------------------+--------------------------+---------------------------------+
  65. | ``1.2.0`` | ``0.4.0`` | ``==2.7``, ``>=3.5``, ``<=3.7`` |
  66. +--------------------------+--------------------------+---------------------------------+
  67. | ``1.1.0`` | ``0.3.0`` | ``==2.7``, ``>=3.5``, ``<=3.7`` |
  68. +--------------------------+--------------------------+---------------------------------+
  69. | ``<=1.0.1`` | ``0.2.2`` | ``==2.7``, ``>=3.5``, ``<=3.7`` |
  70. +--------------------------+--------------------------+---------------------------------+
  71. Anaconda:
  72. .. code:: bash
  73. conda install torchvision -c pytorch
  74. pip:
  75. .. code:: bash
  76. pip install torchvision
  77. From source:
  78. .. code:: bash
  79. python setup.py install
  80. # or, for OSX
  81. # MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
  82. In case building TorchVision from source fails, install the nightly version of PyTorch following
  83. the linked guide on the `contributing page <https://github.com/pytorch/vision/blob/main/CONTRIBUTING.md#development-installation>`_ and retry the install.
  84. By default, GPU support is built if CUDA is found and ``torch.cuda.is_available()`` is true.
  85. It's possible to force building GPU support by setting ``FORCE_CUDA=1`` environment variable,
  86. which is useful when building a docker image.
  87. Image Backend
  88. =============
  89. Torchvision currently supports the following image backends:
  90. * `Pillow`_ (default)
  91. * `Pillow-SIMD`_ - a **much faster** drop-in replacement for Pillow with SIMD. If installed will be used as the default.
  92. * `accimage`_ - if installed can be activated by calling :code:`torchvision.set_image_backend('accimage')`
  93. * `libpng`_ - can be installed via conda :code:`conda install libpng` or any of the package managers for debian-based and RHEL-based Linux distributions.
  94. * `libjpeg`_ - can be installed via conda :code:`conda install jpeg` or any of the package managers for debian-based and RHEL-based Linux distributions. `libjpeg-turbo`_ can be used as well.
  95. **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,
  96. otherwise, add the include and library paths in the environment variables ``TORCHVISION_INCLUDE`` and ``TORCHVISION_LIBRARY``, respectively.
  97. .. _libpng : http://www.libpng.org/pub/png/libpng.html
  98. .. _Pillow : https://python-pillow.org/
  99. .. _Pillow-SIMD : https://github.com/uploadcare/pillow-simd
  100. .. _accimage: https://github.com/pytorch/accimage
  101. .. _libjpeg: http://ijg.org/
  102. .. _libjpeg-turbo: https://libjpeg-turbo.org/
  103. Video Backend
  104. =============
  105. Torchvision currently supports the following video backends:
  106. * `pyav`_ (default) - Pythonic binding for ffmpeg libraries.
  107. .. _pyav : https://github.com/PyAV-Org/PyAV
  108. * 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.
  109. .. code:: bash
  110. conda install -c conda-forge ffmpeg
  111. python setup.py install
  112. Using the models on C++
  113. =======================
  114. TorchVision provides an example project for how to use the models on C++ using JIT Script.
  115. Installation From source:
  116. .. code:: bash
  117. mkdir build
  118. cd build
  119. # Add -DWITH_CUDA=on support for the CUDA if needed
  120. cmake ..
  121. make
  122. make install
  123. Once installed, the library can be accessed in cmake (after properly configuring ``CMAKE_PREFIX_PATH``) via the :code:`TorchVision::TorchVision` target:
  124. .. code:: rest
  125. find_package(TorchVision REQUIRED)
  126. target_link_libraries(my-target PUBLIC TorchVision::TorchVision)
  127. The ``TorchVision`` package will also automatically look for the ``Torch`` package and add it as a dependency to ``my-target``,
  128. so make sure that it is also available to cmake via the ``CMAKE_PREFIX_PATH``.
  129. For an example setup, take a look at ``examples/cpp/hello_world``.
  130. Python linking is disabled by default when compiling TorchVision with CMake, this allows you to run models without any Python
  131. dependency. In some special cases where TorchVision's operators are used from Python code, you may need to link to Python. This
  132. can be done by passing ``-DUSE_PYTHON=on`` to CMake.
  133. TorchVision Operators
  134. ---------------------
  135. In order to get the torchvision operators registered with torch (eg. for the JIT), all you need to do is to ensure that you
  136. :code:`#include <torchvision/vision.h>` in your project.
  137. Documentation
  138. =============
  139. You can find the API documentation on the pytorch website: https://pytorch.org/vision/stable/index.html
  140. Contributing
  141. ============
  142. See the `CONTRIBUTING <CONTRIBUTING.md>`_ file for how to help out.
  143. Disclaimer on Datasets
  144. ======================
  145. 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.
  146. 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!
  147. Pre-trained Model License
  148. =========================
  149. 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.
  150. More specifically, SWAG models are released under the CC-BY-NC 4.0 license. See `SWAG LICENSE <https://github.com/facebookresearch/SWAG/blob/main/LICENSE>`_ for additional details.