Python影像辨識筆記(三十五):Semi-Supervised Domain Adaptation with Prototypical Alignment and Consistency Learning

這篇論文的程式碼是基於ICCV 2019的Semi-supervised Domain Adaptation via Minimax Entropy 來做修改的

介紹

By Yanwei Liu
By Yanwei Liu
By Yanwei Liu
By Yanwei Liu

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.

Machine Learning | Deep Learning | https://linktr.ee/yanwei