Skip to content

Commit

Permalink
Update operators.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Nov 12, 2024
1 parent 570a1a0 commit 4ee3164
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ppocr/data/imaug/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4ee3164

Please sign in to comment.