SHI-Labs / Semi-Supervised-Transfer-Learning

[CVPR 2021] Adaptive Consistency Regularization for Semi-Supervised Transfer Learning
http://arxiv.org/abs/2103.02193
MIT License
101 stars 15 forks source link

AKC+ARC+MixMatch(or FixMatch) experiments #2

Closed 0russ closed 3 years ago

0russ commented 3 years ago

Thanks for sharing your excellent work!

I was impressed by the performance of AKC+ARC+MixMatch(or FixMatch) achieved in your paper. I am trying to reimplement your experiments on AKC+ARC+MixMatch(or FixMatch), however, I could not find the relative parameters setting, I would really appreciate it if you can provide a script of the AKC+ARC+MixMatch(or FixMatch) experiments.

Thanks again.

Walleclipse commented 3 years ago

Sorry for the late reply.

The default MixMatch parameters are: --coef 500 --alpha 0.75 --alg ict --consistency ms --warmup_iter 4000 --ema_teacher true --ema_teacher_train true --ema_teacher_warmup true --ema_teacher_factor 0.999

The default FixMatch parameters are: --coef 0.5 --alg pl --strong_aug true --threshold 0.95 --ema_teacher true --ema_apply_wd true --ema_teacher_factor 0.999 --cutout_size 0.5

As AKC+ARC+FixMatch an example:

pretrain_path="ckpt"
data_root="data"
dataset=cub200
num_labels=400
arc=50 #50 adaptive representation consistency (semi-supervised)
akc=1 #1 adaptive knowledge consistency (transfer)
CUDA_VISIBLE_DEVICES=0,1 nohup  python -u main.py \
--data_root $data_root --dataset $dataset --num_labels $num_labels --pretrained_weight_path $pretrain_path  \
--lambda_mmd $arc --lambda_kd $akc --epochs 100 \
--coef 0.5 --alg pl --strong_aug true --threshold 0.95 \
--ema_teacher true --ema_apply_wd true --ema_teacher_factor 0.999 --cutout_size 0.5 \
>fixmatch-akc-arc${dataset}_${num_labels}_${arc}_${akc}.nohups 2>&1 &

The most important SSL parameters are coef and alg.
Please check the details about the SSL algorithms in code/ssl_lib/algs. Please check the details about the consistency regularization in code/ssl_lib/consistency.