Skip to content

Commit

Permalink
config file added
Browse files Browse the repository at this point in the history
  • Loading branch information
valhassan committed Dec 5, 2024
1 parent 916bb74 commit 2791f4f
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions configs/segformer_config_RGB.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
seed_everything: true

trainer:
accelerator: "gpu"
devices: -1
strategy:
class_path: lightning.pytorch.strategies.DDPStrategy
init_args:
find_unused_parameters: false
gradient_as_bucket_view: true
static_graph: true
gradient_clip_val: 1.0
precision: "16-mixed"
sync_batchnorm: true
logger:
class_path: lightning.pytorch.loggers.mlflow.MLFlowLogger
init_args:
save_dir: /home/valhassa/Projects/geo-deep-learning/logs
log_model: all
experiment_name: "gdl_experiment"
run_name: "gdl_run"
callbacks:
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
monitor: "val_loss"
mode: "min"
verbose: False
patience: 20
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
monitor: "val_loss"
mode: "min"
save_top_k: 1
filename: "model-{epoch:02d}-{val_loss:.3f}"
- class_path: tools.callbacks.segmentation_visualization.VisualizationCallback
init_args:
max_samples: 3
mean: ${data.init_args.mean}
std: ${data.init_args.std}
data_type_max: ${data.init_args.data_type_max}
num_classes: ${model.init_args.num_classes}
class_colors: ${model.init_args.class_colors}
max_epochs: 10

model:
class_path: tasks_with_models.segmentation_segformer.SegmentationSegformer
init_args:
encoder: "mit_b0" # "mit_b0", "mit_b1", "mit_b2", "mit_b3", "mit_b4", "mit_b5"
in_channels: 3
weights: imagenet
max_samples: 6
num_classes: 5
mean: ${data.init_args.mean}
std: ${data.init_args.std}
data_type_max: ${data.init_args.data_type_max}
loss:
class_path: segmentation_models_pytorch.losses.DiceLoss
init_args:
mode: "multiclass"
class_labels: ["background", "fore", "hydro", "roads", "buildings"]
class_colors: ["#000000", "#008000", "#0000FF", "#FFFF00", "#FF0000"]
weights_from_checkpoint_path: null

optimizer:
class_path: AdamW
init_args:
lr: 6e-5

lr_scheduler:
class_path: ReduceLROnPlateau
init_args:
monitor: "val_loss"
mode: "min"
factor: 0.1
patience: 10
cooldown: 1
min_lr: 6e-8

data:
class_path: datamodules.imagery_NonGeoDataModule.BlueSkyNonGeoDataModule
init_args:
batch_size: 4
num_workers: 8
data_type_max: 255
patch_size:
- 512
- 512
mean:
- 0.3992
- 0.4283
- 0.3998
std:
- 0.1672
- 0.1800
- 0.1584
csv_root_folder: /export/sata01/wspace/test_dir/multi/all_rgb_data/patches/4cls_RGB
patches_root_folder: /export/sata01/wspace/test_dir/multi/all_rgb_data/patches/4cls_RGB

ckpt_path: null

0 comments on commit 2791f4f

Please sign in to comment.