This repository contains the code for the paper "Named Entity Driven Zero-Shot Image Manipulation" presented at CVPR 2024.
To run the code in this repository, ensure you have the following environment setup:
torch>=1.6.0BasicSR
- Download the StyleGAN2 checkpoint
stylegan2_ffhq_config_f_1024_official-3ab41b38.pthfrom the BasicSR repository: BasicSR Checkpoints. - Save the downloaded checkpoint in an accessible directory for later use.
Before training, you need to encode the Named Entity texts. Run the following script to perform the encoding:
python scripts/encode_nes.pyTo train the model, use the following command with the specified training configuration file:
python train.py -opt options/train.yamlYou can download pre-trained models from the following link:
If you find this repository useful in your research, please consider citing our paper:
@inproceedings{StyleEntity2024,
author = {Feng, Zhida and Chen, Li and Tian, Jing and Liu, JiaXiang and Feng, Shikun},
title = {Named Entity Driven Zero-Shot Image Manipulation},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2024},
pages = {9110-9119}
}
This repository is released under the MIT License. See the LICENSE file for more details.
For any questions or issues, please open an issue on this repository or contact feng.zhida@outlook.com.