google-research

Форк
0

..
/
layout-blt 
README.md

Bidirectional Layout Transformer (BLT)

This repository contains the code and models for the following paper:

BLT: Bidirectional Layout Transformer for Controllable Layout Generation In ECCV'22.

If you find this code useful in your research then please cite

@article{kong2021blt,
  title={BLT: Bidirectional Layout Transformer for Controllable Layout Generation},
  author={Kong, Xiang and Jiang, Lu and Chang, Huiwen and Zhang, Han and Hao, Yuan and Gong, Haifeng and Essa, Irfan},
  journal={arXiv preprint arXiv:2112.05112},
  year={2021}
}

Please note that this is not an officially supported Google product.

Introduction

Automatic generation of such layouts is important as we seek scale-able and diverse visual designs. We introduce BLT, a bidirectional layout transformer. BLT differs from autoregressive decoding as it first generates a draft layout that satisfies the user inputs and then refines the layout iteratively.

Set up environment

conda env create -f environment.yml
conda activate layout

or

pip install -r requirement.txt

Datasets

Please download the public datasets at the following webpages and prepare to the JSON format.

  1. COCO
  2. RICO
  3. PubLayNet
  4. Magazine

Running

# Training a model
python  main.py --config configs/${config} --workdir ${model_dir}
# Testing a model
python  main.py --config configs/${config} --workdir ${model_dir} --mode 'test'

Pretrained models on public benchmarks

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.