We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1974d9 commit ae08a1eCopy full SHA for ae08a1e
doctr/models/_utils.py
@@ -63,7 +63,7 @@ def estimate_orientation(
63
thresh = img.astype(np.uint8)
64
65
page_orientation, orientation_confidence = general_page_orientation or (None, 0.0)
66
- if page_orientation and orientation_confidence >= min_confidence:
+ if page_orientation is not None and orientation_confidence >= min_confidence:
67
# We rotate the image to the general orientation which improves the detection
68
# No expand needed bitmap is already padded
69
thresh = rotate_image(thresh, -page_orientation)
0 commit comments