Intermediate10 min read

Read images with a local model

Try a vision-capable model on a screenshot and check what it can and cannot read.

Make a simple test image

In a text editor, type “Workshop A, 14:30, Room 204” and take a screenshot. Save it as workshop.png. Use a high-contrast image with no personal data for your first run. A vision-capable model can process image input alongside your text request.

Run the vision model

Use the same Ollama setup as the quickstart. The gemma3:4b package accepts images and needs more disk and memory than the smaller text model used in the first lessons. Check the linked model card and your available memory before downloading it.

ollama pull gemma3:4b
ollama run gemma3:4b

From the terminal directory containing the screenshot, type the line below into the interactive chat prompt.

./workshop.png Read the image. Return the workshop name, time, and room. Say unreadable for any field you cannot see.

Try a harder image

Compare each field against the screenshot. Then create a second screenshot with smaller or blurrier text and retry in a fresh chat. Keep the prompt identical and record which fields become unreliable.

What to check

Inspect exact text and numbers against the image. For repeated transcription tasks, compare with a dedicated OCR tool and use confidence checks or manual review when errors matter.

Check your understanding

What should an application do when the model reads a blurry room number as 204?

Treat the number as a candidate and verify it against the source. Mark unreadable fields for review.

Sources

Search the guide