urbanlc.model.deep_learning.TMDeepLearning#
- class urbanlc.model.deep_learning.TMDeepLearning(*args, **kwargs)#
Deep-learning-based LCC for Landsat 4 - 7 (using TM sensor).
Methods
build_model
(architecture, model_params)Build the deep learning model and moves it to the selected device.
Construct transformation maps and functions to map between class labels, indices, and names.
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.