urbanlc.model.baseline.TMBaseline#

class urbanlc.model.baseline.TMBaseline(*args, **kwargs)#

TMBaseline class for LCC with classical ML using data from Landsat 4 - 7 (TM sensor)

Methods

build_model(model_params)

Build the specific model based on the provided model name and parameters.

construct_transform_map()

Construct transformation maps and functions to map between class labels, indices, and names.

infer(img_paths)

Perform inference on specified Landsat image paths and returns the inferred land cover maps.

load_model(checkpoint_path)

Load a pre-trained model from a checkpoint file.

retrieve_images(img_paths[, gt_paths, ...])

Retrieve and preprocess Landsat images and ground truth land cover data from specified paths for training/inference.

save_model(data)

Save the current model and related information to a checkpoint file.

train(img_paths, gt_paths[, enable_cv, ...])

Train the model using specified Landsat image and ground truth land cover paths, with optional cross-validation.

transform_pipeline(img)

Transform the input image using specified transformations.

update_transform_map(y_train)

Update the transform map based on the provided training labels.

validate(img_paths, gt_paths)

Validate the model using specified Landsat image and ground truth land cover paths.