Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
taigw committed Jun 27, 2023
1 parent 455db07 commit 72a6a5d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion bash.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 72a6a5d

Please sign in to comment.