torchvision
image and video datasets and models for torch deep learning
Decision gist · record as of 2026-08-14
Yes, if you are working with PyTorch on computer vision tasks. Torchvision is the standard library for this use case, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is moderate but manageable with pre-built wheels. Be aware of version alignment with torch and review dataset/model licenses for your use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torch to be installed first; torchvision version must match torch version (e.g., torchvision 0.28.0 requires torch 2.12).
- Medium install friction due to compiled dependencies on torch and pillow; however, pre-built wheels are available for current Python versions (3.10–3.14) across major platforms (macOS ARM64, Linux x86_64/aarch64, Windows).
- The package is actively maintained with a recent release.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions. Note that pre-trained models may carry their own licenses—SWAG models are released under CC-BY-NC 4.0—and datasets are user's responsibility to verify.
last release 2026-07-08 (37 days) · last repo commit 2026-08-13 · 17,862 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 44,025,406 downloads/mo, #636 on PyPI
Alternatives
Verify before relying
pip install torch torchvision pillow
import torchvision.transforms as transforms
from torchvision.datasets import CIFAR10
transform = transforms.Compose([transforms.ToTensor()])
dataset = CIFAR10(root='./data', download=True, transform=transform)- Whether Pillow-SIMD is automatically used or requires explicit installation for performance gains.
- GPU acceleration support and CUDA version compatibility for the 0.28.0 release.
What it is and what it does
Torchvision is PyTorch's official computer vision library, bundling datasets, model architectures, and image transformations into a single package. It sits atop torch, numpy, and pillow to provide standardized access to popular vision datasets (CIFAR-10, ImageNet, COCO, etc.) and pre-trained model weights for tasks like image classification, object detection, and segmentation.
The package is designed to reduce boilerplate in vision workflows by offering ready-to-use data loaders, common augmentation pipelines, and model checkpoints. It abstracts away dataset downloading, preprocessing, and model initialization, making it the de facto standard for PyTorch-based computer vision projects.
Use it for
- Load and preprocess standard vision datasets (CIFAR-10, ImageNet) for training or evaluation.
- Apply common image transformations (resizing, normalization, augmentation) in a composable pipeline.
- Initialize pre-trained model architectures for transfer learning or fine-tuning.
- Build object detection or segmentation pipelines using built-in model definitions.
- Prototype vision models quickly without writing custom data loading or transformation code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are working with PyTorch on computer vision tasks.
Torchvision is the standard library for this use case, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is moderate but manageable with pre-built wheels. Be aware of version alignment with torch and review dataset/model licenses for your use case.
Install
torchvision on PyPI
Before you install
Medium install friction due to compiled dependencies on torch and pillow; however, pre-built wheels are available for current Python versions (3.10–3.14) across major platforms (macOS ARM64, Linux x86_64/aarch64, Windows). The package is actively maintained with a recent release.
Requires torch to be installed first; torchvision version must match torch version (e.g., torchvision 0.28.0 requires torch 2.12).
License in practice
BSD permissive license allows commercial and private use with minimal restrictions. Note that pre-trained models may carry their own licenses—SWAG models are released under CC-BY-NC 4.0—and datasets are user's responsibility to verify.
Quickstart
pip install torch torchvision pillow
import torchvision.transforms as transforms
from torchvision.datasets import CIFAR10
transform = transforms.Compose([transforms.ToTensor()])
dataset = CIFAR10(root='./data', download=True, transform=transform)
Verify before relying
- Whether Pillow-SIMD is automatically used or requires explicit installation for performance gains.
- GPU acceleration support and CUDA version compatibility for the 0.28.0 release.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release !=3.14.1,>=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagesnumpytorchpillow |
| Maintenance | Actively maintained 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 44,025,406 / month, #636 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: torchvision-0.28.0-cp310-cp310-macosx_14_0_arm64.whl; torchvision-0.28.0-cp310-cp310-manylinux_2_28_aarch64.whl; torchvision-0.28.0-cp310-cp310-manylinux_2_28_x86_64.whl; torchvision-0.28.0-cp310-cp310-win_amd64.whl; torchvision-0.28.0-cp311-cp311-macosx_14_0_arm64.whl; torchvision-0.28.0-cp311-cp311-manylinux_2_28_aarch64.whl; torchvision-0.28.0-cp311-cp311-manylinux_2_28_x86_64.whl; torchvision-0.28.0-cp311-cp311-win_amd64.whl; torchvision-0.28.0-cp312-cp312-macosx_14_0_arm64.whl; torchvision-0.28.0-cp312-cp312-manylinux_2_28_aarch64.whl; torchvision-0.28.0-cp312-cp312-manylinux_2_28_x86_64.whl; torchvision-0.28.0-cp312-cp312-win_amd64.whl; torchvision-0.28.0-cp313-cp313-macosx_14_0_arm64.whl; torchvision-0.28.0-cp313-cp313-manylinux_2_28_aarch64.whl; torchvision-0.28.0-cp313-cp313-manylinux_2_28_x86_64.whl; torchvision-0.28.0-cp313-cp313-win_amd64.whl; torchvision-0.28.0-cp314-cp314-macosx_14_0_arm64.whl; torchvision-0.28.0-cp314-cp314-manylinux_2_28_aarch64.whl; torchvision-0.28.0-cp314-cp314-manylinux_2_28_x86_64.whl; torchvision-0.28.0-cp314-cp314t-macosx_14_0_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytorch computer vision models”
- torchvisionTorchvision provides pre-built datasets, model architectures, and…
- lightlyLightly provides self-supervised learning models and loss functions…
- pytorchcvProvides a collection of pretrained computer vision models for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also fvcore · torchgeo · torchtext · icevision · torchxrayvision · pytorchcv · pretrainedmodels · torchaudio · mmdet · spandrel