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

SVHN dataset integration #634

Merged
merged 53 commits into from
Dec 14, 2021
Merged

SVHN dataset integration #634

merged 53 commits into from
Dec 14, 2021

Conversation

felixdittrich92
Copy link
Contributor

@felixdittrich92 felixdittrich92 commented Nov 18, 2021

This PR integrates the SVHN dataset for digit localization
#587

  • check boxes
  • rework _get_coords

Any suggestions are very welcome 🤗

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 Felix! I added a few suggestions, including switching to scipy

doctr/datasets/svhn.py Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
mypy.ini Outdated Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
@fg-mindee fg-mindee self-assigned this Nov 18, 2021
@fg-mindee fg-mindee added the module: datasets Related to doctr.datasets label Nov 18, 2021
@fg-mindee fg-mindee added this to the 0.6.0 milestone Nov 18, 2021
@felixdittrich92 felixdittrich92 changed the title [WIP] SVHN dataset integration SVHN dataset integration Nov 19, 2021
@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #634 (273598f) into main (618b0fa) will increase coverage by 0.13%.
The diff coverage is 94.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #634      +/-   ##
==========================================
+ Coverage   96.20%   96.34%   +0.13%     
==========================================
  Files         124      125       +1     
  Lines        4668     4707      +39     
==========================================
+ Hits         4491     4535      +44     
+ Misses        177      172       -5     
Flag Coverage Δ
unittests 96.34% <94.87%> (+0.13%) ⬆️

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

Impacted Files Coverage Δ
doctr/datasets/synthtext.py 97.22% <ø> (ø)
doctr/datasets/svhn.py 94.73% <94.73%> (ø)
doctr/datasets/__init__.py 100.00% <100.00%> (ø)
doctr/models/recognition/predictor/pytorch.py 90.90% <0.00%> (-6.07%) ⬇️
...dels/detection/differentiable_binarization/base.py 93.88% <0.00%> (+2.77%) ⬆️
doctr/models/detection/linknet/base.py 89.10% <0.00%> (+3.96%) ⬆️

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 618b0fa...273598f. Read the comment docs.

@felixdittrich92 felixdittrich92 marked this pull request as ready for review November 19, 2021 10:54
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 snippet to replace the data unpacking part 👍

doctr/datasets/svhn.py Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
doctr/datasets/svhn.py Outdated Show resolved Hide resolved
doctr/datasets/svhn.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.

#694 is merged 👍

I realized SVHN is processing train & test sets exactly the same way, so no need for the extra test case!

tests/pytorch/test_datasets_pt.py Outdated Show resolved Hide resolved
tests/pytorch/test_datasets_pt.py Outdated Show resolved Hide resolved
tests/pytorch/test_datasets_pt.py Outdated Show resolved Hide resolved
tests/pytorch/test_datasets_pt.py Outdated Show resolved Hide resolved
@felixdittrich92 felixdittrich92 changed the title [WIP] SVHN dataset integration SVHN dataset integration Dec 13, 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.

That's some neat monkeypatching 👍
Thanks a lot!

@fg-mindee fg-mindee merged commit c32c1ed into mindee:main Dec 14, 2021
@fg-mindee fg-mindee added ext: docs Related to docs folder type: new feature New feature labels Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: docs Related to docs folder module: datasets Related to doctr.datasets type: new feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants