Surgical text-to-image generation

Chinedu Innocent Nwoye, Rupak Bose, Kareem Elgohary, Lorenzo Arboit, Giorgio Carlino, Joël L. Lavanchy, Pietro Mascagni, Nicolas Padoy

TL;DR

Surgical Imagen is a new diffusion-based generative model that synthesizes high-fidelity, photorealistic surgical images from simple "action triplet" text prompts (e.g., grasper retract gallbladder). By leveraging the T5 language model and a novel instrument-based class balancing technique, the researchers created a system that produces synthetic data so realistic that expert surgeons often struggle to distinguish it from real operative footage.

What Problem Does This Paper Address?

Developing AI for the operating room is notoriously difficult due to a "data bottleneck." Acquiring high-quality surgical video is expensive, fraught with privacy and ethical constraints, and requires labor-intensive manual annotation by medical experts. Furthermore, existing datasets are often heavily imbalanced; common actions are over-represented, while critical but brief moments—like clipping a duct or managing a complication—are rare.

Previous attempts to generate synthetic surgical data often required complex inputs like segmentation masks or reference images. This paper aims to simplify the process by generating realistic images using only text prompts, providing a scalable way to augment datasets and train more robust surgical AI.

Methods

The authors developed Surgical Imagen, building upon the Google Imagen framework. The pipeline consists of three main stages:

  1. Text Encoding: A frozen Large Language Model (LLM) converts the text prompt into embeddings. The researchers compared T5 and Sentence-BERT (SBERT), finding that T5 provided much better semantic separation for surgical actions.
  2. Text-to-Image Diffusion: A conditional diffusion model maps these embeddings into a low-resolution (64x64) image.
  3. Super-Resolution: A second text-conditioned diffusion model upsamples the image to 256x256, adding fine-grained anatomical details and textures.
The Surgical Imagen architecture uses a frozen text encoder and a two-stage diffusion process to generate high-resolution images.

A key technical contribution is the instrument-based class balancing. The authors discovered that surgical text embeddings tend to cluster around the instrument used. By oversampling less frequent triplets based on the inverse frequency of their associated instruments, they significantly improved the model's ability to generate rare surgical scenarios.

Datasets

The model was trained and evaluated using the CholecT50 dataset. This dataset contains 101,000 image-text pairs from laparoscopic cholecystectomy (gallbladder removal) surgeries, annotated with "action triplets" in the format of <instrument, verb, target>.

Key Insights and Ideas

  • T5 Wins for Surgery: While SBERT is popular for many NLP tasks, its embeddings were too tightly clustered for surgical language. T5’s encoder-decoder architecture better captured the subtle semantic differences between similar actions, such as "hook dissect cystic artery" versus "hook dissect cystic plate."
Visualization showing that T5 embeddings (purple) exhibit much better separation and diversity than SBERT (yellow) for surgical language.
  • Triplets are Enough: The researchers proved that simple three-word triplets capture essentially the same semantic information as long, descriptive captions. This validates the use of concise annotations for complex generative tasks.
  • Latent Space is Instrument-Centric: The discovery that the model's "understanding" of a scene is primarily driven by the surgical tool allowed for a more effective class-balancing strategy than traditional methods that look at the entire triplet.
  • Conditioned Upsampling Matters: Unconditional super-resolution often results in blurry textures. By re-injecting the text prompt during the upsampling stage, the model "knows" where to add specific details like smoke from a cautery tool or the fine grain of liver tissue.

Key Results

Surgical Imagen achieved state-of-the-art performance in surgical image synthesis:

  • Fidelity: It reached a Fréchet Inception Distance (FID) of 3.70, significantly outperforming baselines like StackGAN (5.83), indicating high visual similarity to real data.
  • Alignment: A CLIP score of 26.84 confirmed that the generated images accurately reflect the text prompts.
  • Human Expertise: In a survey of 88 medical professionals, participants identified synthetic images as "real" 37.6% of the time. This "confusion rate" is remarkably high given the stringent visual requirements of the surgical domain.
Qualitative comparison between real images from CholecT50 and synthetic images generated by Surgical Imagen.

Limitations and Future Work

Despite its success, the model is currently limited to a single type of surgery (laparoscopic cholecystectomy). The authors also note that diffusion models are computationally expensive, which might limit accessibility for smaller research teams.

Future work aims to expand this framework to surgical video generation, which would incorporate temporal consistency, and to 3D volumetric data (like CT/MRI scans). The authors also suggest that integrating real-time feedback from surgeons could further refine the model's clinical accuracy.

Summary updated

BibTeX
@article{nwoye2025surgical,
  author = {Chinedu Innocent Nwoye and Rupak Bose and Kareem Elgohary and Lorenzo Arboit and Giorgio Carlino and Joël L. Lavanchy and Pietro Mascagni and Nicolas Padoy},
  title = {{Surgical text-to-image generation}},
  journal = {Pattern Recognition Letters},
  year = {2025},
  doi = {10.1016/j.patrec.2025.02.002},
}
Figure