Home

Awesome

Zero-Shot Visual Recognition using Semantics-Preserving Adversarial Embedding Networks

This repository contains the code for the following paper:

Note: This repository is adaptived from DeepSim, tensorflow-resnet, Thanks a lot to Jiaxin Shi from Tsinghua University, and Yongqin Xian to release his dataset split and code.

Requirements and Dependencies

Get Started

Dataset and Pretrain Model Download

Data Preprocessing

Extract the resnet-101 CNN featuer and preprocessing the dataset directly use:

python /SP-AEN-HOME/convert_data.py -dataset cub (for CUB)
python /SP-AEN-HOME/convert_data.py -dataset apy (for aPY)
python /SP-AEN-HOME/convert_data.py -dataset awa2 (for AWA2)
python /SP-AEN-HOME/convert_data.py -dataset sun (for SUN)

Train:

dataset can select from ['cub', 'apy', 'awa2', 'sun'], for dataset CUB:

step1:
python run.py --dataset=cub --mode=trainf --summary_path=.. --alpha_map_rank=.. --alpha_rank_dis=.. --alpha_rank_gen=..
step2:
python run.py --dataset=cub --mode=traine --retrain_model=True --train_checkpoint=.. --summary_path=..

Citiation

If you find this code useful, please cite the following paper:

@inproceedings{chen2018zero,
  title={Zero-Shot Visual Recognition using Semantics-Preserving Adversarial Embedding Networks},
  author={Chen, Long and Zhang, Hanwang and Xiao, Jun and Liu, Wei and Chang, Shih-Fu},
  booktitle={CVPR},
  year={2018}
}