EXPERIMENT

Can synthetic instruments replace real labels? Not on their own

An instrument segmenter trained only on rendered instruments, against the same model trained on real labels: the hypothesis, the result, and what it does not show.

This page is still being reviewed by our scientific, clinical and legal experts. It describes plans, not finished work.

The question

Pixel labels for surgical video are slow to make, and the instrument boundaries are the least consistent part of them. A renderer gives unlimited instruments with exact masks. We tested the strong version of the idea:

H1. A model trained only on synthetic instruments is not worse than the same model trained on real labels, on real instruments.

The hypothesis, the margin and the decision rule were fixed in a design document (RFC 0001) before any training run.

How we tested it

  • Synthetic data. Grasper and L-hook models were built in Blender and rendered 20,000 times with exact masks. The renders were laid over 717 frames of the public CholecT50 dataset that contain no instrument, each checked by a person. The augmentations covered light, blur, tissue over the tip, the dark edge of the endoscope image and simulated smoke.
  • Real data. CholecSeg8k: 4,000 labelled frames from 8 videos for training and 1,120 frames from 2 videos for validation.
  • Test. The 7 CholecSeg8k videos that never served as a synthetic background, 2,960 frames in all. Before the first test run, a person checked every test clip for instruments that have no class of their own. Nothing had to be excluded.
  • Model. The same DeepLabV3-ResNet50, settings and number of training steps in every arm. Each arm ran with 3 seeds.
Arm Trained on
A synthetic instruments only
B real labels only
C10 / C25 / C50 / C100 arm A’s model, then 10 / 25 / 50 / 100 % of the real frames
  • Model selection. Arm A chose its checkpoint on synthetic validation data only, so no real label reached the synthetic arm.
  • Test runs. Every chosen checkpoint was run on the test videos exactly once, and each run was recorded.
How the arms were built Rendered instruments are composited over tool-free CholecT50 frames to train arm A. CholecSeg8k real-train frames train arm B. Arms C fine-tune arm A on 10 to 100 % of the real frames. Every chosen model is scored once on 7 CholecSeg8k test videos that were never a background. Blender renders 20 000 graspers, L-hooks Tool-free frames 717, CholecT50, reviewed Real labels CholecSeg8k, 8 videos Arm A synthetic only Arms C10–C100 A, then 10–100 % real Arm B real only Test 7 other videos once per model start from A
Same model, settings and number of training steps in every arm; three seeds each.

Results

The metric is the overlap (IoU) of the instrument mask over all test pixels. A value of 1 is perfect. The range is a 95 % interval over test videos and seeds.

Arm Real labels IoU 95 % interval
A, synthetic only 0 % 0.116 0.04 – 0.19
C10 10 % 0.775 0.66 – 0.83
C25 25 % 0.767 0.63 – 0.83
C50 50 % 0.778 0.65 – 0.84
C100 100 % 0.764 0.62 – 0.84
B, real only 100 % 0.772 0.65 – 0.84
Test IoU per arm with 95 % intervals Arm A scores 0.116, far below every other arm. Arms C10 to C100 and arm B all score between 0.76 and 0.78, with overlapping intervals. 0.00 0.25 0.50 0.75 1.00 IoU of the instrument mask on the 7 test videos A · synthetic only: 0.116 (95 % interval 0.041–0.185) A · synthetic only 0.116 C10 · A + 10 % real: 0.775 (95 % interval 0.658–0.832) C10 · A + 10 % real 0.775 C25 · A + 25 % real: 0.767 (95 % interval 0.633–0.833) C25 · A + 25 % real 0.767 C50 · A + 50 % real: 0.778 (95 % interval 0.648–0.841) C50 · A + 50 % real 0.778 C100 · A + 100 % real: 0.764 (95 % interval 0.624–0.837) C100 · A + 100 % real 0.764 B · real only: 0.772 (95 % interval 0.654–0.837) B · real only 0.772
Dots: IoU over all test pixels, three seeds pooled. Lines: 95 % interval over test videos and seeds.

H1 is rejected. Arm A is 65.5 points behind arm B, with a 95 % interval of −75.9 to −53.5. The design allowed a gap of 2 points at most.

The decision on H1 The gap between arm A and arm B is −65.5 IoU points, with a 95 % interval from −75.9 to −53.5. The whole interval lies far to the left of the −2 margin, so H1 is rejected. within the margin −80 −70 −60 −50 −40 −30 −20 −10 0 10 20 30 margin −2 A − B: −65.5 (95 % interval −75.9 … −53.5) −75.9 −53.5 A − B = −65.5 IoU(A) − IoU(B), points
H1 would have held if the whole interval had stayed to the right of the −2 line.

The synthetic-only model learned the synthetic task: it reached 0.96 on synthetic validation data. On real validation frames it scored about 0.45, and on the test videos 0.12. We checked one explanation, that it had memorised the tissue of the validation operations from the backgrounds. Only 29 of the 717 backgrounds come from those operations, so this does not explain the gap. Why the model fails on real instruments is not yet known.

Arm A during training On synthetic validation data arm A rises from 0.91 to 0.96. On real validation frames it moves between 0.21 and 0.56 without a trend and ends near 0.44. On the test videos it reaches 0.12. 0.00 0.25 0.50 0.75 1.00 1 6 11 16 20 epoch test synthetic val real val (for information) synthetic val, epoch 20: 0.96 0.96 real val (for information), epoch 20: 0.44 0.44 test: 0.116 (0.114 / 0.082 / 0.152) 0.12
Lines: mean of three seeds; bands: lowest to highest seed. The checkpoint was chosen on synthetic val only. Real val was logged and never used.
Data as a table
EpochSynthetic val, meanReal val, mean
10.9120.431
20.9250.399
30.9380.386
40.9410.399
50.9440.363
60.9490.467
70.9490.412
80.9530.442
90.9530.346
100.9560.383
110.9570.334
120.9580.409
130.9590.383
140.9600.403
150.9610.394
160.9620.364
170.9630.398
180.9630.438
190.9630.429
200.9630.442

Six validation frames

The figure shows what the seed-1 models of arms A, B and C10 predict on six real validation frames. The frames were spaced evenly and fixed before any prediction was seen. Test frames are not shown: running the models on them again would be another use of the test set.

  • Where a grasper stands out against the tissue, arm A finds part of it (IoU 0.39 to 0.76).
  • Where the instrument sits at the edge of the view or has a dark shaft (rows 2 and 6), arm A finds almost nothing (0.00 and 0.02). Arms B and C10 find these instruments (0.73 to 0.90).
  • In the last frame arm B marks the L-hook as a grasper, and C10 labels it correctly. The IoU of the instrument mask does not count the class.

Six frames illustrate the numbers above. They are not evidence on their own.

Grid of six laparoscopic frames with instrument masks: the reference labels and the predictions of arms A, B and C10.
Each row: the frame, the reference labels, then arms A, B and C10 (seed 1) with the frame's IoU. Grasper cyan, L-hook yellow. Real validation frames (videos 26 and 52), never the test videos. Runs m1-A-s1-be48f5bc, m1-B-s1-cccfe860, m1-C10-s1-a5ef566d. Frames and reference masks: CholecSeg8k (Hong et al. 2020), from Cholec80 (Twinanda et al. 2017), CC BY-NC-SA 4.0, unlike the rest of this site, which is CC BY 4.0.

What these numbers are not

  • Not proof that synthetic pre-training saves labels. Arms C reach arm B with 10 % of the real frames, about 400 frames, and gain nothing beyond that. But the design had no arm trained on those 10 % without the synthetic step. Without it we cannot tell whether the synthetic step helped, or whether 400 real frames are enough on their own.
  • Not a verdict on synthetic data in general. It holds for this renderer, these instruments and 717 backgrounds, which is fewer than the roughly 1,000 we had planned.
  • Not a clinical result. Speed, glare and blood were not measured separately, and no model is released.

RESEARCH USE ONLY – NOT FOR CLINICAL USE.

What went wrong along the way

  • The first renders were three times slower than they had to be. The denoiser ran on the CPU while the GPU waited. After the fix, 20,000 renders took about 3 hours.
  • The synthetic arm crashed after a few epochs. Some smoke images had been damaged when they were copied to the GPU server. The runs were resumed from their last checkpoint, and every image is now checked before training starts.
  • Six fine-tuning runs started from unfinished models because of that crash. They were marked invalid, never run on the test, and the training code now refuses to start them.

Possible next steps

  • A control arm trained on 10 % and 25 % of the real frames without the synthetic step. This is the cheapest way to learn what the synthetic step adds.
  • Domain randomisation: deliberately unrealistic textures and colours, to test whether the gap is one of appearance.

The full model card with run identifiers is in the project repository. See also the experiment log and why negative results matter.