Official Pytorch implementation for our paper GALIP: Generative Adversarial CLIPs for Text-to-Image Synthesis by Ming Tao, Bing-Kun Bao, Hao Tang, Changsheng Xu.
Generated Images
GALIP is a small and fast generative model which can generate multiple pictures in one second even on the CPU.
Clone this repo.
git clone https://github.com/tobran/GALIP
pip install -r requirements.txt
Install CLIP
data/
data/birds/
data/coco/images/
cd GALIP/code/
bash scripts/train.sh ./cfg/bird.yml
bash scripts/train.sh ./cfg/coco.yml
If your training process is interrupted unexpectedly, set state_epoch, log_dir, and pretrained_model_path in train.sh to resume training.
Our code supports automate FID evaluation during training, the results are stored in TensorBoard files under ./logs. You can change the test interval by changing test_interval in the YAML file.
tensorboard --logdir=./code/logs/bird/train --port 8166
tensorboard --logdir=./code/logs/coco/train --port 8177
./code/saved_models/pretrained/
./code/saved_models/pretrained/
cd GALIP/code/
set pretrained_model in test.sh
bash scripts/test.sh ./cfg/bird.yml
bash scripts/test.sh ./cfg/coco.yml
bash scripts/test.sh ./cfg/coco.yml
The released model achieves better performance than the paper version.
Model | COCO-FID↓ | COCO-CS↑ | CC12M-ZFID↓ |
---|---|---|---|
GALIP(paper) | 5.85 | 0.3338 | 12.54 |
GALIP(released) | 5.01 | 0.3379 | 12.54 |
If you find GALIP useful in your research, please consider citing our paper:
@inproceedings{tao2023galip,
title={GALIP: Generative Adversarial CLIPs for Text-to-Image Synthesis},
author={Tao, Ming and Bao, Bing-Kun and Tang, Hao and Xu, Changsheng},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={14214--14223},
year={2023}
}
The code is released for academic research use only. For commercial use, please contact Ming Tao (陶明) (mingtao2000@126.com).
Reference