PyTorch Vision is a utility library that provides datasets, model architectures, and image transformation tools specifically designed for computer vision tasks. Written primarily in Python, it serves as a companion library to PyTorch and integrates seamlessly with the broader PyTorch ecosystem. The library is maintained as part of the official PyTorch project and is documented at pytorch.org/vision.
The library's core functionality spans three main areas. First, it includes popular computer vision datasets that can be automatically downloaded and prepared for training and evaluation. Second, it provides pre-trained model architectures covering tasks such as image classification, object detection, and semantic segmentation. Third, it offers common image transformation utilities that enable data preprocessing and augmentation workflows. The library supports multiple image backends including standard PyTorch tensors, PIL images, and Pillow-SIMD, with Pillow-SIMD noted as a significantly faster drop-in replacement for standard Pillow implementations.
Installation and version management are carefully coordinated with PyTorch releases. The library maintains compatibility across multiple Python versions, with recent versions supporting Python 3.10 through 3.14. Version 0.27 of torchvision corresponds to PyTorch 2.12, while the main development branch supports the latest nightly builds of PyTorch. Historical version tables document compatibility back to torchvision 0.2 paired with PyTorch 1.0.
The library explicitly disclaims responsibility for dataset quality, fairness, and licensing. Users bear responsibility for determining whether they have permission to use included datasets under their respective licenses. Similarly, pre-trained models may carry their own licensing terms derived from training datasets. SWAG models specifically are released under the CC-BY-NC 4.0 license.