llmsresearch/paperbanana

Open source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.

PaperBanana – AI‑driven diagram & plot generation

What it is – PaperBanana is an open‑source Python package that lets researchers turn a textual description of a method (or a CSV/JSON of results) into a publication‑ready figure. It does this by orchestrating large‑language‑model (LLM) and vision‑language‑model (VLM) calls in a multi‑agent pipeline, iteratively refining the output until a critic is satisfied.

Key capabilities

  • Methodology diagrams – feed a method.txt (or PDF pages) and a caption; the system plans a visual layout, renders an image, and critiques it in a loop (default 3 rounds, optional auto‑refine).
  • Statistical plots – give a data file and an intent string; a VLM writes matplotlib code which is executed to produce the plot (no image‑generation model needed).
  • Batch & sweep support – a single YAML/JSON manifest can drive dozens of diagram or plot generations, with optional automatic stitching of composite figures.
  • Venue style packs – built‑in NeurIPS, ICML, ACL, IEEE templates; users can add custom style packs to enforce fonts, aspect ratios, and other formatting rules.
  • Multiple providers – works with OpenAI (GPT‑5.2, GPT‑Image‑1.5), Azure/OpenAI, Google Gemini, and Atlas Cloud for both text and image generation. Provider and model can be overridden via CLI flags.
  • CLI, Python API, and Gradio UI – paperbanana generate, paperbanana plot, paperbanana batch, etc., plus a local web UI (paperbanana studio) for interactive runs.

How it works

  1. Input optimization (optional) – parallel VLM calls restructure raw method text and sharpen the caption.
  2. Planning phase – a retriever picks relevant example diagrams, a planner drafts a detailed visual description, and a stylist polishes it for the target venue.
  3. Iterative refinement – a visualizer generates an image from the description; a critic evaluates it against the source and returns an improved description. Steps 4‑5 repeat.

Installation & quick start

pip install paperbanana          # core package
pip install 'paperbanana[studio]'  # optional Gradio UI
paperbanana generate \
  --input examples/sample_inputs/transformer_method.txt \
  --caption "Overview of our encoder‑decoder architecture"

A Colab notebook and Docker image are also provided for zero‑setup experimentation.

Typical use‑case

  1. Write a short “method” text describing your algorithm.
  2. Run paperbanana generate with a caption that matches the figure caption you will use in the paper.
  3. Inspect the intermediate images and, if needed, give feedback (--feedback) or let the auto‑refine loop finish.
  4. Retrieve the final PNG (or JPEG/WebP) from the outputs/run_<timestamp>/ folder and drop it into your manuscript.

Who might benefit – AI researchers, ML engineers, and anyone who needs to produce consistent, venue‑styled figures without hand‑crafting them in drawing tools.


Quick reference (CLI)

Command Purpose
paperbanana generate Create a methodology diagram from text/PDF.
paperbanana plot Generate a statistical plot from CSV/JSON.
paperbanana batch / plot-batch Run many diagrams or plots from a manifest.
paperbanana venues List, init, or manage venue style packs.
paperbanana studio Launch the local Gradio UI.
paperbanana sweep Hyper‑parameter sweep over providers/models, etc.

Links


License – MIT (see LICENSE).

Related

  • Project
  • Project
  • Project
  • Project
  • Project