Skip to content

Commit ae08a1e

Browse files
authored
Fix: Correct condition for image dilation in orientation estimation
1 parent d1974d9 commit ae08a1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doctr/models/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def estimate_orientation(
6363
thresh = img.astype(np.uint8)
6464

6565
page_orientation, orientation_confidence = general_page_orientation or (None, 0.0)
66-
if page_orientation and orientation_confidence >= min_confidence:
66+
if page_orientation is not None and orientation_confidence >= min_confidence:
6767
# We rotate the image to the general orientation which improves the detection
6868
# No expand needed bitmap is already padded
6969
thresh = rotate_image(thresh, -page_orientation)

0 commit comments

Comments
 (0)