Python影像辨識筆記(三十五):Semi-Supervised Domain Adaptation with Prototypical Alignment and Consistency Learning
2 min readJun 30, 2021
這篇論文的程式碼是基於ICCV 2019的Semi-supervised Domain Adaptation via Minimax Entropy 來做修改的
2021–12–27更新 Cross-Domain Adaptive Clustering for Semi-Supervised Domain Adaptation,也是基於MME程式碼修改而成的
介紹
Arxiv
OpenReview
ICLR 2021的審核論文(double-blind review)
環境
# 程式碼請使用Pytorch 0.4.1版本git clone https://github.com/kailigo/pacl
cd pacl
pip install -r requirements.txt
pip install git+https://github.com/pytorch/tnt.git@master
conda install pytorch=0.4.1 cuda92 -c pytorch
conda install -c anaconda cudatoolkit==9.0
訓練
CUDA_VISIBLE_DEVICES=0 python main.py --beta 1.0 --alpha 0.1 --threshold 0.8 --align_type proto --log_file r2s_proto_resnet_num3_semi_kld_hard --kld --labeled_hard --trg_shots 3 --num 3 --net resnet34 --source real --target sketch
測試
CUDA_VISIBLE_DEVICES=0 python eval.py --dataset multi --source real --target sketch --checkpath pretrained --net resnet34 --num 3
This code is developed based on the implementation of MME.