Configuration file
The configuration file contains various settings and parameters that control the behavior and settings of the project. Refer to the config-template.yaml file for more information.
dataset
Parameter | Type | Description |
---|---|---|
annot_dir |
| Slide annotations directory path. Should have the same names as that in slide_dir. |
create_zip |
| Bundle the created dataset directory in a ZIP for easier download. |
data_dir_name |
| Used to create |
downsample_factor |
| Downsample slides resolution by this factor. Defaults to preserve aspect ratio. |
downsample_size |
| Downsample slides to this size. |
n_splits |
| Number of splits for cross-validation. |
overlap |
| Overlap factor for extracting patches. Should be between 0 and 1. |
patch_size |
| Patch size for the patches. |
save_slides |
| Whether to save slides, in |
slide_dir |
| Slides directory path. Corresponding annotations should be in |
use_augment |
| Whether to use data augmentation at patch level for the train split. Preferably always use as True. |
gpu
Parameter | Type | Description |
---|---|---|
device_index |
| Device index for the GPU. Set to -1 to disable GPU and use CPU instead. |
heatmaps
Parameter | Type | Description |
---|---|---|
alpha |
| Heatmap transparency while overlaying on the slide. Should be between 0 and 1. |
blur |
| Gaussian blur kernel size for the heatmap. |
cmap |
| Colormap for the heatmap. Refer to matplotlib colormaps. |
downsample_factor |
| Downsample slides resolution by this factor (when |
downsample_size |
| Downsample slides to this size (when |
file_extension |
| File extension for the heatmap images to be saved. |
invert_preds |
| Whether to invert the predictions before making the heatmaps. Default is true. |
overlap |
| Overlap factor for the heatmap patches. Should be between 0 and 1. |
patch_dims |
| Patch dimensions for the heatmap. |
percentile_scale |
| Scale the heatmap values to percentile using |
percentile_score |
| Use percentile score for scaling the heatmap values using |
save_dir |
| Directory to save the heatmap images. Will be saved at |
source_dir |
| Path to the directory containing the slides. Used to get predictions for the heatmap. |
source_dir_annot |
| Path to the directory containing annotations corresponding to slides in |
use_plt |
| Use matplotlib to generate the heatmap images. If false, heatmaps will match original slide dimensions. |
model
_select
Parameter | Type | Description |
---|---|---|
classifier |
| Model to use for training and inference. Options: {CLAM_SB, EfficientNetB0, MobileNet, ResNet50, VGG16}. |
model-CLAM_SB
Parameter | Type | Description |
---|---|---|
k_sample |
| |
dropout |
| |
learning_rate |
| |
loss_weights |
| Keys: bag, instance |
patience |
| |
run_eagerly |
|
model-EfficientNetB0, model-MobileNet, model-ResNet50, model-VGG16
Parameter | Type | Description |
---|---|---|
freeze_ratio |
| |
learning_rate |
| |
patience |
| |
start_from_epoch |
|
trainer
Parameter | Type | Description |
---|---|---|
batch_size |
| Batch size for training. |
data_dir |
| Path to the directory containing the dataset. Should likely be |
evaluate_only |
| Evaluate the model on the test set only. Useful for evaluating a trained model. |
exp_base_dir |
| Base directory containing all the experiment folders. Usually |
exp_name |
| Current experiment name. Will create a directory in |
features_dir |
| Path to the directory containing the features, particularly for MIL datasets. |
folds |
| List of folds to be considered. Zero-indexed. |
max_epochs |
| Maximum number of epochs to train the model. |
overwrite_preds |
| Overwrite predictions if already present in |
patch_dims |
| Patch dimensions of the dataset. |
predictions_file |
| Filename of the predictions CSV file, without the extension. |
save_weights_only |
| Save only the model's weights during checkpointing. Useful for subclassed models in |
subset_size |
| Subset size of the dataset to use for training. Use |
use_augment |
| Whether to use augmented dataset for training ( |
Last updated