Machine vision OCR: reading part marks without training data

Character reading is the one inspection task where the AI approach removes work rather than adding it. Every other kind of AI inspection starts by collecting and labelling images of your parts. OCR does not. The model arrives already knowing what letters and numbers look like, because letters and numbers are the same on your line as everywhere else.
That single fact changes the project plan more than it changes the technology. This is what it means in practice, and what it does not solve.
Why OCR needs no training images
A classification or segmentation model has to be taught your specific parts, because a scratch on your casting looks nothing like a scratch on someone else's extrusion. The model has no prior notion of either.
Text is different. The glyph shapes are shared across every industry, so a model trained once on an enormous body of text transfers directly. On the OV80i the OCR block is described in the product itself as recognising "printed text, serial numbers, and other alphanumeric text without requiring any training data". You draw a region where text appears, and it reads what is inside.
The practical consequence is that OCR skips the two steps that dominate the schedule on a normal vision project. There is no image collection campaign, and there is no labelling. A read that would have taken a fortnight of sample gathering is a region drawn in an afternoon.
What you skip
Collecting representative parts, labelling characters, waiting for enough defect examples, retraining when a new part number appears. None of it applies. A part number the line has never produced still reads correctly.
What you still do
Get the optics and lighting right, set the region, tune two detection parameters, and decide what the pass rule compares against. That work does not disappear, and it is where OCR projects succeed or fail.
How it differs from classical OCR
Traditional machine vision character reading works by template matching. You train the system on the shape of each character in your specific font, at your specific size, and it compares candidate regions against that library. It is fast, deterministic, and completely rigid.
Rigid is fine until something changes. A new supplier stamps a slightly different font. The die wears and the character strokes thin. A part arrives rotated a few degrees. Each of those either requires retraining the template library or produces a misread, and misreads on a traceability check are expensive because the part is now recorded as something it is not.
| Situation | Template OCR | AI OCR |
|---|---|---|
| New font or supplier | Retrain the character library | Reads it as-is |
| Worn or thinning strokes | Confidence drops, misreads appear | Degrades gradually, tolerates more |
| Part rotated in the fixture | Needs alignment first | Handles moderate rotation |
| Cast, etched or dot-peened marks | Difficult, low contrast defeats templates | Workable with the right lighting |
| Fixed font, clean print, high volume | Excellent, and cheaper | Also fine, no advantage |
The last row matters. If you are reading crisp inkjet characters in a fixed font on a flat label, classical OCR has been solving that for thirty years and there is no reason to change. AI OCR earns its place on the awkward marks: characters cast into metal, laser-etched on a specular surface, dot-peened, or printed on a curved or textured substrate.

Lighting still decides the outcome
Removing the training data requirement does not remove the physics. The model can only read contrast that exists in the image, and on an embossed or engraved mark there is no colour difference to work with. The characters and the surface are the same material. All you have is topography.
That makes lighting geometry the whole game. A diffuse light washes an engraved mark out completely, because it fills the character recesses as evenly as the surface around them. A directional or dark field arrangement grazes across the surface and turns each character edge into a shadow, which is contrast the model can use. Our guide to machine vision lighting covers the six geometries and how to pick one from the feature you need to see.
Resolution is the second constraint. A rough guide that holds up well is to aim for at least twenty pixels across the height of the smallest character. Below that, stroke detail starts collapsing and the distinction between similar glyphs, an eight against a six or a five against an S, gets thin. Our optics calculators turn a character height and a working distance into the field of view and lens that deliver it.
Tuning, and the two parameters that matter
An OCR region on the OV80i exposes detection parameters in plain language rather than as thresholds you have to reverse engineer. Two of them do most of the work.
Minimum text area
Filters candidate regions by size. The product describes it directly: increase it if noise is being detected as text, decrease it if small text is being filtered out. This is the control for a surface with speckle, casting texture, or machining marks that read as tiny characters.
Unclip ratio
Controls how far each detected text region expands outward. Decrease it if nearby words start merging into one another. This is the control for tightly spaced marks, a date code sitting immediately beside a lot number.
Both are tuned against live video or against captured images, which matters more than it sounds. You are not guessing at a number and waiting for the next production run to see the effect. You change the parameter and watch the detection boxes move.
Turning a read into a verdict
Reading the text is only half of an inspection. The other half is deciding whether what was read is correct, and that depends entirely on what the station is for.
- Presence. Is there a mark at all? The cheapest and most common check, and it catches the blank part that skipped the marking station.
- Match against a fixed value. Does the detected text include the expected string? Right label on the right product.
- Match against a live value. Does the read match the part number the PLC says is running? This is the check that catches a changeover error, and it needs the expected value to arrive from the line rather than being typed into a recipe.
- Format validation. Is the date code a plausible date, is the serial the right length and character set? Catches a partial or smeared print that still reads as something.
The third one is where character reading stops being a cosmetic check and becomes a traceability control. It also needs the camera to talk to the PLC in both directions, receiving the expected value and returning the read. On the OV80i that exchange happens over EtherNet/IP or PROFINET without a gateway PC in between, which is worth knowing at the quoting stage because a separate industrial PC is often the largest line item in a character reading proposal.
Where it fits, and where it does not
Be clear about one limit. AI OCR reads text. It is not a general purpose mark inspection tool, and it will not judge print quality the way a print quality standard does. If your requirement is grading a barcode or scoring the contrast and edge determinism of a printed code, that is a different instrument.
What it is very good at is the everyday traceability work that sits on almost every line and rarely gets automated because the classical version was too brittle to be worth it. Serial number verification, date and lot code confirmation, label validation against the running order, and cast or etched part identification on components that were previously checked by an operator with a torch.
One practical note on scope: character reading usually shares a station with other checks rather than owning one. The same capture that reads a part number can also confirm that a connector is seated and a clip is present, because an AI vision system can run several inspection models over one image. Reading the mark is often the cheapest thing you add to a station you were building anyway.
Frequently Asked Questions
Does AI OCR really need no training data?
For character reading, yes. The model is pre-trained on text in general, and letters and numbers have the same shapes on your line as anywhere else, so it transfers directly without images of your parts. You still have to set the region where text appears, tune the detection parameters, and get the lighting and resolution right. What you skip is collecting sample parts and labelling characters, which is normally the longest part of a vision project.
What is the difference between AI OCR and traditional OCR in machine vision?
Traditional machine vision OCR matches candidate regions against a trained library of character templates in a specific font and size. It is fast and deterministic but rigid: a new font, a worn die, or a rotated part requires retraining or produces misreads. AI OCR recognises characters from learned general features instead, so it tolerates font changes, stroke wear and moderate rotation. For crisp printed text in a fixed font, template OCR is still excellent and usually cheaper. AI OCR earns its place on cast, etched, dot-peened or low contrast marks.
Can machine vision read characters cast or engraved into metal?
Yes, but the result is decided by lighting rather than by the model. Cast and engraved characters are the same colour and material as the surface around them, so there is no colour contrast to read, only topography. Diffuse lighting washes those marks out. A directional or dark field arrangement that grazes the surface turns each character edge into a shadow, which produces the contrast the model needs. Aim for at least twenty pixels across the smallest character height.
What resolution do I need for OCR inspection?
A practical working figure is a minimum of twenty pixels across the height of the smallest character you must read. Below that, stroke detail collapses and similar glyphs such as eight and six, or five and S, become hard to separate reliably. Work backwards from character height to field of view, then to sensor resolution and lens focal length at your available working distance.
Can the camera check a part number against what the PLC says is running?
Yes, and this is the check that catches changeover errors rather than just marking errors. It requires the expected value to arrive from the line and the read value to be returned, which means bidirectional data exchange with the controller over EtherNet/IP or PROFINET. Where that runs on the camera itself, no separate gateway PC is needed, which removes what is often the largest hardware line item in a character reading proposal.
Can OCR grade print quality or read barcodes?
OCR reads text and confirms what it says. It is not a print quality grading instrument and will not score contrast or edge determinism against a printed code standard. Barcode and data matrix decoding is a separate function. If your requirement is formal print quality verification to a standard, that is a different instrument and should be specified as such.
See how Overview AI inspects OCR and part mark verification
Send us a photo of your part or defect and a vision engineer will tell you whether Overview can catch it, with most systems deployed on the line in days.
Related Articles
Machine Vision Lighting
The six lighting geometries, and how to pick one from the feature you need to find.
Read More →Anomaly Detection From Good Samples Only
How to inspect for defects you have never photographed, and when that is the right approach.
Read More →Escape vs Overkill
The two numbers that decide whether an inspection is working, in language quality engineers already use.
Read More →