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

fix: default font writer for character classification dataset #418

Merged
merged 19 commits into from
Aug 23, 2021

Conversation

charlesmindee
Copy link
Collaborator

This PR replaces the default PIL font to FreeMono, to avoid the font size issue and UnicodeEncode issue.

Closes both #417 and #416

Any feedback is welcome!

@charlesmindee charlesmindee self-assigned this Aug 18, 2021
@charlesmindee charlesmindee added the module: datasets Related to doctr.datasets label Aug 18, 2021
@charlesmindee charlesmindee added this to the 0.3.1 milestone Aug 18, 2021
Copy link
Contributor

@fg-mindee fg-mindee left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Considering the user is supposed to be the only one to know which fonts are installed on her/his computer, I don't think it's a good idea to move forward with this PR (cf. my comment)

doctr/datasets/classification/base.py Outdated Show resolved Hide resolved
Copy link
Contributor

@fg-mindee fg-mindee left a comment

Choose a reason for hiding this comment

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

I added a suggestion to fix the CI and get a better user error/warning message

doctr/datasets/classification/base.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #418 (a9c32d6) into main (94e984c) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
+ Coverage   95.80%   95.84%   +0.03%     
==========================================
  Files          96       96              
  Lines        3937     3945       +8     
==========================================
+ Hits         3772     3781       +9     
+ Misses        165      164       -1     
Flag Coverage Δ
unittests 95.84% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
doctr/datasets/classification/base.py 92.10% <100.00%> (+1.48%) ⬆️
doctr/models/backbones/mobilenet/tensorflow.py 97.50% <0.00%> (+0.06%) ⬆️
...dels/detection/differentiable_binarization/base.py 91.97% <0.00%> (+0.61%) ⬆️

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 94e984c...a9c32d6. Read the comment docs.

fg-mindee
fg-mindee previously approved these changes Aug 23, 2021
Copy link
Contributor

@fg-mindee fg-mindee left a comment

Choose a reason for hiding this comment

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

Thanks! I added a last improvement suggestion, but it's optional

doctr/datasets/classification/base.py Outdated Show resolved Hide resolved
Copy link
Contributor

@fg-mindee fg-mindee left a comment

Choose a reason for hiding this comment

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

Thanks!

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants