Skip to content
/ lapgan Public

Code Repository for "LAP-GAN: Label augmentation with perceptual loss for self-supervised text-to-image synthesis"

License

Notifications You must be signed in to change notification settings

Jityan/lapgan

Repository files navigation

LAP-GAN: Label augmentation with perceptual loss for self-supervised text-to-image synthesis

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.

Environment

The code is tested on Windows 10 with Anaconda3 and following packages:

  • python 3.7.11
  • pytorch 1.9.0
  • torchvision 0.10.0

Dataset

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.

Experiments

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

Pre-trained Models

Download the pretrained models. Extract it to the saved_model folder.

Examples generated by SSBi-GAN:

Citation

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}
}

Contacts

For any questions, please contact:

Yong Xuan Tan (yongxuan95@gmail.com)
Jit Yan Lim (jityan95@gmail.com)

Acknowlegements

License

This code is released under the MIT License (refer to the LICENSE file for details).

About

Code Repository for "LAP-GAN: Label augmentation with perceptual loss for self-supervised text-to-image synthesis"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages