"Elements in transforms should be defined in 'paddlex.seg.transforms' or class of imgaug.augmenters.Augmenter, see docs here: https://paddlex.readthedocs.io/zh_CN/latest/apis/transforms/"
"Elements in transforms should be defined in 'paddlex.seg.transforms' or class of imgaug.augmenters.Augmenter, see docs here: https://paddlex.readthedocs.io/zh_CN/latest/apis/transforms/"
)
)
@staticmethod
defdecode_image(im,label):
ifisinstance(im,np.ndarray):
iflen(im.shape)!=3:
raiseException(
"im should be 3-dimensions, but now is {}-dimensions".
format(len(im.shape)))
else:
try:
im=cv2.imread(im)
except:
raiseValueError('Can\'t read The image file {}!'.format(im))