Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IGNF/FLAIR-1
/ functions
Functions
90 in github.com/IGNF/FLAIR-1
⨍
Functions
90
◇
Types & classes
12
↓ 6 callers
Function
norm
(num: float)
src/flair/tasks_utils.py:183
↓ 3 callers
Method
forward
(self, input_im, input_met)
src/flair/task_module.py:187
↓ 3 callers
Function
gather_paths
(config, split='train')
src/flair/tasks_utils.py:128
↓ 2 callers
Function
get_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 callers
Function
load_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 callers
Function
norm
(in_img : np.ndarray, norm_type : str = None, means : list = [], stds: list =
src/flair/data_loader.py:9
↓ 2 callers
Function
print_class_metrics
(class_dict, metrics_available=True)
src/flair/metrics.py:90
↓ 2 callers
Function
setup
(args)
src/zone_detect/main.py:54
↓ 2 callers
Method
step
(self, batch)
src/flair/task_module.py:65
↓ 1 callers
Method
__init__
( self, model, num_classes : int, use_metadata : bool = False, )
src/flair/task_module.py:175
↓ 1 callers
Method
__init__
(self)
src/flair/model.py:79
↓ 1 callers
Function
_format_hms
(td: datetime.timedelta)
src/zone_detect/main.py:46
↓ 1 callers
Function
check_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 callers
Function
class_IoU
(npcm,n_class)
src/flair/metrics.py:14
↓ 1 callers
Function
class_fscore
(precision, recall)
src/flair/metrics.py:29
↓ 1 callers
Function
class_precision
(npcm)
src/flair/metrics.py:19
↓ 1 callers
Function
class_recall
(npcm)
src/flair/metrics.py:24
↓ 1 callers
Method
close_raster
(self)
src/zone_detect/dataset.py:51
↓ 1 callers
Function
conf_log
(config, resolution, img_size)
src/zone_detect/main.py:91
↓ 1 callers
Function
convert
(img, img_type)
src/zone_detect/dataset.py:11
↓ 1 callers
Function
coordenc_opt
(coords, enc_size=32)
src/flair/tasks_utils.py:161
↓ 1 callers
Function
copy_csv_and_config
Copy the CSV files and configuration file to the output directory.
src/flair/main.py:63
↓ 1 callers
Function
create_box_from_bounds
(x_min, x_max, y_min, y_max)
src/zone_detect/slicing_job.py:14
↓ 1 callers
Function
create_polygon_from_bounds
(x_min, x_max, y_min, y_max)
src/zone_detect/slicing_job.py:10
↓ 1 callers
Function
cyclical_enc_datetime
(date: str, time: str)
src/flair/tasks_utils.py:182
↓ 1 callers
Function
format_cam
(cam: str)
src/flair/tasks_utils.py:179
↓ 1 callers
Method
forward
(self, input_im, input_met)
src/flair/task_module.py:61
↓ 1 callers
Function
get_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 callers
Function
get_datasets
Get the datasets for training, validation, and testing.
src/flair/main.py:50
↓ 1 callers
Function
get_module
(checkpoint: str | Path)
src/zone_detect/model.py:59
↓ 1 callers
Function
load_model
(config: Mapping)
src/zone_detect/model.py:76
↓ 1 callers
Function
main
()
src/zone_detect/main.py:156
↓ 1 callers
Function
main
()
src/flair/main.py:206
↓ 1 callers
Function
metrics
(config: dict, path_preds: str, remove_preds=False)
src/flair/metrics.py:35
↓ 1 callers
Function
norm_alti
(alti: int)
src/flair/tasks_utils.py:174
↓ 1 callers
Method
normalization
(self, in_img: np.ndarray, norm_type: str, means: list, stds: list)
src/zone_detect/dataset.py:56
↓ 1 callers
Function
overall_accuracy
(npcm)
src/flair/metrics.py:10
↓ 1 callers
Function
parsing_metadata
(image_path_list, config)
src/flair/tasks_utils.py:159
↓ 1 callers
Function
predict
This function makes predictions using the provided data module and segmentation module. Parameters: config (dict): Configuration
src/flair/tasks.py:113
↓ 1 callers
Function
predict_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 callers
Function
prepare
(config, device)
src/zone_detect/main.py:125
↓ 1 callers
Function
print_recap
Log content of given config using a tree structure.
src/flair/utils.py:11
↓ 1 callers
Function
read_config
(file_path)
src/zone_detect/main.py:42
↓ 1 callers
Function
read_config
(file_path)
src/flair/utils.py:5
↓ 1 callers
Method
read_img
(self, raster_file: str)
src/flair/data_loader.py:62
↓ 1 callers
Method
read_img
(self, raster_file: str)
src/flair/data_loader.py:127
↓ 1 callers
Method
read_msk
(self, raster_file: str, start_one)
src/flair/data_loader.py:67
↓ 1 callers
Function
setup_environment
This function reads the configuration file, creates the output directory, and sets up the logger.
src/flair/main.py:25
↓ 1 callers
Function
slice_extent
( in_img: str | Path, patch_size: int, margin: int, output_path: str | Path, outp
src/zone_detect/slicing_job.py:19
↓ 1 callers
Function
train
Trains a model using the provided data module and segmentation module. Parameters: config (dict): Configuration dictionary conta
src/flair/tasks.py:34
↓ 1 callers
Function
training_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 callers
Function
walk_config
Recursive function to accumulate branch.
src/flair/utils.py:14
↓ 1 callers
Method
write
(self, message)
src/zone_detect/main.py:34
↓ 1 callers
Method
write
(self, message)
src/flair/main.py:43
↓ 1 callers
Method
write_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
Method
configure_optimizers
(self)
src/flair/task_module.py:156
Method
flush
(self)
src/zone_detect/main.py:38
Method
flush
(self)
src/flair/main.py:47
Method
forward
(self, x, met=None)
src/zone_detect/model.py:50
Method
forward
(self, x, met=None)
src/flair/model.py:52
Method
forward
(self, x)
src/flair/model.py:94
Method
on_predict_batch_end
( self, trainer, pl_module, outputs, batc
src/flair/writer.py:53
Method
on_train_epoch_end
(self)
src/flair/task_module.py:88
Method
on_validation_epoch_end
(self)
src/flair/task_module.py:111
Method
predict_dataloader
(self)
src/flair/data_module.py:101
Method
predict_step
(self, batch, batch_idx, dataloader_idx=0)
src/flair/task_module.py:206
Method
prepare_data
(self)
src/flair/data_module.py:44
Method
setup
(self, stage=None)
src/flair/data_module.py:47
Method
setup
(self, stage=None)
src/flair/task_module.py:31
Method
step
(self, batch)
src/flair/task_module.py:191
Method
train_dataloader
(self)
src/flair/data_module.py:83
Method
training_step
(self, batch, batch_idx)
src/flair/task_module.py:82
Method
val_dataloader
(self)
src/flair/data_module.py:92
Method
validation_step
(self, batch, batch_idx)
src/flair/task_module.py:104