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

[transforms] small random resize improvement #1584

Merged
merged 5 commits into from
May 7, 2024

Conversation

felixdittrich92
Copy link
Contributor

This PR:

  • choose preserve aspect ratio and symmetric_pad also randomly to cover more cases

@felixdittrich92 felixdittrich92 added type: enhancement Improvement module: transforms Related to doctr.transforms labels May 5, 2024
@felixdittrich92 felixdittrich92 added this to the 0.9.0 milestone May 5, 2024
Copy link

codecov bot commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.23%. Comparing base (2940d9d) to head (54d57d4).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1584      +/-   ##
==========================================
- Coverage   96.35%   96.23%   -0.12%     
==========================================
  Files         163      163              
  Lines        7701     7706       +5     
==========================================
- Hits         7420     7416       -4     
- Misses        281      290       +9     
Flag Coverage Δ
unittests 96.23% <100.00%> (-0.12%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@odulcy-mindee odulcy-mindee left a comment

Choose a reason for hiding this comment

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

It's a bit curious to have only one parameter to control two behaviors. I mean, why not a parameter for preserve_aspect_ratio and symmetric_pad which can be a Union[bool, float], with float as a parameter to control the probability to set this param ?

@felixdittrich92
Copy link
Contributor Author

It's a bit curious to have only one parameter to control two behaviors. I mean, why not a parameter for preserve_aspect_ratio and symmetric_pad which can be a Union[bool, float], with float as a parameter to control the probability to set this param ?

Yeah that's a good idea 👍

Copy link
Collaborator

@odulcy-mindee odulcy-mindee left a comment

Choose a reason for hiding this comment

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

Definitively better, thank you !

@odulcy-mindee odulcy-mindee merged commit 0588750 into mindee:main May 7, 2024
73 of 81 checks passed
@felixdittrich92
Copy link
Contributor Author

Definitively better, thank you !

Yeah this was a good catch 👍

@felixdittrich92 felixdittrich92 deleted the dataloader branch August 30, 2024 11:31
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: enhancement Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants