[Fix] Remove image padding after rotation correction with straighten_pages=True by felixdittrich92 · Pull Request #1731 · mindee/doctr (original) (raw)
This PR:
- Fix padding removal after rotation correction
- Add function to remove the padding + corresponding test
Added as standalone function because of possible use later in another case instead of integration into rotate_image
Before:
After:
Any feedback is welcome 🤗
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 96.40%. Comparing base (9045dcf) to head (489a7c4).
Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@ ## main #1731 +/- ##
Coverage 96.40% 96.40%
Files 164 164
Lines 7782 7823 +41
- Hits 7502 7542 +40
- Misses 280 281 +1
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 96.40% <100.00%> (+<0.01%) | ⬆️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
Co-authored-by: Olivier Dulcy 106678676+odulcy-mindee@users.noreply.github.com
@odulcy-mindee btw the API fails actually (after the numpy 2.0 PR merge)
poetry install tf == 2.14 besides numpy 2.0 - which can't work 😅
and pip installs tf 2.15 besides numpy < 2.0 which is correct and works
Should we pin numpy < 2.0 in the api requirements or pyproject.toml for the moment ?
If the keras v3 stuff is done we can upgrade tf also and remove the pin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})

