A scan of the back of a vintage photo showing the description added to the photo.

Using IMatch AutoTagger for OCR and Text Recognition in Photos

This article shows how to use IMatch AutoTagger to extract visible text from photos and store it as searchable metadata. The workflow is useful for signs, information displays, vehicles, scanned documents, postcards, and handwritten notes. It also explains how prompt design, model choice, temperature, and image size affect text recognition results.

What Is AutoTagger

IMatch AutoTagger creates descriptions, keywords, and traits for your images automatically with the help of local or cloud-based AI models.

AutoTagger supports user-defined prompts and offers many features not available in other software, like the ability to use metadata stored in your database (e.g., person names, location information) to guide the AI while creating descriptions and keywords. This improves the relevance and quality of the results considerably.

Extracting Text from Photos

In this post, I’ll show how to use AutoTagger to extract text visible in images, such as signs, information displays, text on vehicles or buildings, and store the result in a dedicated or standard metadata tag. The same workflow also works for historical documents, postcards, and text written on the back of photos.

The general idea is that, once the text data has been extracted, it is available in IMatch for searching, filtering, sorting, and display. And it can be used with IMatch’s 2026 AI-driven semantic search feature.

Find a Good Prompt and Model

Creating a good prompt for the AI service and model you use is the key for achieving good or excellent results. Picking the right model for the job is also important.

Depending on the clarity of the text to extract, and the overall complexity of the job, smaller local models will struggle where the big cloud-based models have no problems with extracting the text.

Ask the Model to Help with the Prompt

When creating the prompt, I recommend speaking with the model in a chat first. Explain the task, the type of images you work with, and what the expected result should look like. The model must understand that it should look for visible text of all kinds and return only the extracted text, so AutoTagger can store it in a metadata tag.

I started by asking the model this question:

And then added the system and user prompts suggested by the model to a new AutoTagger setting. The setting uses a dedicated trait tag that I named AI.TextData to store the AutoTagger result. You can of course use any tag name you want or store the extracted text in a standard XMP / IPTC tag of your choice.

Keep It Cool: Temperature

For models that support it, the temperature setting in AutoTagger controls how “creative” the model can be in its responses.
For tasks like this, set the temperature to 0. You do not want creativity; you want deterministic mapping from pixels to tokens.

Critical for Success: Image Size

I used the “Large” image size setting in AutoTagger. This helps the AI see smaller details. When you work with images containing very small text or complex text, such as italic handwriting, using the “Large” or even “Extra Large” image size setting can make a big difference.

Pro Tip

You can create two AutoTagger settings: one with the normal image size and one with the “Large” or “Extra Large” setting. Run the normal setting first. If it does not produce useful results for some images, run the larger-image setting on those images.

Refine the Prompt

The first suggested prompt is often good, but not always optimal. I usually go back and forth with the model a few times, explaining which results I got, how they differed from my expectations, and, when useful, providing the image and the result I expected.

After doing this a few times, I usually end up with a prompt that does exactly what I need (in almost all cases). And then I have a specialized AutoTagger setting I can run in IMatch whenever I want text extracted.

My Final Prompt for Text Extraction

These are the prompts that worked for both Qwen 3.8 27B running locally on my PC and Google Gemini 3.8 Flash:

The System Prompt

The User Prompt

I used AutoTagger’s placeholder token [[-c-]] in the user prompt. This lets me provide ad-hoc guidance or additional information when I run AutoTagger.

Important Strategies Applied in This Prompt

The “Empty String/Error Code” constraint: By telling the model to return an empty string when it finds no visible text, you avoid a common failure mode: the model feels forced to find something and starts hallucinating text from the background.

Separation of concerns: The system prompt defines the model’s role and constraints, while the user prompt defines the task and scope. This separation helps the model keep the strict formatting needed for API parsing. Access to the system prompt was added in IMatch 2026.

Verbatim Instruction: Explicitly telling the model not to correct spelling is crucial. LLMs are trained to be helpful and “correct” things; in OCR, “correcting” a typo is actually a failure.

Negative Constraints: Using “Do not provide descriptions” is essential for API usage. It prevents the model from outputting: “The text on the sign says: ‘Stop’.” Instead, it will just output: “Stop”.

Your Mileage May Vary

This is the general prompt I used for my experiments. It works well for the photos I use. It may work out-of-the box for your use case, or it may require some tinkering, depending on your requirements.

For example, if you want to extract signs and text displayed on vehicles, race numbers and driver names from race cars, or make the AI decipher handwritten text in scans of old letters or postcards, creating a fine-tuned prompt for the purpose can make a huge difference.

Reading Signs in Images

Using the prompts shown above and an AutoTagger setting configured as explained, I ran AutoTagger on some images. Here are the results:

A photo of a sign on a Living Wall in Paris, France.
Image resize for this article. Original size is ca. 2000 x 3000 pixel.

Gemini 3.8 Flash extracted the following text from this image:

Note how the AI was able to read both the French and English text even though the sign has been photographed at an angle. This is something the smaller local models usually fail with.

How to Use Extracted Text

Once this text extraction result is available in a metadata tag in your IMatch database, you can search it, display it, and use it everywhere in IMatch where you can use IMatch variables.

Here is how it looks when the tag containing the extracted text is used in a File Window Layout:

Image showing a information display on the living wall at musée du
quai Branly - Jacques Chirac.

Note: The layout does not display the full text because of the height allowed in the layout. This can be changed easily by allowing more height or using a smaller font. IMatch File Window Layouts are very flexible.

Another Example for Text Extraction

An image of the
Welcome to
Terra Nova
National Park
information display.

The text extracted from the sign in this image is:

A photo like this is something many tourists take at a new location: an information display photographed as a memory aid or for later use in a DAM like IMatch.

Reading “Back of the Photo” Text

A common use-case for IMatch users who work with historical images is to scan both the front and the back of a photo when written information is present on the back.

The two resulting images are then added to an IMatch database, where the scan of the back of the photo becomes a version and buddy file of the scan taken from the front (the master). IMatch keeps the two images together when the master is moved or renamed. Rating, label, metadata, and attributes assigned to the master are optionally also applied to the version.

When we run the AutoTagger text extraction setting on the “back” images, we can harvest the information and use it everywhere in IMatch. The information on the back was used when generating the description for the master image:

A photo f three older ladies hiking in the mountains. On the right, a scan of the text on the back of the photo.

This text was extracted using Qwen 3.8 27B running on my graphics card. Processing this image took almost 30 seconds on a RTX 5080. Processing time in the cloud is typically less than 2 seconds.

Local vs. Cloud

For simple text extraction cases, local models such as Gemma 4, Qwen 3.8, and others may be able to do the job. Text extraction is a complex task, even for today’s AI models, so results vary depending on the image, the prompt, and the model.

At the time of writing (September 2026), local models often fail with timeouts, infinite text repetitions (like outputting thousands of line feeds before aborting) or hallucinations. This may change in the future, as local models become better, though.

Real Challenges

A task that currently requires large cloud-based models is text extraction from complex sources like the two examples shown here:

A Vintage Postcard

A scan of a vintage postcard.

Autor: Віктор Заславський
https://commons.wikimedia.org/wiki/File:Old_postcard_from_Zhovkva.jpg

Gemini 3.8 Flash was able to extract the following text. I’ve used a modified prompt for this example that told the model to not only return the original extracted text, but also a version translated into English:

This could surely be improved and the formatting is all over the place, much like the handwritten text on the card. Still, Gemini managed to extract enough text to make the image searchable in IMatch. We can now find it by searching for terms such as “Franciszek” or “Żółkiew”.

A Poem

The last example is this scan of a handwritten poem (Source: https://thegraphicsfairy.com/):

A scan of a vintage handwritten poem.

Gemini extracted the following text from this letter:

Summary

AutoTagger is not a replacement for a dedicated OCR workflow, but it can be very useful when visible text is one part of a larger digital asset management task. With the right prompt, a suitable model, and enough image detail, IMatch can turn text found in photos, scans, signs, and handwritten notes into searchable metadata.

A cute little red robot working on a computer, looking into the camera.

Mario M. Westphal is the developer of IMatch, the digital asset management system (DAM) for Windows. He has a strong background in software development and photography, gained through working for over 30 years in the field for many clients. His special interests are photography, music. literature and of course software development, with a strong focus on digital asset management, database systems and image metadata. He hails from Germany.
You can reach him in the IMatch user community and via support@photools.com.