TorchVision
PyTorch's vision toolbox, providing a large set of image and video transformation operators such as cropping, resizing, normalization, and data augmentation. torchvision.transforms offers v1 and v2 interfaces, with v2 supporting separation of parameters and randomness.
Timeline (last 90 days)
An important improvement in TorchVision transforms v2 is the separation of transform parameters from randomness, enabling the same set of transforms to be reproducibly used for validation and inference.
PyTorch officially recommends that when media needs to be transformed, TorchVision should be used for images and video.
torchvision.transforms provides a large number of composable transform operators, including both the v1 interface (for a single PIL image or tensor) and the v2 interface (which supports arbitrary input structures and can be composed with torch.nn.Module).
Separating the responsibilities of decoding/encoding from transforms allows the underlying codec dependencies and the upper-layer data augmentation logic to evolve independently, avoiding one library bearing two different sets of engineering burdens at the same time.
TorchVision itself has certain image reading and writing capabilities, and can also perform limited processing on video.
If code uses TorchVision to read video files directly, it may in the future need to migrate to TorchCodec for the I/O portion.
TorchVision 的 transforms 模块经历了 V1 到 V2 的迁移
All Facts (7)
An important improvement in TorchVision transforms v2 is the separation of transform parameters from randomness, enabling the same set of transforms to be reproducibly used for validation and inference.
50%UnverifiedPyTorch officially recommends that when media needs to be transformed, TorchVision should be used for images and video.
50%Unverifiedtorchvision.transforms provides a large number of composable transform operators, including both the v1 interface (for a single PIL image or tensor) and the v2 interface (which supports arbitrary input structures and can be composed with torch.nn.Module).
50%UnverifiedTorchVision itself has certain image reading and writing capabilities, and can also perform limited processing on video.
50%UnverifiedSeparating the responsibilities of decoding/encoding from transforms allows the underlying codec dependencies and the upper-layer data augmentation logic to evolve independently, avoiding one library bearing two different sets of engineering burdens at the same time.
50%UnverifiedTorchVision 的 transforms 模块经历了 V1 到 V2 的迁移
50%UnverifiedIf code uses TorchVision to read video files directly, it may in the future need to migrate to TorchCodec for the I/O portion.
50%