title: P2P Paper-to-Poster Generator
emoji: π
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
license: mit
P2P: Automated Paper-to-Poster Generation and Fine-Grained Benchmark
π Try it on Hugging Face Spaces
This application is deployed on Hugging Face Spaces! You can try it directly in your browser without any installation:
π Launch P2P Paper-to-Poster Generator
Quick Start on Spaces:
- Upload your PDF research paper
- Enter your OpenAI API key and base URL (if using proxy)
- Input the AI model name (e.g., gpt-4o-mini, claude-3-sonnet)
- Configure the figure detection service URL
- Click "Generate Poster" and wait for processing
- Preview the generated poster and download JSON/HTML files
β οΈ Requirements:
- Valid OpenAI API key with sufficient balance
- Figure detection service URL for extracting images from PDFs
- Compatible AI model (OpenAI, Claude, Gemini, etc.)
π‘ Features:
- Real-time HTML poster preview
- Direct JSON structure display
- Support for multiple AI models
- Flexible API configuration
Overview
P2P is an AI-powered tool that automatically converts academic research papers into professional conference posters. This repository contains the code for generating and evaluating these posters, leveraging large language models to extract key information and create visually appealing presentations.
The full research paper is available on arXiv.
Note: Due to the large size of the evaluation and training datasets, only simple samples are included in this repository. The complete datasets are available on HuggingFace:
- P2PInstruct - Training dataset
- P2PEval - Benchmark dataset
Repository Structure
Core Files
main.py
: Main entry point for generating a poster from a single paperstart.py
: Batch processing script for generating posters from multiple papersend.py
: Evaluation coordinator that processes generated postersevalv2.py
: Core evaluation logic with metrics and comparison methodsfigure_detection.py
: Utility for detecting and extracting figures from PDFs
Directories
poster/
: Core poster generation logicposter.py
: Main poster generation implementationfigures.py
: Figure extraction and processing utilitiescompress.py
: Image compression utilitiesloader.py
: PDF loading utilities
eval/
: Evaluation tools and resourceseval_checklist.py
: Checklist-based evaluation implementationpredict_with_xgboost.py
: ML-based poster quality predictioncommon.yaml
: Common evaluation parametersxgboost_model.joblib
: Pre-trained evaluation model
Requirements
- Python 3.10+
- Dependencies listed in
requirements.txt
Setup
Install dependencies:
pip install -r requirements.txt
playwright install
Usage
Generating a Single Poster
To generate a poster from a single paper:
# Deploy figure_detection first
python main.py --url="URL_TO_PDF" --pdf="path/to/paper.pdf" --model="gpt-4o-mini" --output="output/poster.json"
Parameters:
--url
: URL for PDF processing service (detecting and extracting figures)--pdf
: Path to the local PDF file--model
: LLM model to use (default: gpt-4o-mini)--output
: Output file path (default: poster.json)
Output Files:
poster.json
: JSON representation of the posterposter.html
: HTML version of the posterposter.png
: PNG image of the poster
Batch Generating Posters
To generate posters for multiple papers:
- Organize your papers in a directory structure:
eval/data/
ββ paper_id_1/
ββ paper.pdf
ββ paper_id_2/
ββ paper.pdf
...
Edit
start.py
to configure:url
: URL for PDF processing serviceinput_dir
: Directory containing papers (default: "eval/data")models
: List of AI models to use for generation
Run the batch generation script:
python start.py
Generated posters will be saved to:
eval/temp-v2/{model_name}/{paper_id}/
ββ poster.json
ββ poster.html
ββ poster.png
Evaluating Posters
To evaluate generated posters:
- Ensure reference materials exist:
eval/data/{paper_id}/
ββ poster.png (reference poster)
ββ checklist.yaml (evaluation checklist)
- Run the evaluation script:
python end.py
Evaluation results will be saved to eval/temp-v2/results.jsonl
.
Citation
If you find our work useful, please consider citing P2P:
@misc{sun2025p2pautomatedpapertopostergeneration,
title={P2P: Automated Paper-to-Poster Generation and Fine-Grained Benchmark},
author={Tao Sun and Enhao Pan and Zhengkai Yang and Kaixin Sui and Jiajun Shi and Xianfu Cheng and Tongliang Li and Wenhao Huang and Ge Zhang and Jian Yang and Zhoujun Li},
year={2025},
eprint={2505.17104},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2505.17104},
}