Skip to content

Commit

Permalink
move to pil
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Jul 8, 2024
1 parent 29c92a1 commit 73ad1ef
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 @@ -100,7 +100,7 @@ def __call__(self, x: Union[np.ndarray, List[np.ndarray]]) -> List[np.ndarray]:
if (x.shape[1], x.shape[2]) != self.resize.output_size:
x = np.array([self.resize(sample) for sample in 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
batches = [x]

Expand Down

0 comments on commit 73ad1ef

Please sign in to comment.