Papers
Topics
Authors
Recent
Search
2000 character limit reached

Med-Banana-50K: Medical Image Editing Dataset

Updated 5 July 2026
  • The paper introduces Med-Banana-50K, a dataset featuring 88,457 editing attempts with a 57.2% success rate across chest X-ray, brain MRI, and fundus photography.
  • It employs Gemini-2.5-Flash-Image for one-shot bidirectional edits and an LLM-as-Judge pipeline to ensure compliance, anatomical plausibility, realism, and fidelity preservation.
  • The dataset logs both successful edits and full conversation histories of failed attempts, enabling contrastive learning, counterfactual augmentation, and alignment research.

Searching arXiv for the specified paper to ground the article in the cited source. Med-Banana-50K is a cross-modality large-scale dataset for text-guided medical image editing introduced to address the absence of large-scale, high-quality, and openly accessible datasets built specifically for medical image editing with strict anatomical and clinical constraints. It comprises instruction-based edits spanning chest X-ray, brain MRI, and fundus photography, covers 23 disease types, and is constructed by leveraging Gemini-2.5-Flash-Image to generate bidirectional edits from real medical images. A central feature of the dataset is its medical quality control pipeline, which combines LLM-as-Judge with a medically grounded rubric and history-aware iterative refinement up to five rounds. In addition to successful edits, the resource includes failed attempts with full conversation logs, positioning it as both a training corpus for image editing and a dataset for preference learning and alignment research (Chen et al., 2 Nov 2025).

1. Dataset scope and composition

Med-Banana-50K is organized around instruction-based medical image editing at a scale of 88,457 total editing attempts, of which 50,635 are successful edits and 37,822 are failed attempts, corresponding to a 57.2% success rate. All images are 1024×1024 px JPEGs with quality 95, and original metadata are stripped of patient identifiers (Chen et al., 2 Nov 2025).

The successful subset spans three modalities and 23 disease types. Chest X-ray contributes 20,521 images, obtained from 9,854 lesion-addition edits and 10,667 lesion-removal edits. Brain MRI contributes 8,891 images, comprising 4,536 additions and 4,355 removals. Fundus photography contributes 21,223 images, comprising 18,505 additions and 2,718 removals. The grand total is 50,635 edited images.

Modality Successful edits Composition
Chest X-ray 20,521 9,854 adds + 10,667 removes
Brain MRI 8,891 4,536 adds + 4,355 removes
Fundus photography 21,223 18,505 adds + 2,718 removes

The disease inventory is modality-specific. Chest X-ray includes 12 pathologies, listed as Pneumothorax, Pleural Effusion, Atelectasis, Consolidation, Pulmonary Edema, Cardiomegaly, Rib/Clavicle Fracture, Lung Lesion (nodule/mass), and four others drawn from common MIMIC-CXR labels. Brain MRI includes four categories: Glioma, Meningioma, Pituitary Tumor, and No-Tumor. Fundus photography includes seven conditions: Diabetic Retinopathy, Glaucoma, Age-Related Macular Degeneration, Cataract, Hypertensive Retinopathy, Myopia, and Normal.

This composition indicates that the dataset is not restricted to a single modality or a single edit direction. A plausible implication is that it can support comparative analyses of editing behavior across imaging domains with different structural priors, lesion morphologies, and notions of fidelity preservation.

2. Bidirectional editing design

For each image–disease pair, Med-Banana-50K performs two tasks: lesion addition, defined as normal to diseased, and lesion removal, defined as diseased to normal. Gemini-2.5-Flash-Image executes each edit in one shot, producing an output that is then judged (Chen et al., 2 Nov 2025).

Instruction creation is handled by Gemini-2.5-Pro. The system prompt emphasizes three properties: understandability, specified as non-expert friendly; specificity, specified as inclusion of anatomical landmarks and disease morphology; and naturalness, specified as colloquial phrasing. The prompt also encodes medical constraints: fidelity preservation, including preservation of noise, grain, and device artifacts; negative rules, including no text overlays, no sharp “stamps,” no copy-paste repetitions, and no extra pathologies; and counterfactual minimality, defined as modifying only disease regions.

The dataset provides concrete examples of this instruction style. For pneumothorax addition in chest X-ray, the instruction is: “Add signs of pneumothorax in the right lung field, showing a visible visceral pleural line with absence of lung markings beyond it, while preserving the original image grain and contrast.” Further examples include pleural effusion insertion in chest X-ray, meningioma removal in brain MRI, and diabetic retinopathy addition in fundus photography.

This design distinguishes the dataset from general-domain editing corpora by coupling natural-language instructions to modality-specific pathological semantics and explicit nonsemantic preservation constraints. This suggests that Med-Banana-50K operationalizes medical editing not merely as visual transformation, but as constrained counterfactual generation.

3. Medical quality control pipeline

The quality control pipeline is based on an LLM-as-Judge framework using Gemini-2.5-Pro with “thinking mode.” The judge receives three inputs: the edited image, the original image, and the editing instruction. It evaluates four boolean criteria with fixed weights: Instruction Compliance at 40%, Structural Plausibility at 25%, Realism at 20%, and Fidelity Preservation at 15% (Chen et al., 2 Nov 2025).

Instruction Compliance is defined as whether the pathology is correctly added or removed. Structural Plausibility is defined as whether the result is anatomically and medically realistic. Realism targets visible blending or deep-fake artifacts. Fidelity Preservation assesses whether original noise, grain, and non-target areas are untouched. The overall verdict is “qualified = true” only if all four criteria pass.

The JSON output format per edit is explicitly specified as:

Q=0.40C+0.25P+0.20R+0.15FQ = 0.40\cdot C + 0.25\cdot P + 0.20\cdot R + 0.15\cdot F1

Across all rounds, the dimension-level pass rates are reported as 78.3% for Instruction Compliance, 75.8% for Structural Plausibility, 79.1% for Realism, 71.2% for Fidelity Preservation, and 66.0% overall.

These figures show that qualification is stricter than a weighted average threshold. Because “qualified = true” requires all four boolean criteria to pass, high marginal pass rates on individual dimensions do not directly translate to equally high end-to-end acceptance rates. A plausible implication is that fidelity preservation acts as a meaningful bottleneck in medically constrained editing, particularly when disease edits must coexist with preservation of acquisition-specific texture and non-target anatomy.

4. Iterative refinement and failure logging

When the judge returns “qualified=false,” Med-Banana-50K invokes history-aware iterative refinement for up to five rounds. The kernel inputs for a new round are the original image together with the full history of previous instructions and verdicts. A meta-instruction directs the system to analyze past failures and propose an improved prompt variant. Each round re-edits from the original image rather than chaining from a previously edited image. The process terminates early on success or stops after five failed attempts; successful edits are saved once qualified, and cases that fail all five rounds are marked as failed and archived with all attempts (Chen et al., 2 Nov 2025).

The failed-attempt subset contains 37,822 total failed tasks. The modality-by-task failure counts are given as follows:

Modality Failure counts
Chest X-ray 7,971 (add) + 4,750 (remove)
Brain MRI 8,630 + 6,949
Fundus photography 3,162 + 6,360

The average rounds to failure or eventual success is approximately 1.35 iterations. The dataset organization includes all_conversations.json, with one entry per (image,disease,task) and a full rounds list, and final_prompts.json, containing the last instruction used in each task, whether successful or final failed round. Metadata fields per entry are image_id, dataset, modality, disease, task, rounds, outcome, success_round if any, and output_path.

The full conversation structure is significant because it preserves failed prompt variants rather than discarding them. This suggests that Med-Banana-50K treats unsuccessful edits as informative supervision for alignment, not merely as noise to be filtered out.

5. Scoring formalism and evaluation semantics

The dataset specifies a composite judge score Q[0,1]Q \in [0,1] formed from the weighted boolean decisions:

Q=0.40C+0.25P+0.20R+0.15FQ = 0.40\cdot C + 0.25\cdot P + 0.20\cdot R + 0.15\cdot F

where CC, PP, RR, and F{0,1}F \in \{0,1\} indicate pass or fail for Compliance, Plausibility, Realism, and Fidelity, respectively (Chen et al., 2 Nov 2025).

The paper also provides the structural similarity index measure, SSIM, for reference:

SSIM(x,y)=(2μxμy+C1)(2σxy+C2)(μx2+C1)(μy2+C1)(σx2+σy2+C2)\mathrm{SSIM}(x,y) = \frac{(2\mu_x\mu_y + C_1)\,(2\sigma_{xy} + C_2)} {(\mu_x^2 + C_1)\,(\mu_y^2 + C_1)\,(\sigma_x^2 + \sigma_y^2 + C_2)}

with μ\mu and σ\sigma denoting mean and variance over local patches, and C1C_1, Q=0.40C+0.25P+0.20R+0.15FQ = 0.40\cdot C + 0.25\cdot P + 0.20\cdot R + 0.15\cdot F0 stabilizing near-zero denominators. However, SSIM is explicitly described as not being used directly in the LLM-as-Judge. Realism and Fidelity Preservation remain defined through the judge’s rubric rather than pixel-wise metrics.

This separation between a reference image-similarity metric and the operative rubric is conceptually important. It indicates that dataset qualification is not reduced to low-level correspondence. Instead, acceptance depends on medical semantics, anatomical plausibility, artifact suppression, and preservation of irrelevant content, which are only partially captured by pixel-wise proxies.

6. Uses, significance, and interpretive boundaries

The documented use cases are fivefold. First, Med-Banana-50K supports training and fine-tuning of text-guided medical editors through supervised learning on 50K successful (image, instruction, edited image) triples. Second, it supports contrastive or preference learning using 37K failure logs. Third, it enables counterfactual augmentation for diagnostic models: synthetic lesion addition yields balanced diseased versus healthy sets, while lesion removal supports domain adaptation to normal distributions. Fourth, it supports explainability and interpretability by using edits to illustrate key visual cues, such as the pleural line for pneumothorax. Fifth, it supports alignment research through negative examples and multi-round dialogues for reward-model calibration; the paper explicitly notes that the logs enable training reward models or direct preference models such as DPO by contrasting successful versus failed instructions on identical source images (Chen et al., 2 Nov 2025).

The dataset is described as publicly available together with code at the stated GitHub repository. Within the framing of the paper, it establishes a foundation for training and evaluating the next generation of medical image editing models.

A common potential misconception is to treat Med-Banana-50K as only a collection of successful edited outputs. The presence of 37,822 failed attempts with full conversation logs shows that it is also structured as a process dataset, retaining the trajectory by which prompts are revised under medical quality feedback. Another potential misconception is to interpret the name “Banana” as implying a connection to non-medical “banana problem” literature. In the cited source, the term designates a medical image editing dataset and does not denote the camel-transport optimization problem described elsewhere on arXiv.

Taken together, the dataset combines three modalities, 23 pathologies, bidirectional tasks, LLM-driven quality control, and full conversation logs for both successes and failures. This suggests a dual role: it is simultaneously a benchmarkable corpus for text-guided medical image editing and a structured substrate for studying alignment under anatomical and clinical constraints (Chen et al., 2 Nov 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Med-Banana-50K.