Skip to content
/ ACPL Public

Code for "ACPL: Anti-curriculum Pseudo-labelling for Semi-supervised Medical Image Classification" [CVPR 2022]

Notifications You must be signed in to change notification settings

FBLADL/ACPL

Repository files navigation

ACPL

This repository is the official implementation of ACPL: Anti-curriculum Pseudo-labelling for Semi-supervised Medical Image Classification . Structure

Requirements

  • 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.

Datasets Preparation

Training

  1. 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 dir
    • desc - folder name for experiment description
    • label_ratio - labelled set size
    • runtime - multiple run
    • topk - KNN K
    • pl-epochs - train epochs for after assign pseudo labels
    • ds-mixup - use density mixup
    • sel - select high informative subset
    • num_gmm-sets - {low, medium, high} number of GMM sets
    • resume - resume from supervised training checkpoint, remove if training from scratch
  2. 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.

Citation

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}
}

About

Code for "ACPL: Anti-curriculum Pseudo-labelling for Semi-supervised Medical Image Classification" [CVPR 2022]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages