未验证 提交 ab6ca82d 编写于 作者: N nuaaceieyty 提交者: GitHub

Fixed some spelling errors and corrected ImageError to UnidentifiedImageError (#3846)

上级 3ae14656
......@@ -108,7 +108,8 @@ class LetterBoxResize(BaseOperator):
if not isinstance(im, np.ndarray):
raise TypeError("{}: image type is not numpy.".format(self))
if len(im.shape) != 3:
raise ImageError('{}: image is not 3-dimensional.'.format(self))
from PIL import UnidentifiedImageError
raise UnidentifiedImageError('{}: image is not 3-dimensional.'.format(self))
# apply image
height, width = self.target_size
......@@ -135,7 +136,7 @@ class MOTRandomAffine(BaseOperator):
Args:
degrees (list[2]): the rotate range to apply, transform range is [min, max]
translate (list[2]): the translate range to apply, ransform range is [min, max]
translate (list[2]): the translate range to apply, transform range is [min, max]
scale (list[2]): the scale range to apply, transform range is [min, max]
shear (list[2]): the shear range to apply, transform range is [min, max]
borderValue (list[3]): value used in case of a constant border when appling
......
......@@ -199,7 +199,7 @@ class RandomErasingImage(BaseOperator):
super(RandomErasingImage, self).__init__()
self.prob = prob
self.lower = lower
self.heigher = heigher
self.higher = higher
self.aspect_ratio = aspect_ratio
def apply(self, sample):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册