Skip to content

Commit

Permalink
correct median
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Oct 5, 2023
1 parent bfe71b4 commit 434c0b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctr/models/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 434c0b5

Please sign in to comment.