|
| 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 | + |
0 commit comments