Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable page and crop orientation #1735

Merged
merged 10 commits into from
Sep 27, 2024

Conversation

milosacimovic
Copy link
Contributor

Hi @felixdittrich92 ,

I've merged your changes from disable orient prototype and slightly modified the function extract_rcrops which works better according to some of my internal tests.

@felixdittrich92
Copy link
Contributor

Hi @milosacimovic 👋
Thanks i will have a look asap 👍

@felixdittrich92
Copy link
Contributor

API test fail is fine will success after merge

@felixdittrich92
Copy link
Contributor

@milosacimovic Could you fix the mypy issue please https://github.com/mindee/doctr/actions/runs/11067610457/job/30751370517?pr=1735

@felixdittrich92 felixdittrich92 self-assigned this Sep 27, 2024
@felixdittrich92 felixdittrich92 added this to the 0.9.1 milestone Sep 27, 2024
@felixdittrich92 felixdittrich92 added topic: documentation Improvements or additions to documentation module: models Related to doctr.models module: utils Related to doctr.utils ext: tests Related to tests folder ext: demo Related to demo folder ext: api Related to api folder framework: pytorch Related to PyTorch backend framework: tensorflow Related to TensorFlow backend topic: character classification Related to the task of character classification type: new feature New feature ext: docs Related to docs folder labels Sep 27, 2024
@felixdittrich92
Copy link
Contributor

Overwrites: #1723

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.40%. Comparing base (9045dcf) to head (d386af7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1735   +/-   ##
=======================================
  Coverage   96.40%   96.40%           
=======================================
  Files         164      164           
  Lines        7782     7817   +35     
=======================================
+ Hits         7502     7536   +34     
- 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.

…er get executed when model is none for orientation classification
Copy link
Contributor

@felixdittrich92 felixdittrich92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @milosacimovic

LGTM now 👍
Really nice and useful feature 🥳

@felixdittrich92 felixdittrich92 linked an issue Sep 27, 2024 that may be closed by this pull request
@felixdittrich92 felixdittrich92 merged commit 420ab32 into mindee:main Sep 27, 2024
80 of 81 checks passed
@felixdittrich92
Copy link
Contributor

felixdittrich92 commented Sep 27, 2024

CC @nikokks
Using now with the ocr_predictor and assume_straight_pages=False and/or straighten_pages=True and/or detect_orientation

disable_crop_orientation=True,  # if all the text on doc is only horizontal
disable_page_orientation=True, # if your doc contains only small rotations (~ -45 - 45)

Should also speed up processing a lot :)

@felixdittrich92 felixdittrich92 modified the milestones: 0.9.1, 0.10.0 Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: api Related to api folder ext: demo Related to demo folder ext: docs Related to docs folder ext: tests Related to tests folder framework: pytorch Related to PyTorch backend framework: tensorflow Related to TensorFlow backend module: models Related to doctr.models module: utils Related to doctr.utils topic: character classification Related to the task of character classification topic: documentation Improvements or additions to documentation type: new feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flipped text recognition prediction.
2 participants