13
13
class Grayscale (Transform ):
14
14
"""[BETA] Convert images or videos to grayscale.
15
15
16
- .. betastatus :: Grayscale transform
16
+ .. v2betastatus :: Grayscale transform
17
17
18
18
If the input is a :class:`torch.Tensor`, it is expected
19
19
to have [..., 3 or 1, H, W] shape, where ... means an arbitrary number of leading dimensions
@@ -42,7 +42,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
42
42
class RandomGrayscale (_RandomApplyTransform ):
43
43
"""[BETA] Randomly convert image or videos to grayscale with a probability of p (default 0.1).
44
44
45
- .. betastatus :: RandomGrayscale transform
45
+ .. v2betastatus :: RandomGrayscale transform
46
46
47
47
If the input is a :class:`torch.Tensor`, it is expected to have [..., 3 or 1, H, W] shape,
48
48
where ... means an arbitrary number of leading dimensions
@@ -76,7 +76,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
76
76
class ColorJitter (Transform ):
77
77
"""[BETA] Randomly change the brightness, contrast, saturation and hue of an image or video.
78
78
79
- .. betastatus :: ColorJitter transform
79
+ .. v2betastatus :: ColorJitter transform
80
80
81
81
If the input is a :class:`torch.Tensor`, it is expected
82
82
to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
@@ -182,7 +182,7 @@ class RandomPhotometricDistort(Transform):
182
182
"""[BETA] Randomly distorts the image or video as used in `SSD: Single Shot
183
183
MultiBox Detector <https://arxiv.org/abs/1512.02325>`_.
184
184
185
- .. betastatus :: RandomPhotometricDistort transform
185
+ .. v2betastatus :: RandomPhotometricDistort transform
186
186
187
187
This transform relies on :class:`~torchvision.transforms.v2.ColorJitter`
188
188
under the hood to adjust the contrast, saturation, hue, brightness, and also
@@ -282,7 +282,7 @@ def _transform(
282
282
class RandomEqualize (_RandomApplyTransform ):
283
283
"""[BETA] Equalize the histogram of the given image or video with a given probability.
284
284
285
- .. betastatus :: RandomEqualize transform
285
+ .. v2betastatus :: RandomEqualize transform
286
286
287
287
If the input is a :class:`torch.Tensor`, it is expected
288
288
to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
@@ -301,7 +301,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
301
301
class RandomInvert (_RandomApplyTransform ):
302
302
"""[BETA] Inverts the colors of the given image or video with a given probability.
303
303
304
- .. betastatus :: RandomInvert transform
304
+ .. v2betastatus :: RandomInvert transform
305
305
306
306
If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
307
307
where ... means it can have an arbitrary number of leading dimensions.
@@ -321,7 +321,7 @@ class RandomPosterize(_RandomApplyTransform):
321
321
"""[BETA] Posterize the image or video with a given probability by reducing the
322
322
number of bits for each color channel.
323
323
324
- .. betastatus :: RandomPosterize transform
324
+ .. v2betastatus :: RandomPosterize transform
325
325
326
326
If the input is a :class:`torch.Tensor`, it should be of type torch.uint8,
327
327
and it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
@@ -346,7 +346,7 @@ class RandomSolarize(_RandomApplyTransform):
346
346
"""[BETA] Solarize the image or video with a given probability by inverting all pixel
347
347
values above a threshold.
348
348
349
- .. betastatus :: RandomSolarize transform
349
+ .. v2betastatus :: RandomSolarize transform
350
350
351
351
If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
352
352
where ... means it can have an arbitrary number of leading dimensions.
@@ -370,7 +370,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
370
370
class RandomAutocontrast (_RandomApplyTransform ):
371
371
"""[BETA] Autocontrast the pixels of the given image or video with a given probability.
372
372
373
- .. betastatus :: RandomAutocontrast transform
373
+ .. v2betastatus :: RandomAutocontrast transform
374
374
375
375
If the input is a :class:`torch.Tensor`, it is expected
376
376
to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
@@ -389,7 +389,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
389
389
class RandomAdjustSharpness (_RandomApplyTransform ):
390
390
"""[BETA] Adjust the sharpness of the image or video with a given probability.
391
391
392
- .. betastatus :: RandomAdjustSharpness transform
392
+ .. v2betastatus :: RandomAdjustSharpness transform
393
393
394
394
If the input is a :class:`torch.Tensor`,
395
395
it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
0 commit comments