urbanlc.model.deep_learning.DeepLearningLCC#

class urbanlc.model.deep_learning.DeepLearningLCC(architecture: str, model_params: Dict[str, Any], device: Optional[str] = None, seed: Optional[int] = 0, *args: Any, **kwargs: Any)#

Deep-learning-based Land Cover Classification (LCC) model.

Methods

build_model(architecture, model_params)

Build the deep learning model and moves it to the selected device.

construct_transform_map()

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

denormalize_class(gt)

Denormalize ground-truth labels.

get_metrics(mode)

Get metrics for the specified mode (Train or Val).

infer(img_path[, convert_numpy, cache, ...])

Perform inference using the deep learning model.

load_model(checkpoint_path)

Load a pre-trained model checkpoint.

normalize_class(gt)

Normalize ground-truth labels.

save_model(filename, current_epoch)

Save the current model checkpoint.

set_device(device)

Set the device for training or inference.

setup_trainer(loss_fn_params, ...)

Set up the trainer with loss functions, optimizer, and scheduler.

to(device)

Move the model to a different device.

train(dataloader_params, trainer_params, ...)

Train the deep learning model.

train_one_epoch(step, train_loader, epoch, ...)

Train the model for one epoch.

validate([root, img_glob, gt_glob, ...])

Validate the deep learning model.