This repository is the official implementation of ACPL: Anti-curriculum Pseudo-labelling for Semi-supervised Medical Image Classification .
- To install requirements:
pip install -r requirements.txt
- This code is tested in two NVIDIA RTX 2080ti. Single card is supported but performance cannot guarantee.
- First, please download Chest X-ray14 from https://nihcc.app.box.com/v/ChestXray-NIHCC
- Move semi_sample.py to the dataset folder
-
2% labelled set semi-supervised training:
CUDA_VISIBLE_DEVICES=0,1 python main.py --data <data_dir> --task cx14 --resize 512 --batch-size 8 --epochs 20 --dist-url 'tcp://localhost:10001' --multiprocessing-distributed --world-size 1 --rank 0 --desc ACPL_2_1_k200 --num-workers 4 --eval-interval 100 --reinit --label_ratio 2 --runtime 1 --topk 200 --pl-epochs 10 --ds-mixup --sel 2 --num-gmm-sets 3 --lr 0.03 --resume <resume_from_ck>
where the arguments represent:
data_dir
- Chest X-ray14 root dirdesc
- folder name for experiment descriptionlabel_ratio
- labelled set sizeruntime
- multiple runtopk
- KNN Kpl-epochs
- train epochs for after assign pseudo labelsds-mixup
- use density mixupsel
- select high informative subsetnum_gmm-sets
- {low, medium, high} number of GMM setsresume
- resume from supervised training checkpoint, remove if training from scratch
-
In origin paper we use DenseNet-121 as backbone and compute graph on GPU with Faiss. For larger backbone, You can switch to CPU in case GPU memory runout.
If you find this repo useful for your research, please consider citing our paper:
@article{@article{liu2021acpl,
title={ACPL: Anti-curriculum Pseudo-labelling forSemi-supervised Medical Image Classification},
author={Liu, Fengbei and Tian, Yu and Chen, Yuanhong and Liu, Yuyuan and Belagiannis, Vasileios and Carneiro, Gustavo},
journal={arXiv preprint arXiv:2111.12918},
year={2021}
}