Text-to-Image Generation Based on AttnDM-GAN and DMAttn-GAN: Applications and Challenges

This project page provides pytorch code that implements the following papers:

Title: "Text-to-Image Generation Based on AttnDM-GAN and DMAttn-GAN: Applications and Challenges"

Link: "TO BE UPDATED"

How to use

Python

  • Python 3

Data

Birds

  1. Download metadata for birds and extract them to data/

    • python google_drive.py 1O_LtUP9sch09QH3s_EBAgLEctBQ5JBSJ ../data/bird.zip
    • unzip bird.zip
  2. Download the birds image data. Extract them to data/birds/

    • python google_drive.py 1hbzc_P1FuxMkcabkgn9ZKinBwW683j45 ../bird.zip
    • tar -xvzf CUB_200_2011.tgz

Faces

Pretrained Models

  • DAMSM for birds : Download and extract it to DAMSMencoders/

    • python google_drive.py 1GNUKjVeyWYBJ8hEU-yrfYQpDOkxEyP3V ../DAMSMencoders/bird.zip
  • DAMSM for CelebAText dataset : Download and extract it to DAMSMencoders/

    • python google_drive.py 1ao16xGvVmBltWadn21fIpxk2NGytEBLg DAMSMencoders/faces.zip
  • DAMSM for CelebAText-HQ dataset : Download and extract it to DAMSMencoders/

    • python google_drive.py 1isI_eXHrRIkhyNbzZpJDSq-rhCno58-n DAMSMencoders/faces.zip

Training

Birds

1- go into code/folder
2- python main.py --cfg cfg/birds_CUB.yml --gpu 0

Faces

CelebAText
1- go into code/folder
2- python main.py --cfg cfg/faces_CelebAText.yml --gpu 0
CelebAText-HQ
1- go into code/folder
2- python main.py --cfg cfg/faces_CelebAText-HQ.yml --gpu 0

Validation

Birds

- Image Generation
	1- go into code/folder
	2- python main.py --cfg cfg/eval_birds.yml --gpu 0

Faces

CelebAText
- Image Generation
	1- go into code/folder
	2- python main.py --cfg cfg/eval_CelebAText.yml --gpu 0
CelebAText-HQ
- Image Generation
	1- go into code/folder
	2- python main.py --cfg cfg/eval_CelebAText-HQ.yml --gpu 0

To the work with DMAttnGAN model, you can follow the same previous mentioned steps with this code.