Paperbanana

by llmsresearch

2.1k 602 downloads Not rated yet MIT
GitHub

About

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.

Details

License
MIT

Explore

- Two-phase multi-agent pipeline with iterative refinement
- Multiple VLM and image generation providers (OpenAI, Azure, Gemini, Atlas Cloud)
- Input optimization layer for better generation quality
- Auto-refine mode and run continuation with user feedback
- CLI, Python API, and MCP server for IDE integration
- Batch generation from manifest files (YAML/JSON)
- PDF input support for methodology context
- PaperBanana Studio – local Gradio web UI

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Paperbanana
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

> Try it in your browser: the
> Colab quickstart notebook
> walks through install → API key → diagram generation end-to-end, no local setup required.

pip install paperbanana

Or install from source for development:

git clone https://github.com/llmsresearch/paperbanana.git
cd paperbanana
pip install -e ".[dev,openai,google]"

paperbanana generate \
--input paper.pdf \
--caption "Overview of our method" \
--pdf-pages "3-8"

paperbanana setup

Interactive wizard that first asks whether to use the official Gemini API.
If you choose official API, it follows the default AI Studio key flow; if not, it asks for a custom Gemini-compatible URL and API key.

generate_diagram

Generate a publication-quality methodology diagram from text. Args: source_context: Methodology section text or relevant paper excerpt. caption: Figure caption describing what the diagram should communicate. iterations: Number of refinement iterations (default 3). Returns: The generated diagram as a PNG image.

generate_plot

Generate a publication-quality statistical plot from JSON data. Args: data_json: JSON string containing the data to plot. Example: '{"x": [1,2,3], "y": [4,5,6], "labels": ["a","b","c"]}' intent: Description of the desired plot (e.g. "Bar chart comparing model accuracy"). iterations: Number of refinement iterations (default 3). Returns: The generated plot as a PNG image.

evaluate_diagram

Evaluate a generated diagram against a human reference on 4 dimensions. Compares the model-generated image to a human-drawn reference using Faithfulness, Conciseness, Readability, and Aesthetics scoring with hierarchical aggregation. Args: generated_path: File path to the model-generated image. reference_path: File path to the human-drawn reference image. context: Original methodology text used to generate the diagram. caption: Figure caption describing what the diagram communicates. Returns: Formatted evaluation scores with per-dimension results and overall winner.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "paperbanana": {
            "paperbanana": {
                "command": "uvx",
                "args": [
                    "--from",
                    "paperbanana[mcp]",
                    "paperbanana-mcp"
                ],
                "env": {
                    "GOOGLE_API_KEY": "<YOUR_GOOGLE_API_KEY>"
                }
            }
        }
    }
}

McpServers

{
    "paperbanana": {
        "command": "uvx",
        "args": [
            "--from",
            "paperbanana[mcp]",
            "paperbanana-mcp"
        ],
        "env": {
            "GOOGLE_API_KEY": "<YOUR_GOOGLE_API_KEY>"
        }
    }
}

PDF as input (install PyMuPDF: pip install 'paperbanana[pdf]')

paperbanana generate \ --input paper.pdf \ --caption "Overview of our method" \ --pdf-pages "3-8"
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about Paperbanana

Relevant YouTube tutorials, setups, and demos