Name | layout-prompter JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-06-30 14:35:40 |
maintainer | None |
docs_url | None |
author | Shunsuke KITADA |
requires_python | <4.0,>=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LayoutPrompter: Awaken the Design Ability of Large Language Models (NeurIPS2023)

[LayoutPrompter](https://arxiv.org/pdf/2311.06495.pdf) is a versatile method for graphic layout generation, capable of solving various conditional layout generation tasks (as illustrated on the left side) across a range of layout domains (as illustrated on the right side) without any model training or fine-tuning.
## Installation
```shell
pip install git+https://github.com/creative-graphic-design/layout-prompter
```
---
## Results
We conduct experiments on three groups of layout generation tasks, including
- constraint-explicit layout generation
- content-aware layout generation
- text-to-layout
Below are the qualitative results.
### Constraint-Explicit Layout Generation

### Content-Aware Layout Generation

### Text-to-Layout

## Installation
1. Clone this repository
```
git clone https://github.com/microsoft/LayoutGeneration.git
cd LayoutGeneration/LayoutPrompter
```
2. Create a conda environment
```
conda create -n layoutprompter python=3.8
conda activate layoutprompter
```
3. Install PyTorch and other dependencies
```
conda install pytorch=1.13.1 torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
pip install -r requirements.txt
pip install -e src/
```
## Datasets
We use 4 datasets in this work, including `RICO`, `PubLayNet`, `PosterLayout` and `WebUI`.
They can be downloaded from [HuggingFace](https://huggingface.co/datasets/KyleLin/LayoutPrompter) using the following commands:
```
git lfs install
git clone https://huggingface.co/datasets/KyleLin/LayoutPrompter
```
Move the contents to the `dataset` directory as follows:
```
dataset/
├── posterlayout
├── publaynet
├── rico
├── webui
```
## Notebooks
We include three jupyter notebooks [here](./notebooks), each corresponding to a type of layout generation task.
They all consist of the following components:
- Configuration
- Process raw data
- Dynamic exemplar selection
- Input-output serialization
- Call GPT
- Parsing
- Layout ranking
- Visualization
Try it!
## Citation
If you find this code useful for your research, please cite our paper:
```
@inproceedings{lin2023layoutprompter,
title={LayoutPrompter: Awaken the Design Ability of Large Language Models},
author={Lin, Jiawei and Guo, Jiaqi and Sun, Shizhao and Yang, Zijiang James and Lou, Jian-Guang and Zhang, Dongmei},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023}
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "layout-prompter",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Shunsuke KITADA",
"author_email": "shunsuke.kitada.0831@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8c/d1/5e1491888696041638f483412b5883dbfb4daf4aad623accd7243826a059/layout_prompter-0.1.0.tar.gz",
"platform": null,
"description": "# LayoutPrompter: Awaken the Design Ability of Large Language Models (NeurIPS2023)\n\n\n\n[LayoutPrompter](https://arxiv.org/pdf/2311.06495.pdf) is a versatile method for graphic layout generation, capable of solving various conditional layout generation tasks (as illustrated on the left side) across a range of layout domains (as illustrated on the right side) without any model training or fine-tuning.\n## Installation\n\n```shell\npip install git+https://github.com/creative-graphic-design/layout-prompter\n```\n\n---\n\n## Results\n\nWe conduct experiments on three groups of layout generation tasks, including\n- constraint-explicit layout generation\n- content-aware layout generation\n- text-to-layout\n\nBelow are the qualitative results.\n\n### Constraint-Explicit Layout Generation\n\n\n\n### Content-Aware Layout Generation\n\n\n\n### Text-to-Layout\n\n\n\n## Installation\n\n1. Clone this repository\n\n```\ngit clone https://github.com/microsoft/LayoutGeneration.git\ncd LayoutGeneration/LayoutPrompter\n```\n\n2. Create a conda environment\n\n```\nconda create -n layoutprompter python=3.8\nconda activate layoutprompter\n```\n\n3. Install PyTorch and other dependencies\n\n```\nconda install pytorch=1.13.1 torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia\npip install -r requirements.txt\npip install -e src/\n```\n\n## Datasets\n\nWe use 4 datasets in this work, including `RICO`, `PubLayNet`, `PosterLayout` and `WebUI`.\nThey can be downloaded from [HuggingFace](https://huggingface.co/datasets/KyleLin/LayoutPrompter) using the following commands:\n\n```\ngit lfs install\ngit clone https://huggingface.co/datasets/KyleLin/LayoutPrompter\n```\n\nMove the contents to the `dataset` directory as follows:\n\n```\ndataset/\n\u251c\u2500\u2500 posterlayout\n\u251c\u2500\u2500 publaynet\n\u251c\u2500\u2500 rico\n\u251c\u2500\u2500 webui\n```\n\n## Notebooks\n\nWe include three jupyter notebooks [here](./notebooks), each corresponding to a type of layout generation task.\nThey all consist of the following components:\n- Configuration\n- Process raw data\n- Dynamic exemplar selection\n- Input-output serialization\n- Call GPT\n- Parsing\n- Layout ranking\n- Visualization\n\nTry it!\n\n## Citation\n\nIf you find this code useful for your research, please cite our paper:\n\n```\n@inproceedings{lin2023layoutprompter,\n title={LayoutPrompter: Awaken the Design Ability of Large Language Models},\n author={Lin, Jiawei and Guo, Jiaqi and Sun, Shizhao and Yang, Zijiang James and Lou, Jian-Guang and Zhang, Dongmei},\n booktitle={Thirty-seventh Conference on Neural Information Processing Systems},\n year={2023}\n}\n```\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fcbbd78ba19dff475c07d19f1e36ce98a685cdada14bc4b05998e3a055482830",
"md5": "4043342dcb0b71588c6541885812583e",
"sha256": "8a041a69c2543d2fa46e09a684b373fe92af42f92dbc8fa65d8aab5a8a076fd7"
},
"downloads": -1,
"filename": "layout_prompter-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4043342dcb0b71588c6541885812583e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 27396,
"upload_time": "2024-06-30T14:35:38",
"upload_time_iso_8601": "2024-06-30T14:35:38.926236Z",
"url": "https://files.pythonhosted.org/packages/fc/bb/d78ba19dff475c07d19f1e36ce98a685cdada14bc4b05998e3a055482830/layout_prompter-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8cd15e1491888696041638f483412b5883dbfb4daf4aad623accd7243826a059",
"md5": "e0b055f354b4a55a76186c6691163950",
"sha256": "fe567afb4aaef286d0c5f1a689ebbdf363251d21d41665f14af7b11fac46b1b2"
},
"downloads": -1,
"filename": "layout_prompter-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "e0b055f354b4a55a76186c6691163950",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 22181,
"upload_time": "2024-06-30T14:35:40",
"upload_time_iso_8601": "2024-06-30T14:35:40.530752Z",
"url": "https://files.pythonhosted.org/packages/8c/d1/5e1491888696041638f483412b5883dbfb4daf4aad623accd7243826a059/layout_prompter-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-30 14:35:40",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "layout-prompter"
}