# asen **Repository Path**: xboss_zheng/asen ## Basic Information - **Project Name**: asen - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-05 - **Last Updated**: 2022-01-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Attribute-Specific Embedding Network This repository is a [PyTorch]( https://pytorch.org/ ) implementation of **Attribute-Specific Embedding Network (ASEN)** proposed in our paper [*Fine-Grained Fashion Similarity Learning by Attribute-Specific Embedding Network*](https://arxiv.org/abs/2002.02814) accepted by AAAI 2020. ## Network ![ASEN](framework.png) ## Requirements ### Environments * PyTorch 1.1.0 * CUDA 10.1.168 * Python 3.6.2 We use anaconda to create our experimental environment. You can rebuild it by the following commands. ```sh conda create -n {your_env_name} python=3.6 conda activate {your_env_name} pip install -r requirements.txt ... conda deactivate ``` ### Download Data #### Dataset Split We supply our dataset split and some descriptions of the datasets with a bunch of meta files. Download them by the following script. ```sh 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 ``` #### FashionAI Dataset As the full FashionAI has not been publicly released, we utilize its early version for the [FashionAI Global Challenge 2018](https://tianchi.aliyun.com/competition/entrance/231671/introduction?spm=5176.12281949.1003.9.493e3eafCXLQGm). You can first sign up and download the data. Once done, you should uncompress them into the `FashionAI` directory: ```sh unzip fashionAI_attributes_train1.zip fashionAI_attributes_train2.zip -d {your_project_path}/data/FashionAI ``` #### DARN Dataset As some images’ URLs have been broken, only 214,619 images are obtained for our experiments. We provide with a series of [URLs](https://drive.google.com/file/d/10jpHsFI2njzEGl7kdACXbvstz6tXyE0R/view?usp=sharing) for the images. #### DeepFashion Dataset [DeepFashion](https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Liu_DeepFashion_Powering_Robust_CVPR_2016_paper.pdf) is a large dataset which consists of four benchmarks for various tasks in the field of clothing including [category and attribute prediction](http://mmlab.ie.cuhk.edu.hk/projects/DeepFashion.html) which we use for our experiments, in-shop clothes retrieval, fashion landmark detection and consumer-to-shop clothes retrieval. #### Zappos50k Dataset We utilize identical split provided by [Conditional SImilarity Network](https://arxiv.org/abs/1603.07810). To download the Zappos50k dataset and their triplet list, please refer to [their repository](https://github.com/andreasveit/conditional-similarity-networks). ## Getting Started All data prepared, you can simply train the model on FashionAI dataset(default) ```sh python main.py --dataset FashionAI ``` there are also optional arguments for dataset, initial learning rate, batch size and so on. Check them by ```sh 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 ```sh python main.py --model ASENet_V2 --decay_rate 0.9 --step_size 3 --epochs 50 ``` ## Testing 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. ```sh python main.py --test [--dataset xx] --resume runs/{your_exp_name}/xx.pth.tar ``` ## Citing If it's of any help to your research, consider citing our work: ```latex @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} } ```