rslearn.train.transforms.resize¶
resize ¶
Resize transform.
Resize ¶
Bases: Transform
Resizes inputs to a target size.
Source code in rslearn/train/transforms/resize.py
apply_resize ¶
apply_resize(image: RasterImage) -> RasterImage
Apply resizing on the specified image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image
|
RasterImage
|
the image to transform. |
required |
Source code in rslearn/train/transforms/resize.py
forward ¶
forward(input_dict: dict[str, Any], target_dict: dict[str, Any]) -> tuple[dict[str, Any], dict[str, Any]]
Apply transform over the inputs and targets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_dict
|
dict[str, Any]
|
the input |
required |
target_dict
|
dict[str, Any]
|
the target |
required |
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
transformed (input_dicts, target_dicts) tuple |