diff --git a/onnxtr/models/preprocessor/base.py b/onnxtr/models/preprocessor/base.py index 30fe5b9..546a56a 100644 --- a/onnxtr/models/preprocessor/base.py +++ b/onnxtr/models/preprocessor/base.py @@ -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