diff --git a/doctr/models/_utils.py b/doctr/models/_utils.py index af15487f9a..81c3fc6c1c 100644 --- a/doctr/models/_utils.py +++ b/doctr/models/_utils.py @@ -72,7 +72,7 @@ def estimate_orientation(img: np.ndarray, n_ct: int = 50, ratio_threshold_for_li return 0 # in case no angles is found else: median = -median_low(angles) - return median if median != 0 else 0 + return median if abs(median) != 0 else 0 def rectify_crops(