Skip to content

Pillow Resizing Option for FFCV Dataset Creation#297

Merged
andrewilyas merged 2 commits intolibffcv:v1.1.0from
warner-benjamin:pillow_resize
Apr 5, 2023
Merged

Pillow Resizing Option for FFCV Dataset Creation#297
andrewilyas merged 2 commits intolibffcv:v1.1.0from
warner-benjamin:pillow_resize

Conversation

@warner-benjamin
Copy link
Contributor

This PR adds the ability to use Pillow to resize images when creating a RGBField, which allows resizing images using antialiasing. It also adds an option to change the OpenCV interpolation, and a min_resolution setting.

I also changed the smart_threshold argstring to reflect what the code does. Perhaps the code the original argstring is referring too didn't get merged from a branch? Here is the current smart_threshold code:

if self.smart_threshold is not None:
    if image.nbytes > self.smart_threshold:
        write_mode = 'jpg'

@andrewilyas andrewilyas changed the base branch from main to v1.1.0 April 4, 2023 23:23
@andrewilyas
Copy link
Contributor

@warner-benjamin is this ready to be merged?

@warner-benjamin
Copy link
Contributor Author

It's ready to go. I realized forgot to push my doc changes and fixed it yesterday.

@andrewilyas andrewilyas merged commit 720cc2e into libffcv:v1.1.0 Apr 5, 2023
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.

2 participants