diff --git a/ppocr/data/imaug/operators.py b/ppocr/data/imaug/operators.py index 728314aade..3e02e10ff7 100644 --- a/ppocr/data/imaug/operators.py +++ b/ppocr/data/imaug/operators.py @@ -38,9 +38,7 @@ def __init__( def __call__(self, data): img = data["image"] - assert ( - type(img) is bytes and len(img) > 0 - ), "invalid input 'img' in DecodeImage" + assert type(img) is bytes and len(img) > 0, "invalid input 'img' in DecodeImage" img = np.frombuffer(img, dtype="uint8") if self.ignore_orientation: img = cv2.imdecode(img, cv2.IMREAD_IGNORE_ORIENTATION | cv2.IMREAD_COLOR)