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: Fixed expand_line for horizontal & vertical cases #842

Merged
merged 4 commits into from
Mar 8, 2022
Merged

Conversation

fg-mindee
Copy link
Contributor

This PR introduces the following modifications:

  • fixed expand_line for vertical & horizontal lines
  • adds clipping when using float in both frameworks
  • added unittests for expand_line

This fixes the randomly failing test we sometimes have on PRs

Any feedback is welcome!

@fg-mindee fg-mindee added type: bug Something isn't working module: transforms Related to doctr.transforms labels Mar 7, 2022
@fg-mindee fg-mindee added this to the 0.5.1 milestone Mar 7, 2022
@fg-mindee fg-mindee self-assigned this Mar 7, 2022
@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #842 (93ccf74) into main (0310d6c) will decrease coverage by 0.06%.
The diff coverage is 95.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #842      +/-   ##
==========================================
- Coverage   95.99%   95.93%   -0.07%     
==========================================
  Files         131      131              
  Lines        5042     5086      +44     
==========================================
+ Hits         4840     4879      +39     
- Misses        202      207       +5     
Flag Coverage Δ
unittests 95.93% <95.49%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
doctr/transforms/modules/pytorch.py 94.52% <80.00%> (-3.79%) ⬇️
doctr/transforms/modules/tensorflow.py 92.90% <90.90%> (-0.16%) ⬇️
doctr/transforms/functional/base.py 97.10% <98.14%> (+3.35%) ⬆️
doctr/io/pdf.py 100.00% <100.00%> (+1.66%) ⬆️
doctr/io/reader.py 100.00% <100.00%> (ø)
doctr/transforms/functional/pytorch.py 100.00% <100.00%> (ø)
doctr/transforms/functional/tensorflow.py 100.00% <100.00%> (ø)
doctr/models/_utils.py 97.59% <0.00%> (-1.21%) ⬇️
doctr/transforms/modules/base.py 94.59% <0.00%> (ø)

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 2581daa...93ccf74. Read the comment docs.

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 for this fix!

@fg-mindee fg-mindee merged commit c9806fa into main Mar 8, 2022
@fg-mindee fg-mindee deleted the expand-line branch March 8, 2022 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: transforms Related to doctr.transforms type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants