Skip to content

do random resize on batched images#239

Open
isaacrob-roboflow wants to merge 1 commit intodevelopfrom
resize_aug_without_pad
Open

do random resize on batched images#239
isaacrob-roboflow wants to merge 1 commit intodevelopfrom
resize_aug_without_pad

Conversation

@isaacrob-roboflow
Copy link

Description

Right now we randomly resize each image independently and then pad the batch of images to have the same dimensions as the largest image. This means we waste compute and also that with probability ~1 the model doesn't see images of the target resolution without padding.

This PR moves the random resize to be directly in front of the forward pass. This gives slightly higher accuracy and slightly higher throughput.

It also fixes a bug where the expanded scales argument was ignored for Roboflow datasets. This should give slightly better results but slightly lower throughput.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this change been tested, please provide a testcase or example of how you tested the change?

Tested locally via a training script.

Any specific deployment considerations

For example, documentation changes, usability, usage/costs, secrets, etc.

Docs

  • Docs updated? What were the changes:

@Borda Borda added the enhancement New feature or request label Jan 22, 2026
@Borda Borda requested a review from Matvezy as a code owner January 30, 2026 02:47
@Borda Borda requested a review from isaacrob as a code owner February 11, 2026 15:57
@Borda Borda force-pushed the develop branch 4 times, most recently from 60b16c1 to 523f9df Compare February 14, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request has conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments