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

Add option to use predefined aspect ratio buckets in the cropping transform #157

Merged
merged 5 commits into from
Jul 26, 2024

Conversation

coryMosaicML
Copy link
Collaborator

This PR adds an additional cropping transformation that makes use of a dataset key specifying the desired aspect ratio of samples within a stream. It can be used by specifying crop_type="bucketed_aspect_ratio" and seething the value of aspect_ratio_bucket_key.

Copy link
Contributor

@jazcollins jazcollins left a comment

Choose a reason for hiding this comment

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

The logic looks good to me!

I noticed a little typo in RandomCropAspectRatioTransorm and RandomCropBucketedAspectRatioTransorm (missing F in transform) so up to you if you wanna fix - doesn't affect anything because at least its consistent

@coryMosaicML coryMosaicML merged commit adebf01 into mosaicml:main Jul 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants