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 the box cropping from RandomCrop #772

Merged
merged 6 commits into from
Dec 30, 2021
Merged

fix: Fixed the box cropping from RandomCrop #772

merged 6 commits into from
Dec 30, 2021

Conversation

fg-mindee
Copy link
Contributor

This PR introduces the following modifications:

  • fixed the box cropping part of RandomCrop: a previous PR fixed the cropping of the image, but there was some offset left to correct and some rescaling to do
  • updated unittests to avoid missing this next time
  • took the liberty of refactoring numpy part into a shared crop_boxes function to avoid duplication

Any feedback is welcome!

@fg-mindee fg-mindee added type: bug Something isn't working ext: tests Related to tests folder module: transforms Related to doctr.transforms labels Dec 29, 2021
@fg-mindee fg-mindee added this to the 0.5.0 milestone Dec 29, 2021
@fg-mindee fg-mindee self-assigned this Dec 29, 2021
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #772 (cadeb52) into main (df162db) will increase coverage by 0.02%.
The diff coverage is 95.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #772      +/-   ##
==========================================
+ Coverage   95.92%   95.94%   +0.02%     
==========================================
  Files         129      130       +1     
  Lines        4857     4857              
==========================================
+ Hits         4659     4660       +1     
+ Misses        198      197       -1     
Flag Coverage Δ
unittests 95.94% <95.83%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
doctr/transforms/functional/base.py 93.75% <93.75%> (ø)
doctr/transforms/functional/pytorch.py 100.00% <100.00%> (+2.27%) ⬆️
doctr/transforms/functional/tensorflow.py 97.72% <100.00%> (+1.57%) ⬆️
doctr/transforms/modules/base.py 94.52% <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 df162db...cadeb52. Read the comment docs.

@fg-mindee
Copy link
Contributor Author

@charlesmindee the failing on test-evaluate is unrelated to this PR, so it's good for review 👍

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!

@fg-mindee fg-mindee merged commit 00df8a1 into main Dec 30, 2021
@fg-mindee fg-mindee deleted the crop-fix branch December 30, 2021 15:38
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: 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