
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
github.com/CyberAgentAILab/layout-dm
Here we describe the setup required for the model training and evaluation.
We check the reproducibility under this environment.
We recommend using Poetry (all settings and dependencies in pyproject.toml). Pytorch-geometry provides independent pre-build wheel for a combination of PyTorch and CUDA version (see PyG:Installation for details). If your environment does not match the one above, please update the dependencies.
pip3 install poetry
poetry install
wget https://storage.googleapis.com/ailab-public/layoutdm/layoutdm_starter.zip
unzip layoutdm_starter.zip
The data is decompressed to the following structure:
download
- clustering_weights
- datasets
- fid_weights
- pretrained_weights
Note: our main framework is based on hydra. It is convenient to handle dozens of arguments hierarchically but may require some additional efforts if one is new to hydra.
We provide the trained models here. Please run a jupyter notebook in notebooks/demo.ipynb. You can get and render the results of six layout generation tasks on two datasets (Rico and PubLayNet).
You can also train your own model from scratch, for example by
bash bin/train.sh rico25 layoutdm
, where the first and second argument specifies the dataset (choices) and the type of experiment (choices), respectively.
Note that for training/testing, style of the arguments is key=value
because we use hydra, unlike popular --key value
(e.g., argparse).
poetry run python3 -m src.trainer.trainer.test \
cond=<COND> \
job_dir=<JOB_DIR> \
result_dir=<RESULT_DIR>
<COND>
can be: (unconditional, c, cwh, partial, refinement, relation)
For example, if you want to test the provided LayoutDM model on C->S+P
, the command is as follows:
poetry run python3 -m src.trainer.trainer.test cond=c dataset_dir=./download/datasets job_dir=./download/pretrained/layoutdm_rico result_dir=tmp/dummy_results
Please refer to TestConfig for more options available.
poetry run python3 eval.py <RESULT_DIR>
If you find this code useful for your research, please cite our paper:
@inproceedings{inoue2023layout,
title={{LayoutDM: Discrete Diffusion Model for Controllable Layout Generation}},
author={Naoto Inoue and Kotaro Kikuchi and Edgar Simo-Serra and Mayu Otani and Kota Yamaguchi},
booktitle={The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2023},
pages={XXXX-XXXX},
doi={XXXX}
}
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.