wdika commited on
Commit
b745eef
1 Parent(s): 9a28807

Upload config

Browse files
Files changed (1) hide show
  1. readme_template.md +148 -0
readme_template.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: atommic
6
+ datasets:
7
+ - ISLES2022SubAcuteStroke
8
+ thumbnail: null
9
+ tags:
10
+ - image-segmentation
11
+ - UNet
12
+ - ATOMMIC
13
+ - pytorch
14
+ model-index:
15
+ - name: SEG_UNet_ISLES2022SubAcuteStroke
16
+ results: []
17
+
18
+ ---
19
+
20
+
21
+ ## Model Overview
22
+
23
+ AttentionUNet for MRI Segmentation on the ISLES2022SubAcuteStroke dataset.
24
+
25
+
26
+ ## ATOMMIC: Training
27
+
28
+ To train, fine-tune, or test the model you will need to install [ATOMMIC](https://github.com/wdika/atommic). We recommend you install it after you've installed latest Pytorch version.
29
+ ```
30
+ pip install atommic['all']
31
+ ```
32
+
33
+ ## How to Use this Model
34
+
35
+ The model is available for use in ATOMMIC, and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.
36
+
37
+ Corresponding configuration YAML files can be found [here](https://github.com/wdika/atommic/tree/main/projects/SEG/ISLES2022SubAcuteStroke/conf).
38
+
39
+ ### Automatically instantiate the model
40
+
41
+ ```base
42
+ pretrained: true
43
+ checkpoint: https://huggingface.co/wdika/SEG_UNet_ISLES2022SubAcuteStroke/blob/main/SEG_UNet_ISLES2022SubAcuteStroke.atommic
44
+ mode: test
45
+ ```
46
+
47
+ ### Usage
48
+
49
+ You need to download the ISLES 2022 Sub Acute Stroke dataset to effectively use this model. Check the [ISLES2022SubAcuteStroke](https://github.com/wdika/atommic/blob/main/projects/SEG/ISLES2022SubAcuteStroke/README.md) page for more information.
50
+
51
+
52
+ ## Model Architecture
53
+ ```base
54
+ model:
55
+ model_name: SEGMENTATIONUNET
56
+ segmentation_module: UNet
57
+ segmentation_module_input_channels: 3
58
+ segmentation_module_output_channels: 1
59
+ segmentation_module_channels: 32
60
+ segmentation_module_pooling_layers: 5
61
+ segmentation_module_dropout: 0.0
62
+ segmentation_module_normalize: false
63
+ segmentation_loss:
64
+ dice: 1.0
65
+ dice_loss_include_background: true # always set to true if the background is removed
66
+ dice_loss_to_onehot_y: false
67
+ dice_loss_sigmoid: false
68
+ dice_loss_softmax: false
69
+ dice_loss_other_act: none
70
+ dice_loss_squared_pred: false
71
+ dice_loss_jaccard: false
72
+ dice_loss_flatten: false
73
+ dice_loss_reduction: mean_batch
74
+ dice_loss_smooth_nr: 1e-5
75
+ dice_loss_smooth_dr: 1e-5
76
+ dice_loss_batch: true
77
+ dice_metric_include_background: true # always set to true if the background is removed
78
+ dice_metric_to_onehot_y: false
79
+ dice_metric_sigmoid: false
80
+ dice_metric_softmax: false
81
+ dice_metric_other_act: none
82
+ dice_metric_squared_pred: false
83
+ dice_metric_jaccard: false
84
+ dice_metric_flatten: false
85
+ dice_metric_reduction: mean_batch
86
+ dice_metric_smooth_nr: 1e-5
87
+ dice_metric_smooth_dr: 1e-5
88
+ dice_metric_batch: true
89
+ segmentation_classes_thresholds: [ 0.5 ]
90
+ segmentation_activation: sigmoid
91
+ magnitude_input: true
92
+ log_multiple_modalities: true # log all modalities in the same image, e.g. T1, T2, T1ce, FLAIR will be concatenated
93
+ normalization_type: minmax
94
+ normalize_segmentation_output: true
95
+ complex_data: false
96
+ ```
97
+
98
+ ## Training
99
+ ```base
100
+ optim:
101
+ name: adamw
102
+ lr: 1e-4
103
+ betas:
104
+ - 0.9
105
+ - 0.999
106
+ weight_decay: 0.0
107
+ sched:
108
+ name: CosineAnnealing
109
+ min_lr: 0.0
110
+ last_epoch: -1
111
+ warmup_ratio: 0.1
112
+
113
+ trainer:
114
+ strategy: ddp_find_unused_parameters_false
115
+ accelerator: gpu
116
+ devices: 1
117
+ num_nodes: 1
118
+ max_epochs: 50
119
+ precision: 16-mixed # '16-mixed', 'bf16-mixed', '32-true', '64-true', '64', '32', '16', 'bf16'
120
+ enable_checkpointing: false
121
+ logger: false
122
+ log_every_n_steps: 50
123
+ check_val_every_n_epoch: -1
124
+ max_steps: -1
125
+ ```
126
+
127
+ ## Performance
128
+
129
+ Evaluation can be performed using the segmentation [evaluation](https://github.com/wdika/atommic/blob/main/tools/evaluation/segmentation.py) script for the segmentation task, with --evaluation_type per_slice.
130
+
131
+ Results
132
+ -------
133
+
134
+ Evaluation
135
+ ----------
136
+ ALD = 0.9088 +/- 3.953 AVD = 0.5439 +/- 3.921 DICE = 0.6946 +/- 0.5589 L-F1 = 0.7859 +/- 0.5848
137
+
138
+
139
+ ## Limitations
140
+
141
+ This model was trained on the ISLES2022SubAcuteStroke dataset with stacked ADC, DWI, FLAIR images and might differ in performance compared to the leaderboard results.
142
+
143
+
144
+ ## References
145
+
146
+ [1] [ATOMMIC](https://github.com/wdika/atommic)
147
+
148
+ [2] Petzsche MRH, Rosa E de la, Hanning U, et al. ISLES 2022: A multi-center magnetic resonance imaging stroke lesion segmentation dataset. Scientific Data 1 2022;9