Skip to content

Commit af03e23

Browse files
committed
update readme
1 parent 113e471 commit af03e23

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/prostate/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Prostate segmentation from 3D MRI
22
<img src="./picture/seg_example.png" width="796" height="682"/>
33

4-
In this example, we use 3D U-Net to segment the prostate brain from 3D MRI. First we download the images from internet, then edit the configuration file for training and testing. During training, we use tensorboard to observe the performance of the network at different iterations. We then apply the trained model to testing images and obtain quantitative evaluation results.
4+
In this example, we use 3D U-Net to segment the prostate from 3D MRI. First we download the images from internet, then edit the configuration file for training and testing. During training, we use tensorboard to observe the performance of the network at different iterations. We then apply the trained model to testing images and obtain quantitative evaluation results.
5+
6+
If you don't want to train the model by your self, you can download a pre-trained model [here][model_link] and jump to the `Testing and evaluation` section.
57

68
## Data and preprocessing
79
1. We use the `Promise12` dataset for this example. The images are available from the [website][promise12_link]. Download the training set that consists of 50 3D MR images and their annotations. The whole dataset consists of three parts. Create a new folder such as `data/promise12`, and download the images and save them in a sub-folder, like `data/promise12/TrainingData_Part1`, `data/promise12/TrainingData_Part2`, and `data/promise12/TrainingData_Part3`.
810
2. Before we use these data, some preprocessing steps are needed, such as resampling them into a uniform resolution and crop the images to a smaller size. Create two folders `data/promise12/preprocess/image` and `data/promise12/preprocess/label`, then set `data_dir` in `preprocess.py` to according to your system. Run `python preprocess.py` for preprocessing.
911
3. Open `write_csv_files.py` and set `data_dir` accordingly, such as `data/promise12/preprocess`. Run run `python write_csv_files.py` to randomly split the dataset into our own training (35), validation (5) and testing (10) sets. The output csv files are saved in `config`.
1012

13+
[model_link]:https://drive.google.com/open?id=1pYwt0lRiV_QrCJe5ef9IsLf4NKyrFRRD
1114
[promise12_link]:https://promise12.grand-challenge.org/
1215

1316
## Training
@@ -24,7 +27,7 @@ python ../../pymic/train_infer/train_infer.py train config/train_test.cfg
2427
![avg_loss](./picture/train_avg_loss.png)
2528

2629
## Testing and evaluation
27-
1. When training is finished. Run the following command to obtain segmentation results of testing images:
30+
1. Run the following command to obtain segmentation results of testing images. If you use [the pretrained model][model_link], you need to edit `checkpoint_name` in `config/train_test.cfg`.
2831

2932
```bash
3033
mkdir result

0 commit comments

Comments
 (0)