patches=False# Divides input image into smaller patches (input size of the model) when set to true. For the model to see the full image, like page extraction, set this to false.
patches=False# Divides input image into smaller patches (input size of the model) when set to true. For the model to see the full image, like page extraction, set this to false.
augmentation=False# To apply any kind of augmentation, this parameter must be set to true.
augmentation=False# To apply any kind of augmentation, this parameter must be set to true.
flip_aug=False# If true, different types of flipping will be applied to the image. Types of flips are defined with "flip_index" in train.py.
flip_aug=False# If true, different types of flipping will be applied to the image. Types of flips are defined with "flip_index" in config_params.json.
blur_aug=False# If true, different types of blurring will be applied to the image. Types of blur are defined with "blur_k" in train.py.
blur_aug=False# If true, different types of blurring will be applied to the image. Types of blur are defined with "blur_k" in config_params.json.
scaling=False# If true, scaling will be applied to the image. The amount of scaling is defined with "scales" in train.py.
padding_white=False# If true, white padding will be applied to the image.
padding_black=False# If true, black padding will be applied to the image.
scaling=False# If true, scaling will be applied to the image. The amount of scaling is defined with "scales" in config_params.json.
degrading=False# If true, degrading will be applied to the image. The amount of degrading is defined with "degrade_scales" in config_params.json.
brightening=False# If true, brightening will be applied to the image. The amount of brightening is defined with "brightness" in config_params.json.
binarization=False# If true, Otsu thresholding will be applied to augment the input with binarized images.
binarization=False# If true, Otsu thresholding will be applied to augment the input with binarized images.
dir_train=None# Directory of training dataset with subdirectories having the names "images" and "labels".
dir_train=None# Directory of training dataset with subdirectories having the names "images" and "labels".
dir_eval=None# Directory of validation dataset with subdirectories having the names "images" and "labels".
dir_eval=None# Directory of validation dataset with subdirectories having the names "images" and "labels".
@ -52,12 +57,17 @@ def config_params():
pretraining=False# Set to true to load pretrained weights of ResNet50 encoder.
pretraining=False# Set to true to load pretrained weights of ResNet50 encoder.
scaling_bluring=False# If true, a combination of scaling and blurring will be applied to the image.
scaling_bluring=False# If true, a combination of scaling and blurring will be applied to the image.
scaling_binarization=False# If true, a combination of scaling and binarization will be applied to the image.
scaling_binarization=False# If true, a combination of scaling and binarization will be applied to the image.
scaling_brightness=False# If true, a combination of scaling and brightening will be applied to the image.
scaling_flip=False# If true, a combination of scaling and flipping will be applied to the image.
scaling_flip=False# If true, a combination of scaling and flipping will be applied to the image.
thetha=[10,-10]# Rotate image by these angles for augmentation.
thetha=None# Rotate image by these angles for augmentation.
blur_k=['blur','gauss','median']# Blur image for augmentation.
blur_k=None# Blur image for augmentation.
scales=[0.5,2]# Scale patches for augmentation.
scales=None# Scale patches for augmentation.
flip_index=[0,1,-1]# Flip image for augmentation.
degrade_scales=None# Degrade image for augmentation.
brightness=None# Brighten image for augmentation.
flip_index=None# Flip image for augmentation.
continue_training=False# Set to true if you would like to continue training an already trained a model.
continue_training=False# Set to true if you would like to continue training an already trained a model.
transformer_patchsize=None# Patch size of vision transformer patches.
num_patches_xy=None# Number of patches for vision transformer.
index_start=0# Index of model to continue training from. E.g. if you trained for 3 epochs and last index is 2, to continue from model_1.h5, set "index_start" to 3 to start naming model with index 3.
index_start=0# Index of model to continue training from. E.g. if you trained for 3 epochs and last index is 2, to continue from model_1.h5, set "index_start" to 3 to start naming model with index 3.
dir_of_start_model=''# Directory containing pretrained encoder to continue training the model.
dir_of_start_model=''# Directory containing pretrained encoder to continue training the model.
is_loss_soft_dice=False# Use soft dice as loss function. When set to true, "weighted_loss" must be false.
is_loss_soft_dice=False# Use soft dice as loss function. When set to true, "weighted_loss" must be false.