Skip to content

Commit

Permalink
Merge pull request WenmuZhou#199 from morestart/master
Browse files Browse the repository at this point in the history
fix RandomNoise class astype(im.dtype) to astype(data['img'].dtype)
  • Loading branch information
novioleo authored Sep 28, 2021
2 parents 31fa3ac + 6abd39d commit 83e9c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchocr/datasets/det_modules/augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __call__(self, data: dict):
"""
if random.random() > self.random_rate:
return data
data['img'] = (random_noise(data['img'], mode='gaussian', clip=True) * 255).astype(im.dtype)
data['img'] = (random_noise(data['img'], mode='gaussian', clip=True) * 255).astype(data['img'].dtype)
return data


Expand Down

0 comments on commit 83e9c45

Please sign in to comment.