GithubHelp home page GithubHelp logo

df-gan's Introduction

DF-GAN: Deep Fusion Generative Adversarial Networks for Text-to-Image Synthesis

(A novel and effective one-stage Text-to-Image Backbone)

Official Pytorch implementation for our paper DF-GAN: Deep Fusion Generative Adversarial Networks for Text-to-Image Synthesis by Ming Tao, Hao Tang, Songsong Wu, Nicu Sebe, Fei Wu, Xiao-Yuan Jing.


Requirements

  • python 3.6+
  • Pytorch 1.0+
  • easydict
  • nltk
  • scikit-image
  • A titan xp (set nf=32 in *.yaml) or a V100 32GB (set nf=64 in *.yaml)

Installation

Clone this repo.

git clone https://github.com/tobran/DF-GAN
cd DF-GAN/code/

Datasets Preparation

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

Pre-trained text encoder

  1. Download the pre-trained text encoder for CUB and save it to DAMSMencoders/bird/inception/
  2. Download the pre-trained text encoder for coco and save it to DAMSMencoders/coco/inception/

Training

Train DF-GAN models:

  • For bird dataset: python main.py --cfg cfg/bird.yml

  • For coco dataset: python main.py --cfg cfg/coco.yml

  • *.yml files are example configuration files for training/evaluation our models.

Evaluating

Dwonload Pretrained Model

Evaluate DF-GAN models:

  • To evaluate our DF-GAN on CUB, change B_VALIDATION to True in the bird.yml. and then run python main.py --cfg cfg/bird.yml
  • To evaluate our DF-GAN on coco, change B_VALIDATION to True in the coco.yml. and then run python main.py --cfg cfg/coco.yml
  • We compute inception score for models trained on birds using StackGAN-inception-model.
  • We compute FID for CUB and coco using DM-GAN/eval/FID.

Citing DF-GAN

If you find DF-GAN useful in your research, please consider citing our paper:

@article{ming2020DFGAN,
  title={DF-GAN: Deep Fusion Generative Adversarial Networks for Text-to-Image Synthesis},
  author={Ming Tao, Hao Tang, Songsong Wu, Nicu Sebe, Fei Wu, Xiao-Yuan Jing},
  journal={arXiv preprint arXiv:2008.05865},
  year={2020}
}

The code is released for academic research use only. For commercial use, please contact Ming Tao.

Reference

df-gan's People

Contributors

tobran avatar ha0tang avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.