This repository provides the pytorch code for the paper "LAP-GAN: Label augmentation with perceptual loss for self-supervised text-to-image synthesis" by Yong Xuan Tan, Jit Yan Lim, Kian Ming Lim, Chin Poo Lee.
The code is tested on Windows 10 with Anaconda3 and following packages:
- python 3.7.11
- pytorch 1.9.0
- torchvision 0.10.0
For Oxford flower and CUB-200, please download the preprocessed metadata and images from SSTIS. For COCO, please download the preprocessed metadata and images from AttnGAN.
Put them into ./data/flowers, ./data/birds, and ./data/coco folder. Rename the text_c10 folder into text.
To train on Oxford:
python main.py --dataset-name flowers --exp-num oxford_exp
To evaluate on Oxford:
python main.py --dataset-name flowers --exp-num oxford_exp --is-test
Download the pretrained models. Extract it to the saved_model folder.
Examples generated by SSBi-GAN:

If you find this repo useful for your research, please consider citing the paper:
@article{TAN2026129005,
title = {LAP-GAN: Label augmentation with perceptual loss for self-supervised text-to-image synthesis},
journal = {Expert Systems with Applications},
volume = {296},
pages = {129005},
year = {2026},
issn = {0957-4174},
doi = {https://doi.org/10.1016/j.eswa.2025.129005},
url = {https://www.sciencedirect.com/science/article/pii/S0957417425026223},
author = {Yong Xuan Tan and Jit Yan Lim and Kian Ming Lim and Chin Poo Lee}
}
For any questions, please contact:
Yong Xuan Tan (yongxuan95@gmail.com)
Jit Yan Lim (jityan95@gmail.com)
This code is released under the MIT License (refer to the LICENSE file for details).
