You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where we use a patch size of 224x224. Each batch contains 4 subvolumes with 8 slices, i.e., the actual batch size for the 2D network is 32. The Dice loss is used for training, with an Adam optimizer and an initial learning rate of 0.001. The total iteration number is 15000, and the learning rate is decayed by 0.5 each 5000 iterations. Start to train by running:
85
79
86
80
```bash
87
81
pymic_train config/unet.cfg
88
82
```
89
83
90
-
Note that we set `multiscale_pred = True`, `deep_supervise = True` and `loss_type = [DiceLoss, CrossEntropyLoss]` in the configure file. We also use Mixup for data
91
-
augmentation by setting `mixup_probability=0.5`.
92
84
93
85
2. During training or after training, run `tensorboard --logdir model/unet3d` and you will see a link in the output, such as `http://your-computer:6006`. Open the link in the browser and you can observe the average Dice score and loss during the training stage, such as shown in the following images, where blue and red curves are for training set and validation set respectively.
94
86
95
87

96
88

97
89
98
-
## Testing and evaluation
99
-
1. Run the following command to obtain segmentation results of testing images. By default we set `ckpt_mode` to 1, which means using the best performing checkpoint based on the validation set.
90
+
3. Run the following command to obtain segmentation results of testing images. By default we set `ckpt_mode` to 1, which means using the best performing checkpoint based on the validation set.
100
91
101
92
```bash
102
-
pymic_test config/unet3d.cfg
93
+
pymic_test config/unet.cfg
103
94
```
104
95
105
-
2. Run the following command to obtain quantitative evaluation results in terms of Dice.
96
+
4. Run the following command to obtain quantitative evaluation results in terms of Dice.
106
97
107
98
```bash
108
99
pymic_eval_seg -cfg config/evaluation.cfg
109
100
```
110
101
111
-
The obtained average Dice score by default setting should be close to 88.04%, and the Average Symmetric Surface Distance (ASSD) is 1.41 mm. You can try your efforts to improve the performance with different networks or training strategies by changing the configuration file `config/unet3d.cfg`.
102
+
The obtained average Dice score by default setting should be close to 91.00%. You can try your efforts to improve the performance with different hyper-parameters such as patch size, optimizer, learning rate, iter_max and lr_step by editing `config/unet.cfg`.
103
+
104
+
105
+
## 3. Demo with other networks
106
+
107
+
For the other networks, please replace `config/unet.cfg` by the corresponding configuration files during the training and prediction stages. See `config/***.cfg` for examples of other networks.
0 commit comments