| 
1 | 1 | .. _transforms:  | 
2 | 2 | 
 
  | 
3 |  | -Transforming and augmenting images  | 
4 |  | -==================================  | 
 | 3 | +Transforming images, videos, boxes and more  | 
 | 4 | +===========================================  | 
5 | 5 | 
 
  | 
6 | 6 | .. currentmodule:: torchvision.transforms  | 
7 | 7 | 
 
  | 
8 | 8 | Torchvision supports common computer vision transformations in the  | 
9 |  | -``torchvision.transforms`` and ``torchvision.transforms.v2`` modules. Transforms  | 
10 |  | -can be used to transform or augment data for training or inference of different  | 
11 |  | -tasks (image classification, detection, segmentation, video classification).  | 
 | 9 | +``torchvision.transforms.v2`` module. Transforms can be used to transform and  | 
 | 10 | +augment data, for both training or inference. The following objects are  | 
 | 11 | +supported:  | 
 | 12 | + | 
 | 13 | +- Images as pure tensors, :class:`~torchvision.tv_tensors.Image` or PIL image  | 
 | 14 | +- Videos as :class:`~torchvision.tv_tensors.Video`   | 
 | 15 | +- Axis-aligned and rotated bounding boxes as :class:`~torchvision.tv_tensors.BoundingBoxes`   | 
 | 16 | +- Segmentation and detection masks as :class:`~torchvision.tv_tensors.Mask`   | 
 | 17 | +- KeyPoints as :class:`~torchvision.tv_tensors.KeyPoints`.  | 
12 | 18 | 
 
  | 
13 | 19 | .. code:: python  | 
14 | 20 | 
  | 
@@ -111,9 +117,9 @@ In Torchvision 0.15 (March 2023), we released a new set of transforms available  | 
111 | 117 | in the ``torchvision.transforms.v2`` namespace. These transforms have a lot of  | 
112 | 118 | advantages compared to the v1 ones (in ``torchvision.transforms``):  | 
113 | 119 | 
 
  | 
114 |  | -- They can transform images **but also** bounding boxes, masks, or videos. This  | 
115 |  | -  provides support for tasks beyond image classification: detection, segmentation,  | 
116 |  | -  video classification, etc. See  | 
 | 120 | +- They can transform images **and also** bounding boxes, masks, videos and  | 
 | 121 | +  keypoints. This provides support for tasks beyond image classification:  | 
 | 122 | +  detection, segmentation, video classification, pose estimation, etc. See  | 
117 | 123 |   :ref:`sphx_glr_auto_examples_transforms_plot_transforms_getting_started.py`  | 
118 | 124 |   and :ref:`sphx_glr_auto_examples_transforms_plot_transforms_e2e.py`.  | 
119 | 125 | - They support more transforms like :class:`~torchvision.transforms.v2.CutMix`  | 
 | 
0 commit comments