owj0421 / OutfitTransformer

Implementation of "Outfit Transformer:Outfit Representations for Fashion Recommendation"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Outfit-Transformer

2024. 2. 22 : All code is refactored
2024. 2. 26 : CIR Train is now available. (Evaluation method is not ready)

πŸ€— Introduction

Implementation of paper - Outfit Transformer: Outfit Representations for Fashion Recommendation
Overall code structure is based on DeepFashion repository.

🎯 Performance

The figures below are derived using the Polyvore-D (disjoint) test dataset.

Model CP(AUC) FITB(Accuracy) CIR(Recall@10)
Type-Aware 0.86 57.83 3.50
SCE-Net 0.91 59.07 5.10
CSA-Net 0.91 63.73 8.27
OutfitTransformer(Paper) 0.93 67.10 9.58
OutfitTransformer(Implemented) Testing... Testing... Not Trained

βš™ Install Dependencies

This code is tested with python 3.9.16, torch 1.12.1

python -m pip install -r requirements.txt

🧱 Train

Data Preparation

Download the polyvore dataset from here

Pretraining on CP(Compatibiliby Prediction) task

python train.py --task cp --train_batch 64 --valid_batch 96 --n_epochs 5 --learning_rate 1e-5 --scheduler_step_size 1000 --work_dir $WORK_DIR --data_dir $DATA_DIR --wandb_api_key $WANDB_API_KEY

Finetuning on CIR(Complementary Item Retrival) task

python train.py --task cir --train_batch 64 --valid_batch 96 --n_epochs 5 --learning_rate 1e-5 --scheduler_step_size 1000 --work_dir $WORK_DIR --data_dir $DATA_DIR --wandb_api_key $WANDB_API_KEY --checkpoint $CHECKPOINT

πŸ” Test

python test.py --task $TASK --polyvore_split nondisjoint --test_batch 96 --data_dir $DATA_DIR --checkpoint $CHECKPOINT

🧢 Checkpoints

Checkpoints are organized by tasks and timestamps as shown in the following file structure.
You can resume and load from checkpoints.

checkpoints
+-- $TASK
|  +-- $YYYY_$mm_$dd
|  |  +-- $EPOCH_$SCORE.pth

πŸ”” Note

  • A paper review of implementation can be found at here. (Only Available in Korean)
  • This is NON-OFFICIAL implementation. (The official repo has not been released.)

About

Implementation of "Outfit Transformer:Outfit Representations for Fashion Recommendation"

License:Apache License 2.0


Languages

Language:Python 100.0%