diff --git a/README.md b/README.md index 5836e5c..d745715 100644 --- a/README.md +++ b/README.md @@ -88,38 +88,43 @@ We used 10k CT volumes from public datasets and 98k private CT volumes for pretr **Main Requirements** > torch==1.10.2 -> pymic +> PyMIC -**Installation** -```bash -pip install DDD -``` +To use [PyMIC](https://github.com/HiLab-git/PyMIC), please download the latest code in the master branch, and add the path of pymic source code to `PYTHONPATH` environmental variable. See `bash.sh` for example. -**Download Model** +**Demo data** +In this demo, we show using PCT-Net for left atrial segmentation. The dataset can be downloaded from [PYMIC_data](https://drive.google.com/file/d/1eZakSEBr_zfIHFTAc96OFJix8cUBf-KR/view?usp=sharing). -**Preprocess** -```bash -python DDD -``` +The dataset, network and training/testing settings can be found in configuration files: `demo/pctnet_scratch.cfg` and `demo/pctnet_pretrain.cfg` for training from scratch and using the pretrained weights, respectively. +After downloading the data, edit the value of `root_dir` in the configuration files, and make sure the path to the images are correct. **Training** ```bash -python DDD +python train.py demo/pctnet_scratch.cfg ``` +or +```bash +python train.py demo/pctnet_pretrain.cfg +``` -**Validation** +**Inference** ```bash -python DDD +python predict.py demo/pctnet_scratch.cfg ``` +or +```bash +python predict.py demo/pctnet_pretrain.cfg +``` -**Testing** +**Evaluation** ```bash -python DDD +python $PyMIC_path/pymic/util/evaluation_seg.py -cfg demo/evaluation.cfg ``` +You may need to edit `demo/evaluation.cfg` to specify the path of segmented results before evaluating the performance. ## 🙋♀️ Feedback and Contact diff --git a/bash.sh b/bash.sh index 68f802a..aa91eb5 100644 --- a/bash.sh +++ b/bash.sh @@ -1,4 +1,3 @@ -# PyMIC_path=/home/x/projects/PyMIC_project/PyMIC PyMIC_path=/home/x/projects/PyMIC_project/PyMIC_release/PyMIC-master export PYTHONPATH=$PYTHONPATH:$PyMIC_path