Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Heuristic:Fastai Fastbook Progressive Resizing

From Leeroopedia




Knowledge Sources
Domains Computer_Vision, Data_Augmentation
Last Updated 2026-02-09 17:00 GMT

Overview

Start training with smaller images and gradually increase to full resolution; acts as both a speed optimization and data augmentation technique.

Description

Progressive resizing is a training technique where you begin training with smaller images (e.g., 128px) and then increase the image size partway through training (e.g., to 224px). This provides two benefits: faster initial training (smaller images process faster) and an additional form of data augmentation (the model sees the same content at different scales). It works because fully convolutional networks and networks with adaptive pooling can accept arbitrary input sizes.

Usage

Use this heuristic when:

  • Training from scratch: Progressive resizing helps most when not using transfer learning, as it provides regularization similar to Mixup
  • Limited compute: Smaller images in early epochs significantly reduce training time
  • Different target domain: If the transfer learning task uses images of different sizes/styles than the pretraining data

Caution: For standard transfer learning (e.g., ImageNet pretrained model on similar photographs), progressive resizing may actually hurt performance because the pretrained model expects full-resolution features.

The Insight (Rule of Thumb)

  • Action: Create a `get_dls` function parameterized by image size. Train first with smaller size, then recreate DataLoaders with larger size and continue training.
  • Value: Start at ~50-60% of target resolution (e.g., 128px → 224px). No fixed formula; experiment based on dataset.
  • Trade-off: Faster training and better generalization when training from scratch; may hurt performance in standard transfer learning scenarios.

Reasoning

When you resize images to a smaller size, each image is effectively a different augmentation of the original (different pixels are selected during downsampling). When you later switch to larger images, the model encounters what appears to be entirely new data, even though it is the same underlying images. This provides regularization without any additional data collection.

The technique works because of fully convolutional architectures and adaptive pooling layers, which can process images of any size. As noted in Ch14: "We don't have to do anything to account for the larger 224-pixel images; thanks to our fully convolutional network, it just works."

Code Evidence

Progressive resizing description from `07_sizing_and_tta.md:230`:

Gradually using larger and larger images as you train.

Benefits explained from `07_sizing_and_tta.md:233-234`:

There is an additional benefit to progressive resizing: it is another form of
data augmentation. To implement progressive resizing it is most convenient if
you first create a get_dls function.

Transfer learning caveat from `07_sizing_and_tta.md`:

Note that for transfer learning, progressive resizing may actually hurt
performance. If the transfer learning task is going to use images that are of
different sizes, shapes, or styles than those used in the pretraining task,
progressive resizing will probably help.

Fully convolutional support from `14_resnet.md`:

We don't have to do anything to account for the larger 224-pixel images;
thanks to our fully convolutional network, it just works. This is also why
we were able to do progressive resizing earlier in the book.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment