Skip to content

Commit e7fce3b

Browse files
author
jizong
committed
update readme
1 parent 2218431 commit e7fce3b

5 files changed

Lines changed: 121 additions & 131 deletions

File tree

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Boosting Semi-supervised Image Segmentation with Global and Local Mutual Information Regularization
2+
3+
This is the minimal reproduce code for the paper "Boosting Semi-supervised Image Segmentation with Global
4+
and Local Mutual Information Regularization" recently submitted to a journal.
5+
6+
7+
We release the code, together with the well-preprocessed `ACDC` dataset for reviewers. The dataset should be keep private based on the dataset agreement and I will delete it once the reviewer process finishes.
8+
9+
Our code is based on `deepclustering2` package, which is a personal research framework. It will automatically install all dependency on a conda virtual environment and without resorting to `requirement.txt`.
10+
11+
12+
-----------------
13+
##### Basic script for setting a conda-based virtual environment.
14+
```bash
15+
conda create -p ./venv python=3.7
16+
17+
conda activate ./venv
18+
19+
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch # install pytorch 1.6.0
20+
pip install deepclustering2-2.0.0-py3-none-any.whl
21+
python setup.py install
22+
# all packages should be set properly automatically.
23+
```
24+
In case of failure of running the experiments, please refer to `requirement.txt` to see the packages
25+
26+
----------------
27+
##### Basic script to start training
28+
```bash
29+
cd semi_seg
30+
# our proposed method
31+
python main.py Data.labeled_data_ratio=0.05 Data.unlabeled_data_ratio=0.95 Trainer.num_batches=300 Trainer.max_epoch=100 Data.name=acdc Arch.num_classes=4 Optim.lr=0.0000001000 Trainer.name=udaiic Trainer.save_dir=udaiic/10.0_0.1 IICRegParameters.weight=0.1 UDARegCriterion.weight=10.0
32+
# ps baseline (lower bound)
33+
python main.py Data.labeled_data_ratio=0.05 Data.unlabeled_data_ratio=0.95 Trainer.num_batches=300 Trainer.max_epoch=100 Data.name=acdc Arch.num_classes=4 Optim.lr=0.0000001000 Trainer.name=partial Trainer.save_dir=ps
34+
# fs baseline (upper bound)
35+
python main.py Data.labeled_data_ratio=1.0 Data.unlabeled_data_ratio=0.0 Trainer.num_batches=300 Trainer.max_epoch=100 Data.name=acdc Arch.num_classes=4 Optim.lr=0.0000001000 Trainer.name=partial Trainer.save_dir=fs
36+
```
37+
One can change the parameters on the cmd if needed.
38+
Please refer to the default configuration in `config/semi.yaml` all set of controllable hyperparameters. All of them can be changed using cmd as above.
39+
40+
41+
---------------------
42+
##### Performance
43+
Based on different random seed, the ACDC performance varies within 1% in terms of DSC. Above scripts gives a DSC of ~85.5% for our proposed method vs 62.0% for ps and 89.2% for fs.
44+
45+
46+
47+

config/config.yaml

Lines changed: 0 additions & 62 deletions
This file was deleted.

requirement.txt

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
absl-py==0.10.0
2+
aiohttp==3.6.2
3+
async-timeout==3.0.1
4+
attrs==20.2.0
5+
behave==1.2.6
6+
cachetools==4.1.1
7+
certifi==2020.6.20
8+
chardet==3.0.4
9+
cycler==0.10.0
10+
decorator==4.4.2
11+
deepclustering2 @ file:///home/jizong/Workspace/release-code/deepclustering2-2.0.0-py3-none-any.whl
12+
easydict==1.9
13+
filelock==3.0.12
14+
future==0.18.2
15+
gdown==3.12.2
16+
google-auth==1.22.0
17+
google-auth-oauthlib==0.4.1
18+
GPUQueue==0.0.3
19+
grpcio==1.32.0
20+
idna==2.10
21+
imageio==2.9.0
22+
importlib-metadata==2.0.0
23+
joblib==0.16.0
24+
kiwisolver==1.2.0
25+
Markdown==3.2.2
26+
matplotlib==3.3.2
27+
MedPy==0.4.0
28+
mkl-fft==1.2.0
29+
mkl-random==1.1.1
30+
mkl-service==2.3.0
31+
msgpack==1.0.0
32+
multidict==4.7.6
33+
networkx==2.5
34+
numpy @ file:///tmp/build/80754af9/numpy_and_numpy_base_1596233707986/work
35+
oauthlib==3.1.0
36+
olefile==0.46
37+
opencv-python==4.4.0.44
38+
pandas==1.1.2
39+
parse==1.18.0
40+
parse-type==0.5.2
41+
Pillow @ file:///tmp/build/80754af9/pillow_1594307325547/work
42+
protobuf==3.13.0
43+
py==1.9.0
44+
pyasn1==0.4.8
45+
pyasn1-modules==0.2.8
46+
pyparsing==2.4.7
47+
python-dateutil==2.8.1
48+
pytorch-ranger==0.1.1
49+
pytz==2020.1
50+
PyWavelets==1.1.1
51+
PyYAML==5.3.1
52+
requests==2.24.0
53+
requests-oauthlib==1.3.0
54+
rsa==4.6
55+
scikit-image==0.17.2
56+
scikit-learn==0.23.2
57+
scipy==1.5.2
58+
SimpleITK==2.0.0
59+
six==1.15.0
60+
tensorboard==2.3.0
61+
tensorboard-plugin-wit==1.7.0
62+
tensorboardX==2.1
63+
termcolor==1.1.0
64+
threadpoolctl==2.1.0
65+
tifffile==2020.10.1
66+
torch==1.6.0
67+
torch-optimizer==0.0.1a15
68+
torchvision==0.7.0
69+
tqdm==4.50.0
70+
typing-extensions==3.7.4.3
71+
urllib3==1.25.10
72+
Werkzeug==1.0.1
73+
yarl==1.6.0
74+
zipp==3.2.0

semi_seg/runs/tmp/config.yaml

Lines changed: 0 additions & 69 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)