paperbanana
它能做什么
这项技能根据论文的方法部分和图注,通过多个 AI 步骤生成学术示意图。适合需要为论文或演讲准备清晰图表的研究人员。
适用场景
- ✓当你有论文的方法文本,并希望得到与之匹配的流程图的时候。
- ✓当你需要符合学术会议论文风格的图表的时候。
- ✓当你希望得到方法示意图的自动化初稿的时候。
技能链接
https://github.com/dwzhu-pku/PaperBanana/blob/main/skill/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把我的方法部分和这段图注转化为一张清晰的流程示意图,用于我的论文。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体将方法文本和图注传入一系列 AI 步骤,由它们规划并绘制图表,然后进行检查。你需要提供模型服务的 API 密钥才能运行。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
PaperBanana
Generate publication-quality academic diagrams and pipeline figures from a paper's methodology section and figure caption. PaperBanana orchestrates a multi-agent pipeline (Retriever, Planner, Stylist, Visualizer, Critic) to produce camera-ready figures suitable for venues like NeurIPS, ICML, and ACL.
Environment Setup
cd <repo-root>
uv pip install -r requirements.txt
Set your API key via environment variable or in configs/model_config.yaml.
Option 1 (Recommended): OpenRouter API key — one key for both text reasoning and image generation:
export OPENROUTER_API_KEY="sk-or-v1-..."
Option 2: Google API key — direct access to Gemini API:
export GOOGLE_API_KEY="your-key-here"
If both keys are configured, OpenRouter is used by default.
Usage
python skill/run.py \
--content "METHOD_TEXT" \
--caption "FIGURE_CAPTION" \
--task diagram \
--output output.png
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
--content |
Yes* | Method section text to visualize | |
--content-file |
Yes* | Path to a file containing the method text (alternative to --content) |
|
--caption |
Yes | Figure caption or visual intent | |
--task |
No | diagram |
Task type: diagram |
--output |
No | output.png |
Output image file path |
--aspect-ratio |
No | 21:9 |
Aspect ratio: 21:9, 16:9, or 3:2 |
--max-critic-rounds |
No | 3 |
Maximum critic refinement iterations |
--num-candidates |
No | 10 |
Number of parallel candidates to generate |
--retrieval-setting |
No | auto |
Retrieval mode: auto, manual, random, or none |
--main-model-name |
No | gemini-3.1-pro-preview |
Main model for VLM agents. Provider auto-detected from configured API key |
--image-gen-model-name |
No | gemini-3.1-flash-image-preview |
Model for image generation. Also supports gemini-3-pro-image-preview |
--exp-mode |
No | demo_full |
Pipeline: demo_full (with Stylist) or demo_planner_critic (without Stylist) |
*One of --content or --content-file is required.
When --num-candidates > 1, output files are named <stem>_0.png, <stem>_1.png, etc.
Output
The absolute path of each saved image is printed to stdout, one per line.
Examples
Diagram
python skill/run.py \
--content "We propose a transformer-based encoder-decoder architecture. The encoder consists of 12 self-attention layers with residual connections. The decoder uses cross-attention to attend to encoder outputs and generates the target sequence autoregressively." \
--caption "Figure 1: Overview of the proposed transformer architecture" \
--task diagram \
--output architecture.png
Important Notes
- Runtime: A single candidate typically takes 3-10 minutes depending on model and network conditions. With the default 10 candidates running in parallel, expect ~10-30 minutes total. Plan accordingly.
- API calls: Each candidate involves multiple LLM calls (Retriever + Planner + Stylist + Visualizer + up to 3 Critic rounds). Candidates run in parallel for efficiency.
- Image generation: The Visualizer agent calls an image generation model (Gemini Image) to render diagrams.
About
PaperBanana is based on the PaperVizAgent framework, a reference-driven multi-agent system for automated academic illustration. It was developed as part of the research paper:
PaperBanana: Automating Academic Illustration for AI Scientists Dawei Zhu, Rui Meng, Yale Song, Xiyu Wei, Sujian Li, Tomas Pfister, Jinsung Yoon arXiv:2601.23265
The framework introduces a collaborative team of five specialized agents — Retriever, Planner, Stylist, Visualizer, and Critic — to transform raw scientific content into publication-quality diagrams. Evaluation is conducted on the PaperBananaBench benchmark.
常见问题
需要哪个 API 密钥?
推荐使用 OpenRouter 密钥,也可以使用 Google API 密钥直接访问。
它需要哪些输入?
方法文本(可以直接输入或从文件读取)以及图注。
输出保存在哪里?
保存到你选择的输出文件路径,默认为 output.png。
详情
作者的原始描述
Generate publication-quality academic diagrams from paper methodology text
repo: dwzhu-pku/PaperBanana
热度
- GitHub 星标
- 7.5k
- 排名
- #13213
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/24
评论
- …