Coder Social home page Coder Social logo

scenegan's Introduction

SceneGAN

Pytorch implementation for scene generation with place and time descriptions.(This is first experiment stage to create a story generator) This project is based on AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks by Tao Xu, Pengchuan Zhang, Qiuyuan Huang, Han Zhang, Zhe Gan, Xiaolei Huang, Xiaodong He. (This work was performed when Tao was an intern with Microsoft Research).

AttnGAN Architecture SceneGAN Architecture

Target and Difference with AttnGAN

  • Target: Our final goal is want to train a story generator with descriptions, so we want to increase the diversity of our generator. And then, we can create a lot of different story images.
  • Difference: We add a imagination mechanism to increase our diversity of generator.

Dependencies

python 3.5

Pytorch 1.0.1post2

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

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

Data

  1. We use the part of Google OpenImage V4 Dataset and part of Places365 Datasets.
  2. In this project, we didn't provide the dataset.
  3. We only provide the weight of SceneGAN.(On following google cloud place)

Pretrained Model

Sampling

  1. Run python python preprocess.py to produce the description files.
  2. Download the pretrained models.
  3. Run python main.py --cfg cfg/eval_scene.yml --gpu 0 to generate examples from descriptions in files listed in ./data/OpenImage/example_filenames.txt. Results are saved to models/netG_epoch45.
  • Input your own sentence in ./data/OpenImage/example_captions.txt if you wannt to generate images from customized sentences.(description is listed with 16 batch size)
  • *.yml files are example configuration files for training/evaluation our models.

Compare to Imagination and No Imagination

Description: Forest Morning

  • Imagination Mechanism

* No Imgination Mechansim

P.S

  1. You can see other example from assets directory.
  2. Not all generated images are perfect.

Reference

scenegan's People

Contributors

neptunew avatar sethjuarez avatar taoxugit avatar

Watchers

 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.