Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
json
Languages:
English
Size:
10K - 100K
Tags:
academic-poster-generation
instruction-tuning
text-generation
document-understanding
poster-generation
License:
File size: 4,774 Bytes
ec21fa4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | # PosterEval Evaluation Code
This package provides the metric code for evaluating generated academic
posters. It is organized as a small evaluation toolkit: prepare optional inputs,
generate IR when needed, and compute metrics.
## What Is Included
- PPTX structural metrics: `Ove`, `Ali`, `Ofl`
- IR generation from poster images
- IR-based content metrics: `Order`, `Completeness`, `LTA`, `Claim F1`
- OpenRouter-compatible VLM/LLM interface
- Public prompt files and one semantic-metric example config
## Metric Inputs
```text
PPTX
-> evaluate_structural_pptx.py
-> Ove / Ali / Ofl
poster image
-> prepare_ir.py --parser content
-> Order / Completeness / Claim F1
-> prepare_ir.py --parser figure
-> LTA
```
`content` and `figure` are intentionally separate IR parsers. The first focuses
on section roles, OCR text, and atomic claims. The second focuses on tighter
figure grounding for text-figure alignment. The exact prompts are under
`prompts/`.
## Metric Protocol
Structural metrics are computed directly from PPTX geometry:
- `Ofl`: total out-of-canvas shape area divided by canvas area, over all shapes.
- `Ali`: six-axis nearest-anchor alignment loss over valid visible shapes.
- `Ove`: mean IoU over valid visible shape pairs after dropping empty
`Rectangle` / `Rounded Rectangle` background containers and skipping
containment pairs where `intersection / min(area_i, area_j) >= 0.9`.
The valid-visible threshold is `0.1%` of canvas area. Container filtering is
applied to `Ove` only; `Ali` and `Ofl` keep the direct PPTX shape set.
Semantic metrics use two IR files per poster:
- content IR: `Order`, `Completeness`, and `Claim F1`
- figure IR plus poster image: `LTA`
The default Claim F1 policy is
`strict_v2_t05_subset_numeric_one_side85`: LLM pair scores, threshold `0.5`,
greedy one-to-one matching, 1% subset numeric consistency, and a one-side-only
numeric high-score waiver at `0.85`. The empty-claim fallback follows the local
evaluator used for the reported runs: both empty lists score `P=R=1`, empty
generated claims score `P=1,R=0`, and empty reference claims score `P=R=1`.
Reported benchmark IR records use non-empty reference claim lists; the fallback
is retained for compatibility.
## Installation
```bash
python3 -m pip install -r requirements.txt
```
Optional dependencies:
- LibreOffice, only if using `prepare_pptx_autofit.py`.
- A local Qwen3-VL-Embedding-2B checkpoint for LTA. This package includes the
lightweight wrapper `qwen3_vl_embedding.py`; download the model with:
```bash
python3 download_qwen3_vl_embedding.py
```
## OpenRouter
IR parsing and Claim F1 use an OpenAI-compatible OpenRouter endpoint.
```bash
export OPENROUTER_API_KEY=<your_key>
export OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
export POSTEREVAL_LLM_CACHE_DIR=.cache/postereval_llm
```
The default model alias is:
```text
qwen3-vl-235b -> qwen/qwen3-vl-235b-a22b-instruct
```
## Data Layout
For PPTX metrics, each method root should contain one directory per poster:
```text
<METHOD_ROOT>/
sample_001/
poster.pptx
sample_002/
poster.pptx
```
For IR generation, each image root should contain one directory per poster:
```text
<IMAGE_ROOT>/
sample_001/
poster.png
sample_002/
poster.png
```
Flat image roots are also supported with `prepare_ir.py --layout flat`.
## Commands
Structural metrics:
```bash
python3 evaluate_structural_pptx.py \
--pptx-root /path/to/pptx_root \
--output-dir outputs/structural \
--pptx-filename poster.pptx \
--workers 8
```
Structural metrics can be computed directly from a PPTX root; no config file is
required for the common single-root case.
Optional PPTX autofit materialization:
```bash
python3 prepare_pptx_autofit.py \
--src-root /path/to/input_pptx_root \
--dst-root /path/to/output_pptx_root \
--pptx-name poster.pptx
```
IR generation:
```bash
python3 prepare_ir.py \
--input-root /path/to/poster_image_root \
--output-root outputs/ir/method_a \
--parser both \
--layout directories \
--temperature 0.02 \
--workers 8
```
Content metrics:
```bash
python3 evaluate_semantic_ir.py \
--config configs/semantic_ir.example.json \
--output-dir outputs/semantic
```
By default, outputs do not include absolute input paths. Add `--include-paths`
only for local debugging.
## Outputs
Metric scripts write:
- `summary.md`
- `summary.json`
- `per_paper.csv`
- `per_paper.json`
`prepare_ir.py` writes:
- `content_ir/<sample>/poster_ir.json`
- `figure_ir/<sample>/poster_ir.json`
- `summary.json`
## Notes
This package contains code, prompts, and an example semantic config only. It does not
include datasets, generated posters, rendered images, paper PDFs, API keys, or
local runtime artifacts.
|