diff --git a/ppocr/data/imaug/operators.py b/ppocr/data/imaug/operators.py index 3e02e10ff7..92dbff010d 100644 --- a/ppocr/data/imaug/operators.py +++ b/ppocr/data/imaug/operators.py @@ -50,8 +50,7 @@ def __call__(self, data): img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) elif self.img_mode == "RGB": assert img.shape[2] == 3, "invalid shape of image[%s]" % (img.shape) - img = img[:, :, ::-1] - + if self.channel_first: img = img.transpose((2, 0, 1))