@@ -709,7 +709,7 @@ def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor:
709709
710710 Args:
711711 img (PIL Image or Tensor): Image to be adjusted.
712- If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
712+ If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
713713 where ... means it can have an arbitrary number of leading dimensions.
714714 brightness_factor (float): How much to adjust the brightness. Can be
715715 any non negative number. 0 gives a black image, 1 gives the
@@ -729,6 +729,8 @@ def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor:
729729
730730 Args:
731731 img (PIL Image or Tensor): Image to be adjusted.
732+ If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
733+ where ... means it can have an arbitrary number of leading dimensions.
732734 contrast_factor (float): How much to adjust the contrast. Can be any
733735 non negative number. 0 gives a solid gray image, 1 gives the
734736 original image while 2 increases the contrast by a factor of 2.
@@ -747,6 +749,8 @@ def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor:
747749
748750 Args:
749751 img (PIL Image or Tensor): Image to be adjusted.
752+ If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
753+ where ... means it can have an arbitrary number of leading dimensions.
750754 saturation_factor (float): How much to adjust the saturation. 0 will
751755 give a black and white image, 1 will give the original image while
752756 2 will enhance the saturation by a factor of 2.
@@ -776,6 +780,9 @@ def adjust_hue(img: Tensor, hue_factor: float) -> Tensor:
776780
777781 Args:
778782 img (PIL Image or Tensor): Image to be adjusted.
783+ If img is torch Tensor, it is expected to be in [..., 3, H, W] format,
784+ where ... means it can have an arbitrary number of leading dimensions.
785+ If img is PIL Image mode "1", "L", "I", "F" and modes with transparency (alpha channel) are not supported.
779786 hue_factor (float): How much to shift the hue channel. Should be in
780787 [-0.5, 0.5]. 0.5 and -0.5 give complete reversal of hue channel in
781788 HSV space in positive and negative direction respectively.
@@ -806,8 +813,9 @@ def adjust_gamma(img: Tensor, gamma: float, gain: float = 1) -> Tensor:
806813
807814 Args:
808815 img (PIL Image or Tensor): PIL Image to be adjusted.
809- If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
816+ If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
810817 where ... means it can have an arbitrary number of leading dimensions.
818+ If img is PIL Image, modes with transparency (alpha channel) are not supported.
811819 gamma (float): Non negative real number, same as :math:`\gamma` in the equation.
812820 gamma larger than 1 make the shadows darker,
813821 while gamma smaller than 1 make dark regions lighter.
@@ -1185,7 +1193,7 @@ def invert(img: Tensor) -> Tensor:
11851193
11861194 Args:
11871195 img (PIL Image or Tensor): Image to have its colors inverted.
1188- If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
1196+ If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
11891197 where ... means it can have an arbitrary number of leading dimensions.
11901198 If img is PIL Image, it is expected to be in mode "L" or "RGB".
11911199
@@ -1203,7 +1211,7 @@ def posterize(img: Tensor, bits: int) -> Tensor:
12031211
12041212 Args:
12051213 img (PIL Image or Tensor): Image to have its colors posterized.
1206- If img is a Tensor, it should be of type torch.uint8 and
1214+ If img is torch Tensor, it should be of type torch.uint8 and
12071215 it is expected to be in [..., 1 or 3, H, W] format, where ... means
12081216 it can have an arbitrary number of leading dimensions.
12091217 If img is PIL Image, it is expected to be in mode "L" or "RGB".
@@ -1225,7 +1233,7 @@ def solarize(img: Tensor, threshold: float) -> Tensor:
12251233
12261234 Args:
12271235 img (PIL Image or Tensor): Image to have its colors inverted.
1228- If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
1236+ If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
12291237 where ... means it can have an arbitrary number of leading dimensions.
12301238 If img is PIL Image, it is expected to be in mode "L" or "RGB".
12311239 threshold (float): All pixels equal or above this value are inverted.
@@ -1243,7 +1251,7 @@ def adjust_sharpness(img: Tensor, sharpness_factor: float) -> Tensor:
12431251
12441252 Args:
12451253 img (PIL Image or Tensor): Image to be adjusted.
1246- If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
1254+ If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
12471255 where ... means it can have an arbitrary number of leading dimensions.
12481256 sharpness_factor (float): How much to adjust the sharpness. Can be
12491257 any non negative number. 0 gives a blurred image, 1 gives the
@@ -1265,7 +1273,7 @@ def autocontrast(img: Tensor) -> Tensor:
12651273
12661274 Args:
12671275 img (PIL Image or Tensor): Image on which autocontrast is applied.
1268- If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
1276+ If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
12691277 where ... means it can have an arbitrary number of leading dimensions.
12701278 If img is PIL Image, it is expected to be in mode "L" or "RGB".
12711279
@@ -1285,7 +1293,7 @@ def equalize(img: Tensor) -> Tensor:
12851293
12861294 Args:
12871295 img (PIL Image or Tensor): Image on which equalize is applied.
1288- If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format,
1296+ If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
12891297 where ... means it can have an arbitrary number of leading dimensions.
12901298 If img is PIL Image, it is expected to be in mode "P", "L" or "RGB".
12911299
0 commit comments