Skip to content

Official implementation of paper: "DogLayout: Denoising Diffusion GAN for Discrete and Continuous Layout Generation"

Notifications You must be signed in to change notification settings

deadsmither5/DogLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DogLayout: Denoising Diffusion GAN for Discrete and Continuous Layout Generation

Image text Visualization of DogLayout's inference process. During inference, we first obtain the noisy layout from standard gaussian. Then the generator takes it as input to output the predicted clean layout. Subsequently, we derive the less noisy layout by adding noise to the predicted clean layout.

Abstract

Layout Generation aims to synthesize plausible arrangements from given elements. DogLayout (Denoising Diffusion GAN Layout model), which integrates a diffusion process into GANs to enable the generation of discrete label data and significantly reduce diffusion’s sampling time.

Dataset

The datasets are available at:

wget https://huggingface.co/datasets/puar-playground/LACE/resolve/main/datasets.tar.gz 
tar -xvzf datasets.tar.gz

PubLayNet: Decompress the labels.tar.gz to ./dataset/publaynet-max25/raw folder.
Rico: Decompress the rico_dataset_v0.1_semantic_annotations.zip to ./dataset/rico25-max25/raw folder.

Training

For PubLayNet:

python train_all.py --dataset publaynet --device cuda:0 --G_d_model  512 --G_nhead 8 --G_num_layers  4 --D_d_model  512 --D_nhead  8 --D_num_layers  4 --num_timesteps  8 --latent_dim  4 --num_label  6

For Rico:

python train_all.py --dataset rico25 --device cuda:0 --G_d_model  512 --G_nhead  8 --G_num_layers  4 --D_d_model  512 --D_nhead  8 --D_num_layers  4 --num_timesteps  8 --latent_dim  4 --num_label  26 

Testing

For PubLayNet:

python test.py --dataset publaynet --experiment all --device cuda:0 --G_d_model  512 --G_nhead  8 --G_num_layers  4 --D_d_model  512 --D_nhead  8 --D_num_layers  4 --num_timesteps  8 --latent_dim  4 --num_label  6 

For Rico:

python test.py --dataset rico25 --experiment all --device cuda:0 --G_d_model  512 --G_nhead  8 --G_num_layers  4 --D_d_model  512 --D_nhead  8 --D_num_layers  4 --num_timesteps  8 --latent_dim  4 --num_label  26 

About

Official implementation of paper: "DogLayout: Denoising Diffusion GAN for Discrete and Continuous Layout Generation"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages