haowang1992 / PDFD

Pytorch Implementation of PDFD (IJCAI 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Progressive Domain-Independent Feature Decomposition Network for Zero-Shot Sketch-Based Image Retrieval(IJCAI 2020)

This project is our Pytorch implementation of Progressive Domain-Independent Feature Decomposition Network for Zero-Shot Sketch-Based Image Retrieval [paper]

framework

If you find this project helpful, please consider to cite our paper:

@inproceedings{ijcai2020-137,
  title     = {Progressive Domain-Independent Feature Decomposition Network for Zero-Shot Sketch-Based Image Retrieval},
  author    = {Xinxun Xu and Muli Yang and Yanhua Yang and Hao Wang},
  booktitle = {Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, {IJCAI-20}},
  publisher = {International Joint Conferences on Artificial Intelligence Organization},
  pages     = {984--990},
  year      = {2020},
}

Prerequisites

  • Linux
  • TITAN RTX GPU
  • Python 3.7.5
  • Pytorch 1.3.0 + torchvision 0.2.1

Datasets

We use Sketchy and TU-Berlin datasets for zero-shot SBIR, following the same zero-shot data partitioning in SEMPCYC.

You can download the datasets from here(passwd:xdXx). Then unzip it and put the contents in ./ZS-SBIR of this project.

Pre-trained Feature Extractor

The files can be downloaded from here(passwd:qc22). Then put four .pth files in ./model.

Training

IJCAI model with 64-d features in default setting.

# train with Sketchy Ext dataset
python ys_ijcai.py --dataset Sketchy

# train with TU-Berlin Ext dataset
python ys_ijcai.py --dataset TU-Berlin

Testing

IJCAI model with 64-d features in default setting.

# test with Sketchy Ext dataset
python ys_ijcai.py --dataset Sketchy --test

# test with TU-Berlin Ext dataset
python ys_ijcai.py --dataset TU-Berlin --test

Pre-trained Models

Our trained models for Skethy Ext and TU-Berlin Ext with 64-d features in default setting can be downloaded from here(passwd:vppy). Please put the contents in ./checkpoint/.

For example, the path of pre-trained model for Sketchy Ext in default experimental setting should be:

./checkpoint/ijcai_Sketchy_extended_None_hieremb-jcn+word2vec-google-news_c2f_False_64/model_best.pth

About

Pytorch Implementation of PDFD (IJCAI 2020)

License:Apache License 2.0


Languages

Language:Python 100.0%