tacchan7412 / caption2image

PyTorch implementation of GAN-INT-CLS and AttnGAN
9 stars 0 forks source link

caption2image

PyTorch implementation of GAN-INT-CLS and AttnGAN

Dependencies

In addition, you may need other packages...

Data

  1. Download preprocessed metadata for COCO filename and COCO text and extract
  2. Download COCO dataset
  3. Download embedding file
  4. Place data as below
data_dir 
  |- COCO
       |- filenames 
            |- train2014 
            |- val2014 
       |- text 
            |- train2014 
            |- val2014 
       |- image 
            |- train2014 
            |- val2014 

AttnGAN

Training

Evaluation

I prepared notebook for evaluation (AttnGAN/eval.ipynb).
You can evaluate generated images by

You can also generate images from your own captions.

Pretrained Model

  1. Download DAMSM image_encoder
  2. Download DAMSM text_encoder
  3. Download AttnGAN Generator and config
  4. Place models as below
AttnGAN
  |- results
       |- DAMSM/COCO/2019_05_04_00_32/model
            |- image_encoder600.pth
            |- text_encoder600.pth
       |- AttnGAN/COCO/2019_05_14_17_08
            |- model
                 |- G_epoch50.pth
            |- config.txt

TODO

Reference