Skip to content

SAW-GAN: Multi-Granularity Text Fusion Generative Adversarial Networks for Text-to-Image Generation

Notifications You must be signed in to change notification settings

jinDH77/SAW-GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

SAW-GAN

SAW-GAN: Multi-Granularity Text Fusion Generative Adversarial Networks for Text-to-Image Generation

Dependencies

  • python 3.9
  • pytorch 1.9
  • Install CLIP

In addition, please add the project folder to PYTHONPATH and pip install the following packages:

  • python-dateutil
  • easydict
  • pandas
  • torchfile
  • nltk
  • scikit-image

Data

  1. Download the preprocessed metadata for birds coco and extract them to data/
  2. Download the birds image data. Extract them to data/birds/
  3. Download coco2014 dataset and extract the images to data/coco/images/

Training

cd SAW-GAN/code/
  • Train SAW-GAN model:
    • For bird dataset: bash scripts/train.sh ./cfg/bird.yml
    • For coco dataset: bash scripts/train.sh ./cfg/coco.yml

Pretrained Model

  • [SAW-GAN for bird] Download and save it to ./code/saved_models/pretrained/
  • [SAW-GAN for coco] Download and save it to ./code/saved_models/pretrained/

Validation

 cd SAW-GAN/code/

set pretrained_model in test.sh

  • For bird dataset: bash scripts/test.sh ./cfg/bird.yml
  • For COCO dataset: bash scripts/test.sh ./cfg/coco.yml

About

SAW-GAN: Multi-Granularity Text Fusion Generative Adversarial Networks for Text-to-Image Generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published