wdika commited on
Commit
81ecc10
1 Parent(s): 4576d5f

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
+ - BraTS2023AdultGlioma
8
+ thumbnail: null
9
+ tags:
10
+ - image-segmentation
11
+ - UNet
12
+ - ATOMMIC
13
+ - pytorch
14
+ model-index:
15
+ - name: SEG_UNet_BraTS2023AdultGlioma
16
+ results: []
17
+
18
+ ---
19
+
20
+
21
+ ## Model Overview
22
+
23
+ AttentionUNet for MRI Segmentation on the BraTS2023AdultGlioma 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/BraTS2023AdultGlioma/conf).
38
+
39
+ ### Automatically instantiate the model
40
+
41
+ ```base
42
+ pretrained: true
43
+ checkpoint: https://huggingface.co/wdika/SEG_UNet_BraTS2023AdultGlioma/blob/main/SEG_UNet_BraTS2023AdultGlioma.atommic
44
+ mode: test
45
+ ```
46
+
47
+ ### Usage
48
+
49
+ You need to download the BraTS 2023 Adult Glioma dataset to effectively use this model. Check the [BraTS2023AdultGlioma](https://github.com/wdika/atommic/blob/main/projects/SEG/BraTS2023AdultGlioma/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: 4
58
+ segmentation_module_output_channels: 4
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, 0.5, 0.5, 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: adam
102
+ lr: 1e-4
103
+ betas:
104
+ - 0.9
105
+ - 0.98
106
+ weight_decay: 0.0
107
+ sched:
108
+ name: InverseSquareRootAnnealing
109
+ min_lr: 0.0
110
+ last_epoch: -1
111
+ warmup_ratio: 0.1
112
+
113
+ trainer:
114
+ strategy: ddp
115
+ accelerator: gpu
116
+ devices: 1
117
+ num_nodes: 1
118
+ max_epochs: 10
119
+ precision: 16-mixed
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
+ DICE = 0.9372 +/- 0.1175 F1 = 0.6713 +/- 0.7867 HD95 = 3.504 +/- 2.089 IOU = 0.5346 +/- 0.6628
137
+
138
+
139
+ ## Limitations
140
+
141
+ This model was trained on the BraTS2023AdultGlioma dataset with stacked T1c, T1n, T2f, T2w 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] Kazerooni AF, Khalili N, Liu X, et al. The Brain Tumor Segmentation (BraTS) Challenge 2023: Focus on Pediatrics (CBTN-CONNECT-DIPGR-ASNR-MICCAI BraTS-PEDs). 2023