Skip to content

Commit

Permalink
UW-Madison dataset at S3 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
KGallyamov authored May 18, 2023
1 parent 2ce7ecc commit 1c9642c
Show file tree
Hide file tree
Showing 7 changed files with 7,791 additions and 7,793 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
_target_: innofw.core.datamodules.lightning_datamodules.segmentation_dir.DirSegmentationLightningDataModule
channels_num: 1
date_time: 30.09.2022
description: stroke segmentation dataset
date_time: 14.05.2022
description: gastrointestinal organs segmentations dataset
markup_info: segmentation masks
name: UW-Madison dataset
task:
- multiclass-image-segmentation

test:
source: ./data/organs/test
# target:
source: https://api.blackhole.ai.innopolis.university/public-datasets/uw_madison_organs/test.zip
target: ./data/organs/test
train:
source: ./data/organs/train
# target:
source: https://api.blackhole.ai.innopolis.university/public-datasets/uw_madison_organs/train.zip
target: ./data/organs/train

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# @package _global_
defaults:
- override /models: segformer_for_segmentation.yaml
- override /models: semantic-segmentation/segformer_for_segmentation.yaml
- override /datasets: semantic-segmentation/segmentation_uwmadison
- override /optimizers: lion.yaml
- override /augmentations_train: none
- override /augmentations_val: none
- override /augmentations_test: none
# - override /callbacks: multiclass_segmentation
- override /callbacks: multiclass_segmentation
- override /losses: multiclass_segmentation_losses
- override /loggers: wandb

Expand All @@ -23,6 +23,7 @@ task: "multiclass-image-segmentation"
random_seed: 42
weights_freq: 1
batch_size: 16
n_classes: 4
epochs: 100
accelerator: gpu
override hydra/job_logging: stdout
Expand All @@ -32,11 +33,5 @@ wandb:
project: uw_madison
entity: "k-galliamov"
group: none
tags:
- "SegFormer"
- "LION"
- "CrossEntropyLoss"
- "JaccardLoss"
- "DiceLoss"
job_type: training

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# @package _global_
defaults:
- override /models: unet
- override /models: semantic-segmentation/unet
- override /datasets: semantic-segmentation/segmentation_uwmadison
- override /optimizers: adam.yaml
- override /augmentations_train: none
- override /augmentations_val: none
- override /augmentations_test: none
- override /callbacks: multiclass_segmentation
- override /losses: multiclass_segmentation_losses
# - override /loggers: wandb
- override /loggers: wandb

n_classes: 4

Expand All @@ -30,11 +30,9 @@ accelerator: gpu
devices: 1
override hydra/job_logging: stdout

#wandb:
# enable: True
# tags:
# - "best_from_sweep"
# project: uw_madison
# entity: "k-galliamov"
# job_type: training
wandb:
enable: True
project: uw_madison
entity: "k-galliamov"
job_type: training

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# @package _global_
defaults:
- override /models: deeplabv3plus.yaml
- override /models: semantic-segmentation/deeplabv3plus.yaml
- override /datasets: semantic-segmentation/segmentation_uwmadison
- override /optimizers: adam.yaml
- override /augmentations_train: position/random_horizontal_flip.yaml
- override /augmentations_train: ../augmentations/position/random_horizontal_flip.yaml
- override /augmentations_val: none
- override /augmentations_test: none
- override /callbacks: multiclass_segmentation
Expand All @@ -18,14 +18,19 @@ models:
optimizers:
lr: 0.004313519324382217

n_classes: 4
project: "organs segmentation"
task: "multiclass-image-segmentation"
random_seed: 42
# weights_freq: 1
weights_freq: 1
ckpt_path: https://api.blackhole.ai.innopolis.university/pretrained/segmentation/uw_madison_deeplabv3plus.pickle

# When tuning from the checkpoint, the number of epochs has to be set to at least
# the № of epoch on which the checkpoint was created + 1 (in this case, 39 + 1 = 40 would be a lower bound)
epochs: 50
batch_size: 128
epochs: 40
accelerator: gpu
devices: 2
devices: 1
override hydra/job_logging: stdout

wandb:
Expand Down
2 changes: 1 addition & 1 deletion innofw/core/models/torch_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def predict(self, datamodule, ckpt_path=None):
# )

def train(self, data_module, ckpt_path=None):
self.trainer.fit(self.pl_module, data_module)
self.trainer.fit(self.pl_module, data_module, ckpt_path=ckpt_path)

def test(self, data_module):
outputs = self.trainer.test(self.pl_module, data_module)
Expand Down
Loading

0 comments on commit 1c9642c

Please sign in to comment.