1010
1111
1212class Grayscale (Transform ):
13- """[BETA] Convert images or videos to grayscale.
14-
15- .. v2betastatus:: Grayscale transform
13+ """Convert images or videos to grayscale.
1614
1715 If the input is a :class:`torch.Tensor`, it is expected
1816 to have [..., 3 or 1, H, W] shape, where ... means an arbitrary number of leading dimensions
@@ -32,9 +30,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
3230
3331
3432class RandomGrayscale (_RandomApplyTransform ):
35- """[BETA] Randomly convert image or videos to grayscale with a probability of p (default 0.1).
36-
37- .. v2betastatus:: RandomGrayscale transform
33+ """Randomly convert image or videos to grayscale with a probability of p (default 0.1).
3834
3935 If the input is a :class:`torch.Tensor`, it is expected to have [..., 3 or 1, H, W] shape,
4036 where ... means an arbitrary number of leading dimensions
@@ -59,9 +55,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
5955
6056
6157class ColorJitter (Transform ):
62- """[BETA] Randomly change the brightness, contrast, saturation and hue of an image or video.
63-
64- .. v2betastatus:: ColorJitter transform
58+ """Randomly change the brightness, contrast, saturation and hue of an image or video.
6559
6660 If the input is a :class:`torch.Tensor`, it is expected
6761 to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
@@ -163,10 +157,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
163157
164158
165159class RandomChannelPermutation (Transform ):
166- """[BETA] Randomly permute the channels of an image or video
167-
168- .. v2betastatus:: RandomChannelPermutation transform
169- """
160+ """Randomly permute the channels of an image or video"""
170161
171162 def _get_params (self , flat_inputs : List [Any ]) -> Dict [str , Any ]:
172163 num_channels , * _ = query_chw (flat_inputs )
@@ -177,11 +168,9 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
177168
178169
179170class RandomPhotometricDistort (Transform ):
180- """[BETA] Randomly distorts the image or video as used in `SSD: Single Shot
171+ """Randomly distorts the image or video as used in `SSD: Single Shot
181172 MultiBox Detector <https://arxiv.org/abs/1512.02325>`_.
182173
183- .. v2betastatus:: RandomPhotometricDistort transform
184-
185174 This transform relies on :class:`~torchvision.transforms.v2.ColorJitter`
186175 under the hood to adjust the contrast, saturation, hue, brightness, and also
187176 randomly permutes channels.
@@ -249,9 +238,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
249238
250239
251240class RandomEqualize (_RandomApplyTransform ):
252- """[BETA] Equalize the histogram of the given image or video with a given probability.
253-
254- .. v2betastatus:: RandomEqualize transform
241+ """Equalize the histogram of the given image or video with a given probability.
255242
256243 If the input is a :class:`torch.Tensor`, it is expected
257244 to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
@@ -268,9 +255,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
268255
269256
270257class RandomInvert (_RandomApplyTransform ):
271- """[BETA] Inverts the colors of the given image or video with a given probability.
272-
273- .. v2betastatus:: RandomInvert transform
258+ """Inverts the colors of the given image or video with a given probability.
274259
275260 If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
276261 where ... means it can have an arbitrary number of leading dimensions.
@@ -287,11 +272,9 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
287272
288273
289274class RandomPosterize (_RandomApplyTransform ):
290- """[BETA] Posterize the image or video with a given probability by reducing the
275+ """Posterize the image or video with a given probability by reducing the
291276 number of bits for each color channel.
292277
293- .. v2betastatus:: RandomPosterize transform
294-
295278 If the input is a :class:`torch.Tensor`, it should be of type torch.uint8,
296279 and it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
297280 If img is PIL Image, it is expected to be in mode "L" or "RGB".
@@ -312,11 +295,9 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
312295
313296
314297class RandomSolarize (_RandomApplyTransform ):
315- """[BETA] Solarize the image or video with a given probability by inverting all pixel
298+ """Solarize the image or video with a given probability by inverting all pixel
316299 values above a threshold.
317300
318- .. v2betastatus:: RandomSolarize transform
319-
320301 If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
321302 where ... means it can have an arbitrary number of leading dimensions.
322303 If img is PIL Image, it is expected to be in mode "L" or "RGB".
@@ -342,9 +323,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
342323
343324
344325class RandomAutocontrast (_RandomApplyTransform ):
345- """[BETA] Autocontrast the pixels of the given image or video with a given probability.
346-
347- .. v2betastatus:: RandomAutocontrast transform
326+ """Autocontrast the pixels of the given image or video with a given probability.
348327
349328 If the input is a :class:`torch.Tensor`, it is expected
350329 to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
@@ -361,9 +340,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
361340
362341
363342class RandomAdjustSharpness (_RandomApplyTransform ):
364- """[BETA] Adjust the sharpness of the image or video with a given probability.
365-
366- .. v2betastatus:: RandomAdjustSharpness transform
343+ """Adjust the sharpness of the image or video with a given probability.
367344
368345 If the input is a :class:`torch.Tensor`,
369346 it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
0 commit comments