InputPreprocessing
The input_preprocessing key of the config.
Defines how input tensors are prepared before being provided to the model. Each training dataset split (train, val, test) can have its own preprocessing configuration, as can input data at inference ("predict") time. All take their base configuration from "default", which can be overridden for each group.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
default | DefaultInputPreprocessing | yes | Default input preprocessing configuration | |
train | TrainInputPreprocessing | no | null | |
val | ValTestSplitInputPreprocessing | no | null | |
test | ValTestSplitInputPreprocessing | no | null | |
predict | PredictInputPreprocessing | no | null |
DefaultInputPreprocessing
Controls how windows are processed before being provided to the model.
This class applies default rules to all training-time splits (train/val/test), as well as the predict preprocessor at inference time. Most values can be overriden by the non-default preprocessors.
CONCEPTUAL OVERVIEW:
Raw windows are not passed directly into the model during forward passes. They are first cropped or tiled into "inputs", which may subsequently be transformed by one or more transformation functions, serially. Each "input" is treated as an independent item in a batch to the model.
A config author can define input_size to specify the edge length of each square crop, as well as input_mode, which determines whether the model will see a single random crop or the full grid of cropped inputs. Desired behavior here is variable based on the model, the data split, and whether we are performing fine-tuning or inference.
The size of the windows being provided to preprocessors is determined as follows:
- training time:
labeled_data_prep.window_preparer - inference time:
prediction_requests.partitioners
SCENARIOS:
Window size == input_size
═════════════════════════════════════════════════════════
input_mode has no practical effect — one input either way.
window
┌──────────┐
│ │
│ input │ input_size × input_size
│ (=window)│
│ │
└──────────┘
Window size > input_size
════════════════════════════════════════════════════════════════════
input_mode: all_tiles input_mode: single_random_crop
───────────────────── ──────────────────────────────
Tile the full window with Take ONE random input from
a grid of inputs (complete the window (used during
spatial coverage). training for augmentation
via random positioning).
window window
┌───────────────────────────┐ ┌───────────────────────────┐
│ ┌──────────┬──────────┐ │ │░░░░░░░░░░░░░░░░░░░░░░░░░░│
│ │ │ │ │ │░░░░░░░░░░░░░░░░░░░░░░░░░░│
│ │ input 1 │ input 2 │ │ │░░░░┌──────────┐░░░░░░░░░░│
│ │ │ │ │ │░░░░│ │░░░░░░░░░░│
│ ├──────────┼──────────┤ │ │░░░░│ random │░░░░░░░░░░│
│ │ │ │ │ │░░░░│ input │░░░░░░░░░░│
│ │ input 3 │ input 4 │ │ │░░░░│ │░░░░░░░░░░│
│ │ │ │ │ │░░░░└──────────┘░░░░░░░░░░│
│ └──────────┴──────────┘ │ │░░░░░░░░░░░░░░░░░░░░░░░░░░│
└───────────────────────────┘ └───────────────────────────┘
Each input is input_size Input is input_size × input_size
× input_size. Edge inputs at a random position.
may overlap at predict time ░ = window pixels not seen
(see PredictInputPreprocessing by the model in this pass.
.overlap_pixels).
Window size < input_size
═════════════════════════════════════════════════════════
INVALID — raises an error at runtime. The window must be at least as large as input_size.
NOTE:
input_mode is inherited by the val and test splits (unless overridden per-split), however:
trainalways usessingle_random_croppredictalways tiles
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
input_size | integer (≥ 1) | yes | Side length of the square input fed to the model. | |
input_mode | InputMode | yes | How windows are converted to model inputs. all_tiles: tile the full window with a grid of inputs (complete spatial coverage). single_random_crop: take one random input from the window (training augmentation via random positioning). Inherited by val/test splits unless overridden per-split. Train always uses single_random_crop regardless of this setting. Predict always tiles regardless of this setting. | |
transforms | array of Transform | no | null | The transforms to apply to the input tensors before they are provided to the model. |
TrainInputPreprocessing
Training split must always use single random crop.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
transforms | array of Transform | no | null | Transforms to apply to inputs. Replaces default transforms; takes precedence over additional_transforms. |
additional_transforms | array of Transform | no | null | Additional transforms to apply beyond the default transforms. |
sampler | TrainingSampler | no | null | Samples down the data to a smaller set based on the given strategy. |
input_mode | "single_random_crop" | no | "single_random_crop" |
ValTestSplitInputPreprocessing
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
transforms | array of Transform | no | null | Transforms to apply to inputs. Replaces default transforms; takes precedence over additional_transforms. |
additional_transforms | array of Transform | no | null | Additional transforms to apply beyond the default transforms. |
sampler | TrainingSampler | no | null | Samples down the data to a smaller set based on the given strategy. |
input_mode | InputMode | no | null | How windows are converted to model inputs. Overrides the default value for this split. |
PredictInputPreprocessing
Preprocessing overrides for the predict (inference) split.
overlap_pixels controls how much adjacent inputs overlap when tiling a window. Used to reduce boundary artifacts in dense prediction (i.e. segmentation, per-pixel regression, embeddings)::
overlap_pixels = 0 overlap_pixels > 0
──────────────────────────────────── ───────────────────────────────────────
window window
┌─────────────────────────────────┐ ┌─────────────────────────────────────┐
│ ┌──────────────┬──────────────┐ │ │ ┌──────────────┬────┬──────────────┐ │
│ │ │ │ │ │ │ │····│ │ │
│ │ │ │ │ │ │ │····│ │ │
│ │ input 1 │ input 2 │ │ │ │ input 1 │····│ input 2 │ │
│ │ │ │ │ │ │ │····│ │ │
│ │ │ │ │ │ │ │····│ │ │
│ ├──────────────┼──────────────┤ │ │ ├──────────────┼────┼──────────────┤ │
│ │ │ │ │ │ │··············│····│··············│ │
│ │ │ │ │ │ ├──────────────┼────┼──────────────┤ │
│ │ input 3 │ input 4 │ │ │ │ │····│ │ │
│ │ │ │ │ │ │ │····│ │ │
│ │ │ │ │ │ │ input 3 │····│ input 4 │ │
│ └──────────────┴──────────────┘ │ │ │ │····│ │ │
└─────────────────────────────────┘ │ │ │····│ │ │
│ └──────────────┴────┴──────────────┘ │
No shared pixels between └─────────────────────────────────────┘
adjacent inputs.
···· = overlap region seen by
adjacent inputs; predictions
merged by the postprocessor.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
overlap_pixels | integer (≥ 0) | no | 0 | Overlap between adjacent inputs when tiling; also used when merging inference outputs. Not relevant for vector-based tasks. |
transforms | array of Transform | no | null | Transforms to apply to inputs. Replaces default transforms; takes precedence over additional_transforms. |
additional_transforms | array of Transform | no | null | Additional transforms to apply beyond the default transforms. |
InputMode
Allowed values: "single_random_crop", "all_tiles"
Transform
One of the following, selected by its name field:
name | Type |
|---|---|
manual | EscapeHatchComponent |
olmoearth_normalize | OlmoEarthNormalize |
random_flip | RandomFlip |
sentinel1_to_decibels | Sentinel1ToDecibels |
TrainingSampler
One of the following, selected by its name field:
name | Type |
|---|---|
random | RandomSampler |
OlmoEarthNormalize
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "olmoearth_normalize" | yes |
RandomFlip
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "random_flip" | yes | ||
x | boolean | no | true | Flip the image horizontally |
y | boolean | no | true | Flip the image vertically |
Sentinel1ToDecibels
Convert Sentinel-1 RTC data from linear to decibel scale.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "sentinel1_to_decibels" | yes |
RandomSampler
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "random" | yes | ||
num_samples | integer (≥ 0) | yes | The number of samples to take | |
replace | boolean | no | false | Whether sampled items can be sampled again |