From 7391db82d69ab29480332fe0e1488aed5bc123e5 Mon Sep 17 00:00:00 2001 From: felix Date: Tue, 9 Jul 2024 11:34:55 +0200 Subject: [PATCH] remove max check --- onnxtr/models/preprocessor/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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