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

feat: Improved font resolution and page synthesis #472

Merged
merged 8 commits into from
Sep 15, 2021
Merged

Conversation

fg-mindee
Copy link
Contributor

This PR introduces the following modifications:

  • refactored all font selection code into a doctr.utils.fonts module (for character generation & page synthesis)
  • fixed typo synthetize_page --> synthesize_page
  • improve page synthesis thanks to the new font module
  • added a synthesize method to Document and Page
  • added synthesis visualization sample in the README
  • updated unittests
  • updated documentation

As shown in the README, here is how it renders:
synthesis sample

Any feedback is welcome!

@fg-mindee fg-mindee added topic: documentation Improvements or additions to documentation type: enhancement Improvement module: io Related to doctr.io module: utils Related to doctr.utils type: breaking change Introducing a breaking change module: datasets Related to doctr.datasets labels Sep 15, 2021
@fg-mindee fg-mindee added this to the 0.4.0 milestone Sep 15, 2021
@fg-mindee fg-mindee self-assigned this Sep 15, 2021
Copy link
Collaborator

@charlesmindee charlesmindee left a comment

Choose a reason for hiding this comment

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

Thanks!

@codecov
Copy link

codecov bot commented Sep 15, 2021

Codecov Report

Merging #472 (52814d1) into main (342239a) will increase coverage by 0.01%.
The diff coverage is 96.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #472      +/-   ##
==========================================
+ Coverage   95.36%   95.37%   +0.01%     
==========================================
  Files          96       97       +1     
  Lines        4053     4065      +12     
==========================================
+ Hits         3865     3877      +12     
  Misses        188      188              
Flag Coverage Δ
unittests 95.37% <96.42%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
doctr/utils/fonts.py 92.85% <92.85%> (ø)
doctr/datasets/classification/base.py 93.93% <100.00%> (+1.83%) ⬆️
doctr/io/elements.py 90.44% <100.00%> (+0.28%) ⬆️
doctr/models/recognition/__init__.py 100.00% <100.00%> (ø)
doctr/utils/visualization.py 93.57% <100.00%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fec8be...52814d1. Read the comment docs.

@fg-mindee fg-mindee merged commit 513c2c4 into main Sep 15, 2021
@fg-mindee fg-mindee deleted the synthesize branch September 15, 2021 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: datasets Related to doctr.datasets module: io Related to doctr.io module: utils Related to doctr.utils topic: documentation Improvements or additions to documentation type: breaking change Introducing a breaking change type: enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants