Leyenda, the demo
the vision pipeline on ten real images
Pick an image: the pipeline sorts it, repairs it if it is noisy, then writes its caption. Further down, twelve freely licensed images show where the captioning model goes wrong.
The model is trained on COCO, an English-language dataset: English is all it produces. Translating its output would distort the demonstration; you would be judging a translation, not the model.
The pipeline, image by image
A surfer on the crest of a wave.
Clean: described without repair, "a man riding a wave on a surfboard".
A spinach pizza on a plate, on a wooden table.
Clean: described without repair, "a pizza sitting on top of a wooden table".
A man in a red jumper holds a skateboard above his head, on a stage.
Clean: described without repair, "a man in a red shirt is holding a skateboard".
A cheese pizza on a white plate.
Clean: described without repair, "a pizza sitting on top of a white plate".
A cross-country skier on a snowy track, in a forest.
Clean: described without repair, "a group of people riding skis on a snow covered slope".
The skier photo, damaged by heavy noise.
Noisy: repaired, then described, "a group of people skiing down a hill".
The spinach pizza photo, damaged by heavy noise.
Noisy: repaired, then described, "a plate with a plate of food on it".
A diagram of molecules drawn as red and blue balls.
Set aside at sorting: not a photograph, the pipeline stops.
A scanned page of text, a scene from a play.
Set aside at sorting: not a photograph, the pipeline stops.
A pencil portrait drawing.
Set aside at sorting: not a photograph, the pipeline stops.
Imagestf.data
The collection mixes photos, paintings, diagrams, drawings and scanned text, with no usable labels.
SortCNN trained from scratch, TensorFlow, Keras
A CNN trained from scratch on five families decides whether the image is a photograph.
Example written for the illustration.
Noisy?Laplacian variance, SciPy
The Laplacian variance measures how much neighbouring pixels jump around, which noise drives up, and compares it with a threshold tuned on validation.
Example written for the illustration.
Denoiseconvolutional autoencoder, TensorFlow, Keras
A convolutional autoencoder rebuilds a clean image, and only sees the images the detector flags.
Real demo image, run through the pipeline.
DescribeInceptionV3, LSTM, Bahdanau attention
InceptionV3, frozen, splits the image into regions; an LSTM with attention writes the caption word by word, looking at the regions that matter.
Real demo image, real attention weights.
Captionin English
The caption comes out in English, and the online demo replays the whole pipeline.

a man riding a wave on a surfboardHover over or tap a word: the reticle frames the area the model was looking at as it wrote it, and the thin line outlines the cells that carried at least half of its attention.
- Sort
a photograph
photo probability: 0.65
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
clean: nothing to repair
variation 0.068, threshold 0.105
how much neighboring pixels vary, which noise drives up; threshold tuned on validation
- Denoise
not applied: the image is clean
- Describe
a man riding a wave on a surfboard
0.8 s on an RTX 4080
on CPU alone, more than 5 s: the demo is computed once, then served as is

a pizza sitting on top of a wooden tableHover over or tap a word: the reticle frames the area the model was looking at as it wrote it, and the thin line outlines the cells that carried at least half of its attention.
- Sort
a photograph
photo probability: 0.75
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
clean: nothing to repair
variation 0.048, threshold 0.105
how much neighboring pixels vary, which noise drives up; threshold tuned on validation
- Denoise
not applied: the image is clean
- Describe
a pizza sitting on top of a wooden table
0.9 s on an RTX 4080
on CPU alone, more than 5 s: the demo is computed once, then served as is

a man in a red shirt is holding a skateboardHover over or tap a word: the reticle frames the area the model was looking at as it wrote it, and the thin line outlines the cells that carried at least half of its attention.
- Sort
a photograph
photo probability: 0.63
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
clean: nothing to repair
variation 0.033, threshold 0.105
how much neighboring pixels vary, which noise drives up; threshold tuned on validation
- Denoise
not applied: the image is clean
- Describe
a man in a red shirt is holding a skateboard
0.7 s on an RTX 4080
on CPU alone, more than 5 s: the demo is computed once, then served as is

a pizza sitting on top of a white plateHover over or tap a word: the reticle frames the area the model was looking at as it wrote it, and the thin line outlines the cells that carried at least half of its attention.
- Sort
a photograph
photo probability: 0.68
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
clean: nothing to repair
variation 0.058, threshold 0.105
how much neighboring pixels vary, which noise drives up; threshold tuned on validation
- Denoise
not applied: the image is clean
- Describe
a pizza sitting on top of a white plate
1.4 s on an RTX 4080
on CPU alone, more than 5 s: the demo is computed once, then served as is

a group of people riding skis on a snow covered slopeHover over or tap a word: the reticle frames the area the model was looking at as it wrote it, and the thin line outlines the cells that carried at least half of its attention.
- Sort
a photograph
photo probability: 0.89
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
clean: nothing to repair
variation 0.052, threshold 0.105
how much neighboring pixels vary, which noise drives up; threshold tuned on validation
- Denoise
not applied: the image is clean
- Describe
a group of people riding skis on a snow covered slope
0.8 s on an RTX 4080
on CPU alone, more than 5 s: the demo is computed once, then served as is


a group of people skiing down a hillHover over or tap a word: the reticle frames the area the model was looking at as it wrote it, and the thin line outlines the cells that carried at least half of its attention.
- Sort
a photograph
photo probability: 0.81
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
noisy: denoise it
variation 0.175, threshold 0.105
how much neighboring pixels vary, which noise drives up; threshold tuned on validation
- Denoise
grain removed by the autoencoder
- Describe
a group of people skiing down a hill
0.5 s on an RTX 4080
on CPU alone, more than 5 s: the demo is computed once, then served as is


a plate with a plate of food on itHover over or tap a word: the reticle frames the area the model was looking at as it wrote it, and the thin line outlines the cells that carried at least half of its attention.
- Sort
a photograph
photo probability: 0.68
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
noisy: denoise it
variation 0.207, threshold 0.105
how much neighboring pixels vary, which noise drives up; threshold tuned on validation
- Denoise
grain removed by the autoencoder
- Describe
a plate with a plate of food on it
1.5 s on an RTX 4080
on CPU alone, more than 5 s: the demo is computed once, then served as is

The pipeline stops here.
- Sort
set aside: not a photograph
photo probability: 0.04
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
not reached
- Denoise
not reached
- Describe
not reached

The pipeline stops here.
- Sort
set aside: not a photograph
photo probability: 0.00
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
not reached
- Denoise
not reached
- Describe
not reached

The pipeline stops here.
- Sort
set aside: not a photograph
photo probability: 0.00
from 0 to 1; above 0.5, it is a photograph
- Measure the noise
not reached
- Denoise
not reached
- Describe
not reached
Where the caption holds, where it invents
These twelve freely licensed images went once through the captioning model alone, without sorting or denoising, and are published unfiltered.
| Group | Images | Breakdown | Correct | Partial | Wrong |
|---|---|---|---|---|---|
| Subjects present in COCO | 7 | 3 | 4 | 0 | |
| Subjects absent from COCO | 5 | 0 | 0 | 5of which 3 invent people |
The captioner learned from COCO alone: 118,287 photos, and a vocabulary of 10,296 words, those seen at least five times. A word it has never seen, it cannot write. On subjects COCO knows, the caption holds: three correct, four partial. Outside COCO, it describes the nearest COCO scene: five wrong out of five, three of which invent people.

Subject present in COCO
a pizza sitting on top of a wooden table
correct

Subject present in COCO
a cat is laying on a bed
correct

Subject present in COCO
a double decker bus parked in front of a building
correct

Subject present in COCO
a black and white dog laying on top of a wooden bench
partialdog correct; color, posture and surface wrong

Subject present in COCO
a person riding a bike down a street
partialobject and place correct; action invented, the bicycles are parked

Subject present in COCO
a train that is parked on the tracks
partialthe place is right, these are tracks; but no train is visible

Subject present in COCO
a close up of a plate of food on a table
partial"close up" and "food" correct; no plate, no table

Subject absent from COCO
a group of people standing next to each other
wrongno people, no group: an aurora over a forest

Subject absent from COCO
a bunch of bananas sitting on top of a table
wrongno bananas, no table: pollen grains seen under a microscope

Subject absent from COCO
a group of people standing on top of a body of water
wronghallucinates people

Subject absent from COCO
a fire hydrant sitting on top of a table
wrongno fire hydrant, no table: a refracting telescope

Subject absent from COCO
a group of people standing on a beach
wronghallucinates people; mistakes sand for a beach
- The verdict. A visual comparison between the image and the generated caption.
- The limitation. Five images illustrate a failure mode; they do not measure a rate.
What these captions are worth
| Metric | Greedy | Scale from 0 to 1 | Beam | Gain |
|---|---|---|---|---|
| BLEU-4four-word runs shared with five human-written captions | 0.187 | 0.229 | ×1.22 | |
| CIDErwords people judged important | 0.546 | 0.600 | ×1.10 |
Image credits
The twelve freely licensed images come from Wikimedia Commons, under licenses that allow redistribution.
- Firehouse Za (4751327744).jpgRyan Snyder, CC BY 2.0
- Cat Sitting On Himself.jpgPhotographer: Lynne R. Lawrie, CC BY 3.0
- Traffic on Glassford Street - geograph.org.uk - 602350.jpgStephen Sweeney, CC BY-SA 2.0
- Ana's Dog.jpgAna Kompan, CC BY-SA 3.0
- Port Street Parked Bikes, New Orleans 2012.jpgInfrogmation of New Orleans, CC BY 2.0
- Odawara-eki-2005-5-4 13.jpgSyohei Arai, CC BY-SA 4.0
- Fractal Broccoli.jpgJon Sullivan, Public domain
- Multicolored aurora borealis pillar over Brastad.jpgW.carter, CC BY-SA 4.0
- Misc pollen colorized.jpgDartmouth Electron Microscope Facility, Dartmouth College, Public domain
- 'River in a Mountain Landscape', oil on canvas painting by John Mix Stanley, c. 1840s.jpgJohn Mix Stanley, Public domain
- Vixen refracting telescope.jpgクリューゲル60, CC BY-SA 3.0
- Morocco Africa Flickr Rosino December 2005 84514010.jpgRosino on Flickr, CC BY-SA 2.0
- The ten images of the pipelineImages from the project's demo.