Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff8db7a

Browse files
committed
Update README.md
1 parent b20e3b7 commit ff8db7a

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

seg_full_sup/ACDC/README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ The [ACDC][ACDC_link] (Automatic Cardiac Diagnosis Challenge) dataset is used in
2828
[ACDC_link]:https://www.creatis.insa-lyon.fr/Challenge/acdc/databases.html
2929

3030
## 2. Demo with 2D UNet
31-
### 2.1 Training
32-
1. The configuration file for training with UNet looks like:
31+
1. The configuration file for training with UNet is `config/unet.cfg`. It looks like:
3332

3433
```bash
3534
[dataset]
@@ -49,7 +48,6 @@ RandomCrop_output_size = [8, 224, 224]
4948

5049
[network]
5150
net_type = UNet2D
52-
5351
class_num = 4
5452
in_chns = 1
5553
feature_chns = [16, 32, 64, 128, 256]
@@ -65,48 +63,46 @@ learning_rate = 1e-3
6563
momentum = 0.9
6664
weight_decay = 1e-5
6765

68-
# for lr schedular (StepLR)
6966
lr_scheduler = StepLR
7067
lr_gamma = 0.5
7168
lr_step = 5000
7269
early_stop_patience = 10000
7370

7471
ckpt_dir = model/unet2d
75-
76-
# start iter
7772
iter_max = 15000
7873
iter_valid = 250
7974
iter_save = 15000
8075
...
8176
```
8277

83-
where
84-
Start to train by running:
78+
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:
8579

8680
```bash
8781
pymic_train config/unet.cfg
8882
```
8983

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`.
9284

9385
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.
9486

9587
![avg_dice](./picture/train_avg_dice.png)
9688
![avg_loss](./picture/train_avg_loss.png)
9789

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.
10091

10192
```bash
102-
pymic_test config/unet3d.cfg
93+
pymic_test config/unet.cfg
10394
```
10495

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.
10697

10798
```bash
10899
pymic_eval_seg -cfg config/evaluation.cfg
109100
```
110101

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.
112108

0 commit comments

Comments
 (0)