| Paper | Code | Slides | Poster |
</details>
This repo supports the KDD ‘23 paper “AdSEE: Investigating the Impact of Image Style Editing on Advertisement Attractiveness”. It contains the official implementaion for the AdSEE framework inlcuding a Click Rate Predictor (CRP) and a Genetic Advertisement Editor (GADE).
env/adsee/adsee_setup_cmd.sh
git clone https://github.com/LiyaoJiang1998/AdSEE
cd env/adsee/
sh adsee_setup_cmd.sh
conda deactivate
conda activate adsee
Our code adopts the following pre-trained models, please download the pre-trained models from the following links and save in specified directories.
adsee/SOLO/checkpoints/DECOUPLED_SOLO_R101_3x.pth
adsee/SOLO/checkpoints/SOLOv2_R101_DCN_3x.pth
encoder4editing/pretrained_models/e4e_ffhq_encode.pt
ctr_predictor/checkpoints/e4e_ffhq_encode.pt
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
bzip2 -dk shape_predictor_68_face_landmarks.dat.bz2
cp shape_predictor_68_face_landmarks.dat adsee/encoder4editing/
cp shape_predictor_68_face_landmarks.dat ctr_predictor/checkpoints/
encoder4editing/shape_predictor_68_face_landmarks.dat
ctr_predictor/checkpoints/shape_predictor_68_face_landmarks.dat
wget https://storage.googleapis.com/bert_models/2018_11_03/multilingual_L-12_H-768_A-12.zip -o text_embedding/pretrained/
cd text_embedding/pretrained/; unzip multilingual_L-12_H-768_A-12.zip
text_embedding/pretrained/chinese_L-12_H-768_A-12/
AdSEE/datasets/get_ad_images_cr/creative_ranking/images
and AdSEE/datasets/get_ad_images_cr/creative_ranking/list
@inproceedings{wang2021hybrid, title={A Hybrid Bandit Model with Visual Priors for Creative Ranking in Display Advertising}, author={Wang, Shiyao and Liu, Qi and Ge, Tiezheng and Lian, Defu and Zhang, Zhiqiang}, booktitle={Proceedings of the 30th international conference on World wide web}, year={2021}}
cd SOLO/
CUDA_VISIBLE_DEVICES=0 python solo_preprocess_batched.py --start_index 0 --end_index 133681
CUDA_VISIBLE_DEVICES=1 python solo_preprocess_batched.py --start_index 133681 --end_index 267362
cd encoder4editing/
CUDA_VISIBLE_DEVICES=0 python preprocessing_face_latent_batched.py --start_index 0 --end_index 133681
CUDA_VISIBLE_DEVICES=1 python preprocessing_face_latent_batched.py --start_index 133681 --end_index 267362
cd image_embedding/
CUDA_VISIBLE_DEVICES=0 python image_embedding_preprocessing.py --start_index 0 --end_index 133681
CUDA_VISIBLE_DEVICES=1 python image_embedding_preprocessing.py --start_index 133681 --end_index 267362
# In one terminal,run bert model server
cd text_embedding/server/
sh starup.sh
# In another terminal,run bert model client
cd text_embedding/
python text_embedding_bert.py
.pkl
data file. cd datasets/get_ad_images_cr/
python combine_preprocessed.py
cd adsee/ctr_predictor
CUDA_VISIBLE_DEVICES=0 python train_predictor.py --learning_rate 0.00001 --exp_name="ctr_predictor_default" --ctr_model="AutoInt" --target="s_log_ctr" --dense_array_features='["face_latents", "img_embedding"]' --num_epoch 18 --style_vector_method="max_pooling" --val_split 0.2 --test_split 0.2
cd ctr_predictor
# To Edit all images from the test set:
# CUDA_VISIBLE_DEVICES=0 python GA_optimize.py --ga_exp_name ga_default_test_data_full --num_processes 4
# To Edit 500 images sampled from the test set:
CUDA_VISIBLE_DEVICES=0 python GA_optimize.py --ga_exp_name ga_default_test_data_sample_500_start_0_end_250 --num_processes 4 --edit_samples 500 --start_index 0 --end_index=250
CUDA_VISIBLE_DEVICES=1 python GA_optimize.py --ga_exp_name ga_default_test_data_sample_500_start_250_end_500 --num_processes 4 --edit_samples 500 --start_index 250 --end_index=500
ctr_predictor/results/ga_default_test_data_sample_500_start_0_end_250/edited/
We want to acknowledge that our implementation adopt code from the following repositories, and we thank the authors for sharing their code:
If you find this research useful, please cite our paper.
@InProceedings{jiang2023adsee,
author = {Liyao Jiang and Chenglin Li and Haolan Chen and Xiaodong Gao and Xinwang Zhong and Yang Qiu and Shani Ye and Di Niu},
booktitle = {Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
title = {AdSEE: Investigating the Impact of Image Style Editing on Advertisement Attractiveness},
year = {2023},
month = {aug},
publisher = {ACM},
doi = {10.1145/3580305.3599770},
}