Skip to content

Commit

Permalink
remove max check
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Jul 9, 2024
1 parent a2b1e9b commit 7391db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onnxtr/models/preprocessor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def sample_transforms(self, x: np.ndarray) -> np.ndarray:
# Resizing
x = self.resize(x)
# Data type & 255 division
if x.dtype == np.uint8 or np.max(x) > 1:
if x.dtype == np.uint8:
x = x.astype(np.float32) / 255.0

return x
Expand Down

0 comments on commit 7391db8

Please sign in to comment.