Awesome
PosterLayout: A New Benchmark and Approach for Content-aware Visual-Textual Presentation Layout
This repository contains the guidelines of benchmark PKU PosterLayout and Pytorch implementation of DS-GAN for "PosterLayout: A New Benchmark and Approach for Content-aware Visual-Textual Presentation Layout", CVPR 2023.
For dataset details and downloads, please visit our project page.
<img src="/comparisons_vis.png" alt="comparisons_vis"> <p align="center">Comparison of layouts generated by different approaches.</p>How to Run
Prerequisites
If your operating system is linux-64
, directly run
conda create --name yourenvname --file spec-file.txt
Otherwise, try
pip install -r requirements.txt
- Environment
Python 3.9
CUDA 11.0
- Module
torch==1.12.1
torchvision==0.13.1
timm==0.6.5
opencv-python==4.6.0.66
pandas==1.4.3
Pillow==9.2.0
Models
- Download pre-trained weights from PKU Netdisk(pw: P04X) or Google Drive
- Put corresponding .pth files under
model_weight/
oroutput/
, as follow:
model_weight/
├─ resnet18-5c106cde.pth
├─ resnet50_a1_0-14fe96d1.pth
output/
├─ DS-GAN-Epoch300.pth
Dataset
- Download PKU PosterLayout from the project page
- Unzip compressed files to corresponding directories
- Put directories under
Dataset/
, as follow:
Dataset/
├─ train/
│ ├─ inpainted_poster/
│ ├─ saliencymaps_basnet/
│ ├─ saliencymaps_pfpn/
├─ test/
│ ├─ image_canvas/
│ ├─ saliencymaps_basnet/
│ ├─ saliencymaps_pfpn/
├─ train_csv_9973.csv
Usage
- Training
sh train.sh
- Testing and Evaluating
sh test_n_eval.sh
Citation
If our work is helpful for your research, please cite our paper:
@inproceedings{Hsu-2023-posterlayout,
title={PosterLayout: A New Benchmark and Approach for Content-Aware Visual-Textual Presentation Layout},
author={HsiaoYuan Hsu, Xiangteng He, Yuxin Peng, Hao Kong and Qing Zhang},
booktitle={Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2023},
pages={6018-6026}
}
Contact us
For any questions or further information, please email Ms. Hsu (kslh99@stu.pku.edu.cn).