/LayoutGAN-Reimplementation

PyTorch reimplementation of "LayoutGAN: Generating Graphic Layouts with Wireframe Discriminators" publishsed in ICLR 2019

Primary LanguagePythonMIT LicenseMIT

LayoutGAN Reimplementation

PyTorch reimplementation of "LayoutGAN: Generating Graphic Layouts with Wireframe Discriminators" publishsed in ICLR 2019: https://openreview.net/forum?id=HJxB5sRcFQ.

Requirement

  • PyTorch : 1.8.1
  • TorchVision : 0.9.1
  • PyTorch-Lightning : 1.3.4

Getting Started

Point Layout (using MNIST dataset)

  1. Download pre_data_cls.npy from Link. This is from Official Tensorflow Implementation Repository
  2. Run python3 train.py. Use --gpus 1 option for GPU.

BBox Layout (using PubLayNet dataset)

  1. Download labels.tar.gz from PubLayNet Official and decompress it as below.
PubLayNet
├ train.json
├ val.json
└ preprocess.py
  1. Run python3 preprocess.py in /PubLayNet. Then you will have train.npy and val.npy
  2. Run python3 train.py --train_mode bbox. Use --gpus 1 option for GPU.

Results

Point Layout

BBox Layout