MCPcopy Create free account

hub / github.com/IGNF/FLAIR-1 / functions

Functions90 in github.com/IGNF/FLAIR-1

↓ 6 callersFunctionnorm
(num: float)
src/flair/tasks_utils.py:183
↓ 3 callersMethodforward
(self, input_im, input_met)
src/flair/task_module.py:187
↓ 3 callersFunctiongather_paths
(config, split='train')
src/flair/tasks_utils.py:128
↓ 2 callersFunctionget_segmentation_module
This function creates a segmentation module for training or prediction. Parameters: config (dict): Configuration dictionary cont
src/flair/tasks_utils.py:66
↓ 2 callersFunctionload_checkpoint
Load model weights from a checkpoint file and adjust final classification layers for new number of classes if needed. Parameters:
src/flair/main.py:77
↓ 2 callersFunctionnorm
(in_img : np.ndarray, norm_type : str = None, means : list = [], stds: list =
src/flair/data_loader.py:9
↓ 2 callersFunctionprint_class_metrics
(class_dict, metrics_available=True)
src/flair/metrics.py:90
↓ 2 callersFunctionsetup
(args)
src/zone_detect/main.py:54
↓ 2 callersMethodstep
(self, batch)
src/flair/task_module.py:65
↓ 1 callersMethod__init__
( self, model, num_classes : int, use_metadata : bool = False, )
src/flair/task_module.py:175
↓ 1 callersMethod__init__
(self)
src/flair/model.py:79
↓ 1 callersFunction_format_hms
(td: datetime.timedelta)
src/zone_detect/main.py:46
↓ 1 callersFunctioncheck_batchnorm_and_batch_size
Check if the model contains BatchNorm layers and if the batch size is 1. If both conditions are met, print a message and abort the script.
src/flair/tasks.py:14
↓ 1 callersFunctionclass_IoU
(npcm,n_class)
src/flair/metrics.py:14
↓ 1 callersFunctionclass_fscore
(precision, recall)
src/flair/metrics.py:29
↓ 1 callersFunctionclass_precision
(npcm)
src/flair/metrics.py:19
↓ 1 callersFunctionclass_recall
(npcm)
src/flair/metrics.py:24
↓ 1 callersMethodclose_raster
(self)
src/zone_detect/dataset.py:51
↓ 1 callersFunctionconf_log
(config, resolution, img_size)
src/zone_detect/main.py:91
↓ 1 callersFunctionconvert
(img, img_type)
src/zone_detect/dataset.py:11
↓ 1 callersFunctioncoordenc_opt
(coords, enc_size=32)
src/flair/tasks_utils.py:161
↓ 1 callersFunctioncopy_csv_and_config
Copy the CSV files and configuration file to the output directory.
src/flair/main.py:63
↓ 1 callersFunctioncreate_box_from_bounds
(x_min, x_max, y_min, y_max)
src/zone_detect/slicing_job.py:14
↓ 1 callersFunctioncreate_polygon_from_bounds
(x_min, x_max, y_min, y_max)
src/zone_detect/slicing_job.py:10
↓ 1 callersFunctioncyclical_enc_datetime
(date: str, time: str)
src/flair/tasks_utils.py:182
↓ 1 callersFunctionformat_cam
(cam: str)
src/flair/tasks_utils.py:179
↓ 1 callersMethodforward
(self, input_im, input_met)
src/flair/task_module.py:61
↓ 1 callersFunctionget_data_module
This function creates a data module for training, validation, and testing. Parameters: config (dict): Configuration dictionary c
src/flair/tasks_utils.py:16
↓ 1 callersFunctionget_datasets
Get the datasets for training, validation, and testing.
src/flair/main.py:50
↓ 1 callersFunctionget_module
(checkpoint: str | Path)
src/zone_detect/model.py:59
↓ 1 callersFunctionload_model
(config: Mapping)
src/zone_detect/model.py:76
↓ 1 callersFunctionmain
()
src/zone_detect/main.py:156
↓ 1 callersFunctionmain
()
src/flair/main.py:206
↓ 1 callersFunctionmetrics
(config: dict, path_preds: str, remove_preds=False)
src/flair/metrics.py:35
↓ 1 callersFunctionnorm_alti
(alti: int)
src/flair/tasks_utils.py:174
↓ 1 callersMethodnormalization
(self, in_img: np.ndarray, norm_type: str, means: list, stds: list)
src/zone_detect/dataset.py:56
↓ 1 callersFunctionoverall_accuracy
(npcm)
src/flair/metrics.py:10
↓ 1 callersFunctionparsing_metadata
(image_path_list, config)
src/flair/tasks_utils.py:159
↓ 1 callersFunctionpredict
This function makes predictions using the provided data module and segmentation module. Parameters: config (dict): Configuration
src/flair/tasks.py:113
↓ 1 callersFunctionpredict_stage
Conducts the prediction stage of the model: sets up the prediction environment, loads the model weights from the training stage or a checkpoint
src/flair/main.py:187
↓ 1 callersFunctionprepare
(config, device)
src/zone_detect/main.py:125
↓ 1 callersFunctionprint_recap
Log content of given config using a tree structure.
src/flair/utils.py:11
↓ 1 callersFunctionread_config
(file_path)
src/zone_detect/main.py:42
↓ 1 callersFunctionread_config
(file_path)
src/flair/utils.py:5
↓ 1 callersMethodread_img
(self, raster_file: str)
src/flair/data_loader.py:62
↓ 1 callersMethodread_img
(self, raster_file: str)
src/flair/data_loader.py:127
↓ 1 callersMethodread_msk
(self, raster_file: str, start_one)
src/flair/data_loader.py:67
↓ 1 callersFunctionsetup_environment
This function reads the configuration file, creates the output directory, and sets up the logger.
src/flair/main.py:25
↓ 1 callersFunctionslice_extent
( in_img: str | Path, patch_size: int, margin: int, output_path: str | Path, outp
src/zone_detect/slicing_job.py:19
↓ 1 callersFunctiontrain
Trains a model using the provided data module and segmentation module. Parameters: config (dict): Configuration dictionary conta
src/flair/tasks.py:34
↓ 1 callersFunctiontraining_stage
Conducts the training stage of the model: sets up the training environment, loads the model weights from a checkpoint if available, trains
src/flair/main.py:150
↓ 1 callersFunctionwalk_config
Recursive function to accumulate branch.
src/flair/utils.py:14
↓ 1 callersMethodwrite
(self, message)
src/zone_detect/main.py:34
↓ 1 callersMethodwrite
(self, message)
src/flair/main.py:43
↓ 1 callersMethodwrite_on_batch_end
( self, trainer, pl_module, prediction, batch_indices, b
src/flair/writer.py:21
Method__getitem__
(self, index)
src/zone_detect/dataset.py:75
Method__getitem__
(self, index)
src/flair/data_loader.py:78
Method__getitem__
(self, index)
src/flair/data_loader.py:135
Method__init__
(self, dataframe, img_path, resolution,
src/zone_detect/dataset.py:28
Method__init__
(self, filename='Default.log')
src/zone_detect/main.py:29
Method__init__
( self, config, output_dir, write_interval, )
src/flair/writer.py:10
Method__init__
( self, dict_train : dict = None, dict_val : dict = None, dict_test : dict
src/flair/data_module.py:8
Method__init__
( self, model, class_infos : dict, criterion = None, optimizer =
src/flair/task_module.py:9
Method__init__
(self, dict_files : dict, channels : list = [1,2,3,4,5],
src/flair/data_loader.py:36
Method__init__
(self, dict_files : dict, channels : list = [1,2,3,4,5],
src/flair/data_loader.py:107
Method__init__
(self, filename='Default.log')
src/flair/main.py:38
Method__init__
(self, config, )
src/flair/model.py:20
Method__len__
(self)
src/zone_detect/dataset.py:47
Method__len__
(self)
src/flair/data_loader.py:75
Method__len__
(self)
src/flair/data_loader.py:132
Method__post_init__
(self)
src/zone_detect/model.py:23
Methodconfigure_optimizers
(self)
src/flair/task_module.py:156
Methodflush
(self)
src/zone_detect/main.py:38
Methodflush
(self)
src/flair/main.py:47
Methodforward
(self, x, met=None)
src/zone_detect/model.py:50
Methodforward
(self, x, met=None)
src/flair/model.py:52
Methodforward
(self, x)
src/flair/model.py:94
Methodon_predict_batch_end
( self, trainer, pl_module, outputs, batc
src/flair/writer.py:53
Methodon_train_epoch_end
(self)
src/flair/task_module.py:88
Methodon_validation_epoch_end
(self)
src/flair/task_module.py:111
Methodpredict_dataloader
(self)
src/flair/data_module.py:101
Methodpredict_step
(self, batch, batch_idx, dataloader_idx=0)
src/flair/task_module.py:206
Methodprepare_data
(self)
src/flair/data_module.py:44
Methodsetup
(self, stage=None)
src/flair/data_module.py:47
Methodsetup
(self, stage=None)
src/flair/task_module.py:31
Methodstep
(self, batch)
src/flair/task_module.py:191
Methodtrain_dataloader
(self)
src/flair/data_module.py:83
Methodtraining_step
(self, batch, batch_idx)
src/flair/task_module.py:82
Methodval_dataloader
(self)
src/flair/data_module.py:92
Methodvalidation_step
(self, batch, batch_idx)
src/flair/task_module.py:104