HubCloneHubClone
Tasks

Image-to-Text

Image-to-text models describe an image in words or read the text it contains.

Inputs

Input
A photo of a red fox in fresh snow

Image-to-Text Model

Output

Output

A red fox standing in deep snow.

About Image-to-Text

Image-to-text models describe an image in words or read the text it contains. Browse image-to-text models on HubClone to compare checkpoints, or open a Space to try one in the browser.

Use Cases

Image captioning

Write alt text for photos.

Optical character recognition

Read printed or handwritten text.

Inference

The Transformers pipeline API runs image-to-text models in a few lines. Replace <model-id> with any model listed on this page.

from transformers import pipeline

pipe = pipeline("image-to-text", model="<model-id>")
pipe("fox.png")

Useful Resources

Want to dig deeper into the topic? Great! Here is a hand-picked list of resources we found helpful.

Documentation

  • Image-to-Text task guide
  • Pipelines reference

Notebooks

  • Fine-tuning a image-to-text model