Skip to content

Commit

Permalink
Update operators.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zzk2021 authored Jan 3, 2025
1 parent e314510 commit 509cef8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ppocr/data/imaug/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 509cef8

Please sign in to comment.