This repository is a PyTorch implementation of Attribute-Specific Embedding Network (ASEN) proposed in our paper Fine-Grained Fashion Similarity Learning by Attribute-Specific Embedding Network accepted by AAAI 2020.
We use anaconda to create our experimental environment. You can rebuild it by the following commands.
conda create -n {your_env_name} python=3.6
conda activate {your_env_name}
pip install -r requirements.txt
...
conda deactivate
We supply our dataset split and some descriptions of the datasets with a bunch of meta files. Download them by the following script.
wget -c -P data/ https://drive.google.com/file/d/1_Cyo-IkHYU977bneTXaMC_f63e3vLfSA/view?usp=sharing
cd data/
tar -zxvf meta_data.tar.gz
As the full FashionAI has not been publicly released, we utilize its early version for the FashionAI Global Challenge 2018. You can first sign up and download the data. Once done, you should uncompress them into the FashionAI
directory:
unzip fashionAI_attributes_train1.zip fashionAI_attributes_train2.zip -d {your_project_path}/data/FashionAI
As some images’ URLs have been broken, only 214,619 images are obtained for our experiments. We provide with a series of URLs for the images.
DeepFashion is a large dataset which consists of four benchmarks for various tasks in the field of clothing including category and attribute prediction which we use for our experiments, in-shop clothes retrieval, fashion landmark detection and consumer-to-shop clothes retrieval.
We utilize identical split provided by Conditional SImilarity Network. To download the Zappos50k dataset and their triplet list, please refer to their repository.
All data prepared, you can simply train the model on FashionAI dataset(default)
python main.py --dataset FashionAI
there are also optional arguments for dataset, initial learning rate, batch size and so on. Check them by
python main.py --help
We also provide with an advanced version of ASEN, which has been included in model.py. The advanced version of ASEN can achieve the same performance as ASEN while requiring less than 50 epochs. You can train it by
python main.py --model ASENet_V2 --decay_rate 0.9 --step_size 3 --epochs 50
As training terminates, two snapshots are saved for testing. One is the model that has the highest performance on validation set and the other is the one of the latest epoch. You can load any of them and test on the test set.
python main.py --test [--dataset xx] --resume runs/{your_exp_name}/xx.pth.tar
If it's of any help to your research, consider citing our work:
@inproceedings{ma2020fine,
title={Fine-Grained Fashion Similarity Learning by Attribute-Specific Embedding Network},
author={Ma, Zhe and Dong, Jianfeng and Long, Zhongzi and Zhang, Yao and He, Yuan and Xue, Hui and Ji, Shouling},
booktitle={Thirty-fourth AAAI Conference on Artificial Intelligence},
year = {2020}
}