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

[prototype] Extend detection result customization #1449

Merged
merged 5 commits into from
Feb 8, 2024

Conversation

felixdittrich92
Copy link
Contributor

@felixdittrich92 felixdittrich92 commented Feb 2, 2024

This PR:

  • Make box_thresh also accessible for end users (same as bin_thresh)
  • Provide a way to add a hook / multiple hooks in the middle of the pipeline before cropping and recognition
  • Extend the docs

Any feedback is welcome

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f5445ef) 95.81% compared to head (70cac27) 95.83%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1449      +/-   ##
==========================================
+ Coverage   95.81%   95.83%   +0.02%     
==========================================
  Files         162      162              
  Lines        7101     7112      +11     
==========================================
+ Hits         6804     6816      +12     
+ Misses        297      296       -1     
Flag Coverage Δ
unittests 95.83% <100.00%> (+0.02%) ⬆️

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.

@felixdittrich92 felixdittrich92 changed the title [prototype] loc pred callbacks [prototype] Extend detection result customization Feb 5, 2024
@felixdittrich92 felixdittrich92 self-assigned this Feb 5, 2024
@felixdittrich92 felixdittrich92 added this to the 0.8.0 milestone Feb 5, 2024
@felixdittrich92 felixdittrich92 added topic: documentation Improvements or additions to documentation module: models Related to doctr.models ext: tests Related to tests folder topic: text detection Related to the task of text detection type: new feature New feature labels Feb 5, 2024
@felixdittrich92 felixdittrich92 linked an issue Feb 5, 2024 that may be closed by this pull request
@felixdittrich92 felixdittrich92 marked this pull request as ready for review February 5, 2024 08:39
demo/app.py Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to do the same on HF Space

Copy link
Contributor

Choose a reason for hiding this comment

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

yep this would be good afterwards :)

docs/source/using_doctr/using_models.rst Outdated Show resolved Hide resolved
docs/source/using_doctr/using_models.rst Show resolved Hide resolved
doctr/models/preprocessor/pytorch.py Show resolved Hide resolved
@felixdittrich92
Copy link
Contributor Author

@odulcy-mindee I added two points in the docs - as an advanced functionality for manipulation - i think it's better to mention it in the docs instead of producing some overhead to check after each hook that the coords are still relative in the range between 0 and 1 😅

@felixdittrich92
Copy link
Contributor Author

felixdittrich92 commented Feb 8, 2024

@odulcy-mindee I added two points in the docs - as an advanced functionality for manipulation - i think it's better to mention it in the docs instead of producing some overhead to check after each hook that the coords are still relative in the range between 0 and 1 😅

@dchaplinsky What do you think from a user perspective ? Is it clear enough from the docs that input/output structure needs to be the same and the coords are relative so it needs also to be returned as relative (0-1) or should we add a check for the value range and shape (which would produce a small overhead)

@odulcy-mindee
Copy link
Collaborator

@felixdittrich92 I'm fine with it !

Copy link
Collaborator

@odulcy-mindee odulcy-mindee left a comment

Choose a reason for hiding this comment

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

@felixdittrich92 Thnak you Felix, nice to have these hooks !

@felixdittrich92 felixdittrich92 merged commit 3811400 into mindee:main Feb 8, 2024
70 checks passed
@felixdittrich92 felixdittrich92 deleted the callback branch February 8, 2024 09:52
@dchaplinsky
Copy link

@felixdittrich92 well documented interface is enough. And the output format is dictated by the input format, so it will be strange if someone will receive relative coordinates and return absolute instead.

@felixdittrich92
Copy link
Contributor Author

@felixdittrich92 well documented interface is enough. And the output format is dictated by the input format, so it will be strange if someone will receive relative coordinates and return absolute instead.

Oh believe me i saw a lot 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: tests Related to tests folder module: models Related to doctr.models topic: documentation Improvements or additions to documentation topic: text detection Related to the task of text detection type: new feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modification/filtering of the bounding boxes before OCR
4 participants