All models

Show-and-Tell

An image captioning model that feeds a CNN image embedding into an LSTM that writes the sentence word by word.

Multimodal · 957 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (924 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
37.2M
Operations
957
Framework
PyTorch
Recurrent
Yes
Published
CVPR 2015
Cited by
156 (as of 23 October 2026)
Authors
Oriol Vinyals, Alexander Toshev, Samy Bengio, Dumitru Erhan
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m2805
Graph hash
7842b34f515f98b13529249db7469649014e37beab52212a742d96ad2cedc608
Skeleton hash
ecbfcc2bc186d7c28dd84f579d1368a26e1d828fa450cced30eaee66b7291959
Architecture hash
978a189cb7f5183af21c9a68e1f1456df8d4862711a6f79ae6eb2fe846c882e9
Diagram SHA-256
64c258f3399bc96d8c0dae78450a445276aedbf898bf40c5ee7163b76d0143fa
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Show and Tell, which its authors call the Neural Image Caption (NIC) model, writes a sentence describing a picture. It follows the encoder and decoder recipe of machine translation, but replaces the encoder that reads a source sentence with a deep convolutional network (CNN) that reads the image. The CNN is first pre-trained for image classification, and its last hidden layer becomes the input to a recurrent decoder that generates the sentence.

The decoder is a Long-Short Term Memory (LSTM) network trained to predict each word after seeing the image and all the words before it. The image is shown to the LSTM only once, before the first word. The authors report that feeding it at every step gave worse results, because the network overfits more easily. The paper uses 512 dimensions for the word embeddings and for the LSTM memory.

To limit overfitting, the CNN starts from weights pretrained on a larger dataset such as ImageNet. Captions in the paper's experiments are generated with beam search, using a beam of size 20. On the Pascal dataset the paper reports a BLEU-1 score of 59, where the best earlier score was 25 and human performance is around 69.

Key idea. The paper presents a generative model, built on a deep recurrent architecture, that combines advances in computer vision and machine translation to generate natural sentences describing an image.

  • Show and Tell
  • NIC
  • Neural Image Caption
  • im2txt
  • image captioning
  • image caption generator
  • CNN-LSTM
  • caption generation
  • image description

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{vinyals2015tellneuralimagecaption,
      title={Show and Tell: A Neural Image Caption Generator}, 
      author={Oriol Vinyals and Alexander Toshev and Samy Bengio and Dumitru Erhan},
      year={2015},
      eprint={1411.4555},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1411.4555}, 
}