Upload config
Browse files- readme_template.md +160 -0
readme_template.md
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: apache-2.0
|
5 |
+
library_name: atommic
|
6 |
+
datasets:
|
7 |
+
- SKMTEA
|
8 |
+
thumbnail: null
|
9 |
+
tags:
|
10 |
+
- multitask-image-reconstruction-image-segmentation
|
11 |
+
- SegNet
|
12 |
+
- ATOMMIC
|
13 |
+
- pytorch
|
14 |
+
model-index:
|
15 |
+
- name: MTL_SegNet_SKMTEA_poisson2d_4x
|
16 |
+
results: []
|
17 |
+
|
18 |
+
---
|
19 |
+
|
20 |
+
|
21 |
+
## Model Overview
|
22 |
+
|
23 |
+
Segmentation Network MRI (SegNet) for 5x & 10x accelerated MRI Reconstruction on the CC359 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/MTL/rs/SKMTEA/conf).
|
38 |
+
|
39 |
+
### Automatically instantiate the model
|
40 |
+
|
41 |
+
```base
|
42 |
+
pretrained: true
|
43 |
+
checkpoint: https://huggingface.co/wdika/MTL_SegNet_SKMTEA_poisson2d_4x/blob/main/MTL_SegNet_SKMTEA_poisson2d_4x.atommic
|
44 |
+
mode: test
|
45 |
+
```
|
46 |
+
|
47 |
+
### Usage
|
48 |
+
|
49 |
+
You need to download the SKMTEA dataset to effectively use this model. Check the [SKMTEA](https://github.com/wdika/atommic/blob/main/projects/MTL/rs/SKMTEA/README.md) page for more information.
|
50 |
+
|
51 |
+
|
52 |
+
## Model Architecture
|
53 |
+
```base
|
54 |
+
model:
|
55 |
+
model_name: SEGNET
|
56 |
+
use_reconstruction_module: true
|
57 |
+
input_channels: 64 # coils * 2
|
58 |
+
reconstruction_module_output_channels: 64 # coils * 2
|
59 |
+
segmentation_module_output_channels: 4
|
60 |
+
channels: 64
|
61 |
+
num_pools: 2
|
62 |
+
padding_size: 11
|
63 |
+
drop_prob: 0.0
|
64 |
+
normalize: true
|
65 |
+
padding: true
|
66 |
+
norm_groups: 2
|
67 |
+
num_cascades: 5
|
68 |
+
segmentation_final_layer_conv_dim: 2
|
69 |
+
segmentation_final_layer_kernel_size: 3
|
70 |
+
segmentation_final_layer_dilation: 1
|
71 |
+
segmentation_final_layer_bias: False
|
72 |
+
segmentation_final_layer_nonlinear: relu
|
73 |
+
segmentation_loss:
|
74 |
+
dice: 1.0
|
75 |
+
dice_loss_include_background: true # always set to true if the background is removed
|
76 |
+
dice_loss_to_onehot_y: false
|
77 |
+
dice_loss_sigmoid: false
|
78 |
+
dice_loss_softmax: false
|
79 |
+
dice_loss_other_act: none
|
80 |
+
dice_loss_squared_pred: false
|
81 |
+
dice_loss_jaccard: false
|
82 |
+
dice_loss_flatten: false
|
83 |
+
dice_loss_reduction: mean_batch
|
84 |
+
dice_loss_smooth_nr: 1e-5
|
85 |
+
dice_loss_smooth_dr: 1e-5
|
86 |
+
dice_loss_batch: true
|
87 |
+
dice_metric_include_background: true # always set to true if the background is removed
|
88 |
+
dice_metric_to_onehot_y: false
|
89 |
+
dice_metric_sigmoid: false
|
90 |
+
dice_metric_softmax: false
|
91 |
+
dice_metric_other_act: none
|
92 |
+
dice_metric_squared_pred: false
|
93 |
+
dice_metric_jaccard: false
|
94 |
+
dice_metric_flatten: false
|
95 |
+
dice_metric_reduction: mean_batch
|
96 |
+
dice_metric_smooth_nr: 1e-5
|
97 |
+
dice_metric_smooth_dr: 1e-5
|
98 |
+
dice_metric_batch: true
|
99 |
+
segmentation_classes_thresholds: [0.5, 0.5, 0.5, 0.5]
|
100 |
+
segmentation_activation: sigmoid
|
101 |
+
reconstruction_loss:
|
102 |
+
l1: 1.0
|
103 |
+
kspace_reconstruction_loss: false
|
104 |
+
total_reconstruction_loss_weight: 0.5
|
105 |
+
total_segmentation_loss_weight: 0.5
|
106 |
+
```
|
107 |
+
|
108 |
+
## Training
|
109 |
+
```base
|
110 |
+
optim:
|
111 |
+
name: adam
|
112 |
+
lr: 1e-4
|
113 |
+
betas:
|
114 |
+
- 0.9
|
115 |
+
- 0.98
|
116 |
+
weight_decay: 0.0
|
117 |
+
sched:
|
118 |
+
name: InverseSquareRootAnnealing
|
119 |
+
min_lr: 0.0
|
120 |
+
last_epoch: -1
|
121 |
+
warmup_ratio: 0.1
|
122 |
+
|
123 |
+
trainer:
|
124 |
+
strategy: ddp
|
125 |
+
accelerator: gpu
|
126 |
+
devices: 1
|
127 |
+
num_nodes: 1
|
128 |
+
max_epochs: 10
|
129 |
+
precision: 16-mixed
|
130 |
+
enable_checkpointing: false
|
131 |
+
logger: false
|
132 |
+
log_every_n_steps: 50
|
133 |
+
check_val_every_n_epoch: -1
|
134 |
+
max_steps: -1
|
135 |
+
```
|
136 |
+
|
137 |
+
## Performance
|
138 |
+
|
139 |
+
To compute the targets using the raw k-space and the chosen coil combination method, accompanied with the chosen coil sensitivity maps estimation method, you can use [targets](https://github.com/wdika/atommic/tree/main/projects/MTL/rs/SKMTEA/conf/targets) configuration files.
|
140 |
+
|
141 |
+
Evaluation can be performed using the reconstruction [evaluation](https://github.com/wdika/atommic/blob/main/tools/evaluation/reconstruction.py) and [segmentation](https://github.com/wdika/atommic/blob/main/tools/evaluation/segmentation.py) scripts for the reconstruction and the segmentation tasks, with --evaluation_type per_slice.
|
142 |
+
|
143 |
+
Results
|
144 |
+
-------
|
145 |
+
|
146 |
+
Evaluation against SENSE targets
|
147 |
+
--------------------------------
|
148 |
+
4x: MSE = 0.001247 +/- 0.002092 NMSE = 0.02623 +/- 0.05875 PSNR = 29.95 +/- 5.115 SSIM = 0.8396 +/- 0.1071 DICE = 0.9154 +/- 0.1138 F1 = 0.2703 +/- 0.2842 HD95 = 3.002 +/- 1.449 IOU = 0.2904 +/- 0.3491
|
149 |
+
|
150 |
+
|
151 |
+
## Limitations
|
152 |
+
|
153 |
+
This model was trained on the SKM-TEA dataset for 4x accelerated MRI reconstruction and MRI segmentation with MultiTask Learning (MTL) of the axial plane.
|
154 |
+
|
155 |
+
|
156 |
+
## References
|
157 |
+
|
158 |
+
[1] [ATOMMIC](https://github.com/wdika/atommic)
|
159 |
+
|
160 |
+
[2] Desai AD, Schmidt AM, Rubin EB, et al. SKM-TEA: A Dataset for Accelerated MRI Reconstruction with Dense Image Labels for Quantitative Clinical Evaluation. 2022
|