Code Monkey home page Code Monkey logo

layout2img's Introduction

layout2img

This repository includes the implementation for Context-Aware Layout to Image Generation with Enhanced Object Appearance (to appear in CVPR 2021).

This repo is not completely.

Network Structure

network_structure

Requirements

  • python3
  • pytorch >1.0
  • numpy
  • matplotlib
  • opencv

Or install full requirements by running:

pip install -r requirements.txt

TODO

  • instruction to prepare dataset
  • remove all unnecessary files
  • add link to download our pre-trained model
  • clean code including comments
  • instruction for training
  • instruction for evaluation
  • instruction for applying our methods in layout2img

Training ImageTransformer

Data Preparation

Download COCO dataset to datasets/coco

bash scripts/download_coco.sh

Download VG dataset to datasets/vg

bash scripts/download_vg.sh
python scripts/preprocess_vg.py

Start training

See opts.py for the options. (You can download the pretrained models from here

Evaluation

Trained model

you can download our trained model from our onedrive repo

Performance

You will get the scores close to below after training for around 200 epochs:

models Resolutions IS-COCO IS-VG FID-COCO FID-VG
Ours-ED 64*64 15.27+/-.25 8.53+/-.13 31.32 33.91
Ours-D 128*128 15.62+/-.05 12.69+/-.45 22.32 21.78

Reference

If you find this repo helpful, please consider citing:

@inproceedings{he2021context,
  title={Context-Aware Layout to Image Generation with Enhanced Object Appearance},
  author={He, Sen and Liao, Wentong and Yang, Michael and Yang, Yongxin and Song, Yi-Zhe and Rosenhahn, Bodo and Xiang, Tao},
  booktitle={CVPR},
  year={2021}
}

Acknowledgements

This repository is based on LostGAN, and the propsoed modules can be applied in the layout2img.

layout2img's People

Contributors

wtliao 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.