From Prompts to Pipelines: Evaluating LLM-Generated Medical Image Segmentation Baselines

Large Language Models (LLMs) are increasingly applied to automate complex tasks, but their potential for generating automated medical image segmentation pipelines remains largely underexplored. We present a systematic evaluation of open- and closed-source LLMs in generating U-Net–based segmentation frameworks across six diverse 2D medical image datasets, spanning endoscopy, fluoroscopy, dermoscopic photography, MRI, and fundus imaging. Building on an earlier study, we analyze state-of-the-art 2025 reasoning-enabled models and compare them to non-reasoning LLMs and a strong nnU-Net v2 baseline. Compared to their 2024 predecessors, the 2025 models demonstrated marked improvements in robustness, code quality, and segmentation accuracy across modalities. Our results show that reasoning-augmented LLMs achieve faster convergence, fewer execution errors, and higher Dice scores, while complex datasets with fine structures (e.g., retinal vessels) and volumetric data remain challenging. We also confirmed robustness under repeated runs by comparing one reasoning and one non-reasoning model from the same family, where despite GPT-4o’s consistent, template-like code outputs under multiple runs as the non-reasoning model, GPT-o4-mini-high showed significantly lower run-to-run variability in validation loss and tighter Dice score distributions, demonstrating that chain-of-thought reasoning markedly improves both accuracy and stability. These findings highlight the potential of reasoning-enabled LLMs to automate segmentation workflows with high accuracy and explainability, paving the way for their integration into medical imaging pipelines. Our code is available at <a href='https://github.com/ankilab/LLM_based_Segmentation.git'>https://github.com/ankilab/LLM_based_Segmentation.git<a>

Authors

Institutions

Publication Details

Journal
The Journal of Machine Learning for Biomedical Imaging
Published
2026-03-27
DOI
https://doi.org/10.59275/j.melba.2026-9369
Primary Topic
Retinal Imaging and Analysis
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

From Prompts to Pipelines: Evaluating LLM-Generated Medical Image Segmentation Baselines

Luisa Neubig, Franziska Mathis-Ullrich, Andreas M. Kist, Jasmin Arjomandi
The Journal of Machine Learning for Biomedical Imaging
Retinal Imaging and Analysis
article

From Prompts to Pipelines: Evaluating LLM-Generated Medical Image Segmentation Baselines

Luisa Neubig, Franziska Mathis-Ullrich, Andreas M. Kist, Jasmin Arjomandi
article en

Abstract

Large Language Models (LLMs) are increasingly applied to automate complex tasks, but their potential for generating automated medical image segmentation pipelines remains largely underexplored. We present a systematic evaluation of open- and closed-source LLMs in generating U-Net–based segmentation frameworks across six diverse 2D medical image datasets, spanning endoscopy, fluoroscopy, dermoscopic photography, MRI, and fundus imaging. Building on an earlier study, we analyze state-of-the-art 2025 reasoning-enabled models and compare them to non-reasoning LLMs and a strong nnU-Net v2 baseline. Compared to their 2024 predecessors, the 2025 models demonstrated marked improvements in robustness, code quality, and segmentation accuracy across modalities. Our results show that reasoning-augmented LLMs achieve faster convergence, fewer execution errors, and higher Dice scores, while complex datasets with fine structures (e.g., retinal vessels) and volumetric data remain challenging. We also confirmed robustness under repeated runs by comparing one reasoning and one non-reasoning model from the same family, where despite GPT-4o’s consistent, template-like code outputs under multiple runs as the non-reasoning model, GPT-o4-mini-high showed significantly lower run-to-run variability in validation loss and tighter Dice score distributions, demonstrating that chain-of-thought reasoning markedly improves both accuracy and stability. These findings highlight the potential of reasoning-enabled LLMs to automate segmentation workflows with high accuracy and explainability, paving the way for their integration into medical imaging pipelines. Our code is available at <a href='https://github.com/ankilab/LLM_based_Segmentation.git'>https://github.com/ankilab/LLM_based_Segmentation.git<a>

The Journal of Machine Learning for Biomedical ImagingVol. 2026(MELBA–BVM 2025 Special Issue)
Friedrich-Alexander-Universität Erlangen-Nürnberg (DE)
Industry, innovation and infrastructure
Openalex Percentile: Top 4%
Retinal Imaging and Analysis
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

From Prompts to Pipelines: Evaluating LLM-Generated Medical Image Segmentation Baselines — Luisa Neubig, Franziska Mathis-Ullrich, et al. · The Journal of Machine Learning for Biomedical Imaging (2026) | TGRS Research Map | TGRS