Blog

2026.10.09

Date Code Inspection AI – OCR/OCV, RFP and FAT/SAT for Thai Plants

Date Code Inspection AI – OCR/OCV, RFP and FAT/SAT for Thai Plants

A best-before date that is off by 1 day. A lot number still carrying the previous product’s value. A code that is simply missing because the ink did not fire. With coding errors on a packaging line, a single case found on a retailer’s or wholesaler’s shelf is enough to leave you dealing with recalls or returns, relabeling, and explanations to the customer. Many plants have inkjet, laser or TTO (thermal transfer overprint) printers installed, but few of them check on every unit whether the printed content is actually correct. This is where date code inspection AI comes up for consideration: a system that reads the code with a camera and judges on the line whether its content is correct.

This article makes one argument. The success of date code inspection AI is decided not by the accuracy of the character recognition model, but by the following four things: (1) receiving the “correct printed content” (the expected value) automatically from the ERP/MES production order rather than from manual entry by a person; (2) judging “cannot be read”, “content is wrong” and “no print” as distinct results; (3) confirming that NG units have actually left the line (reject confirmation); and (4) running “deliberately wrong prints, faded prints and broken characters” through acceptance testing and measuring misses and false rejects at full line speed. And the most dangerous incident is not a faded print. It is a date or lot setting that was entered wrongly at a changeover and then keeps being printed perfectly cleanly. OCR (can it be read?) alone does not stop this incident; only OCV (does it match the expected value?) does.

Below, for quality assurance managers, production engineering managers and plant managers at Japanese-affiliated plants in Thailand (and ASEAN) that run packaging lines for food, beverages, seasonings, pharmaceuticals, cosmetics or household products, or lot-marking lines for automotive or electronic parts, we work through the differences between methods, the types of incident, how expected values are handed over, imaging and reject design, product options, records, a model calculation of costs and benefits, RFP items, FAT/SAT test design, and issues specific to Thailand and ASEAN, so that you can assemble the material needed for internal decisions. Note that the model plant’s incident counts, unit costs, amounts, detection rates and payback periods in this article are all placeholder figures set for this article. They are not industry averages, survey results or manufacturers’ prices. Also, the parts that touch on laws and regulations are an introduction to public information and are not legal advice.

Why print inspection is being questioned on Thai packaging lines now

The environment around Thai food plants in 2026 is not easy. According to a Pattaya Mail report, the Federation of Thai Industries (FTI), the Thai Board of Trade and the National Food Institute (NFI) forecast that Thailand’s food exports in 2026 will fall 7.3% year on year to 1.4 trillion baht (42 billion US dollars). Food exports in January–February 2026 fell 10.5% to 202.1 billion baht, with rising energy and logistics costs cited as the main cause. This is a forecast as of April, and this article has not checked any later revisions. In a year when sales are hard to grow, the profit lost to recalls and returns, and the customer trust at stake, weigh all the more.

The labeling rules have also changed. According to the GAIN report of the USDA (US Department of Agriculture) Foreign Agricultural Service (July 2026), Thai Ministry of Public Health Notification No.450 (B.E.2567, 2024), “Labelling of Pre-packaged Food”, took effect on July 19, 2024, and the transition period for labels under the old rules ended on July 18, 2026. From July 19, 2026 onward, labels must fully comply with the new notification. A labeling changeover is also an opportunity to review print layouts, date formats and printer jobs. A period in which old and new jobs coexist is also a period in which setting errors are likely.

When it comes to using AI, Thai companies are still at an early stage. According to a report by The Nation Thailand (October 6, 2026), the World Bank revised its 2026 growth forecast for Thailand upward to 2.0%, while pointing out that only 12% of Thai companies were using AI as of December 2025, that only some of those were paying for it, and that about 80% of Thai companies have not seen productivity gains from AI. The barriers cited were high costs, a lack of expertise, and concerns about security and privacy.

As for national direction, according to a Macau Business report, in late August 2026 the “National AI Roadmap for the Sustainable Productivity of Industries in Thailand”, prepared by the Foundation for Thailand Productivity Institute (FTPI) and the Asian Productivity Organization (APO), was handed over at Thailand Productivity Forum 2026. The recommended targets for the Ministry of Industry include a 15% productivity improvement in priority sectors by 2030, AI adoption rates of 60% or more among large companies and 40% or more among SMEs in key sectors, and 80 or more AI pilots (30% of which go into production deployment). These are recommended targets, not targets decided by the government. On the investment promotion side, according to an Alvarez & Marsal commentary published on Mondaq, on January 15, 2026 the BOI announced a new group of investment promotion measures to replace the scheme that expired in 2025, and advanced manufacturing and automation are among those covered. Many of the measures are said to accept applications from the first business day of 2026 to the last business day of 2027. Please confirm the details of individual incentives, and whether your own project qualifies, with the BOI or with professionals.

On the market side, inspection equipment makers have also begun to put AI OCR for date and lot codes front and center. In July 2026 a sponsored article by US-based Zebra Technologies, and in August a flyer from one of its distributors, promoted date and lot code inspection for food, beverages, cosmetics and consumer goods. In addition, a press release from research firm Future Market Insights (July 2026) forecasts that the market for inline OCR validation for packaging lines will grow from 248 million US dollars in 2026 to 661 million US dollars in 2036 (a compound annual growth rate of 10.3%). This is a forecast from a research firm that also serves to promote a paid report, and the market definition is not shown in detail, so it should be treated with caution.

What is date code inspection AI? OCR, OCV, print quality inspection and barcode verification compared

The term “print inspection” tends to be used to refer to several mechanisms with different purposes. Much of the reason implementation discussions talk past each other is that these have not been distinguished.

OCR (Optical Character Recognition) is the function that “reads” a printed character string. It extracts what is written as a string and records it. OCR alone cannot tell you whether what it read is correct.

OCV (Optical Character Verification) is the function that checks whether the printed string matches “what should have been printed” (the expected value). It presupposes having an expected value, and it is OCV that can stop incidents such as a wrongly set date or a lot left over from the previous product.

Print presence and quality inspection does not look at content; it checks whether a print exists, whether it is in the specified position, whether the character count is right, and whether there is fading or missing parts of characters.

Barcode verification grades whether 1D and 2D codes are printed at the quality required by the standard. For example, ISO/IEC 15416:2025 is the standard that defines how to measure and evaluate the print quality of linear (1D) barcodes; it is not a quality standard for human-readable date or lot strings. Barcode verifier grades and acceptance tests are covered in detail in “Barcode Verifier: Print Quality Grades and RFP for Thai Plants“.

MethodWhat it checksIncidents it can stopIncidents it cannot stopExpected value needed?
Print presence and positionWhether a print exists and is in the specified positionNo print, large position shiftWrong date or lot settings, slight fadingNot needed
Print quality inspectionCharacter count, fading, broken characters, smearingNo print, fading, broken characters, double printingWrong content (a cleanly printed wrong date)Not needed (settings such as character count are needed)
OCR (read and record)Reads and records the stringDetection of unreadable prints, tracing after the factPrints that are readable but have the wrong contentNot needed
OCV (expected-value verification)Whether the read string matches the expected valueSetting errors, leftover values from the previous product, no print, unreadable printsCases where the expected value itself is wrongNeeded
Barcode verificationPrint quality grade of the code, data contentDegraded print quality that leads to read failuresErrors in the human-readable date stringNeeded if data matching is done

In practice, these are combined in stages. Printer maker Domino Printing Sciences describes the software for its vision systems in 3 tiers. According to its brochure (2025 edition), R150 checks presence and position, R350 counts characters and verifies machine-readable codes, and R550 verifies content by OCR/OCV. What this tiering tells us is that unless content is verified, the case of “a wrong date printed cleanly” cannot be detected.

Note that the term AI-OCR is also used for reading paper forms and turning them into data. When implementing AI-OCR for forms, “read accuracy” is the main issue, but in print inspection on a packaging line the main purpose is “to stop anything that does not match the expected value”. The same character recognition is evaluated on a different axis. How to measure accuracy on the forms side is covered in “AI OCR Accuracy: PoC and Acceptance Testing for Multilingual Documents“.

Where do incidents occur? 5 types of coding error and which detection method catches them

When considering print inspection, first take stock of “which incidents you want to stop”. There are several overseas studies on how far labeling errors lead to recalls.

According to a Food Business MEA article (2023) introducing a study that analyzed allergen- and gluten-related recalls of US FDA-regulated foods (fiscal years 2013–2019, data from the FDA’s Recall Enterprise System), about 70% of serious allergen recalls whose root cause was known were related to labeling, and 63.5% might have been prevented by proper control of label content and 36.5% by proper control of label operations. These are US figures for recalls related to allergen labeling, not the share attributable to date or lot coding errors. Still, the view that not only label content but also operational control is a target for recall prevention is a useful reference for designing print inspection, which manages which job is used.

In another study, Soon and Wahab (Trends in Food Science & Technology, 2021) identified 2,470 food recalls and alerts related to labeling errors issued in 2011–2020 by 5 agencies in Canada, Australia/New Zealand, the UK and the US (USDA FSIS and FDA). Most were allergen-related (2,301 cases), but 36 were due to wrong best-before or use-by dates. While “packaging and printing errors” are cited as a contributing factor, many root causes are described as under-reported or unknown. The number of date errors may look small, but it is a figure that depends on reporting practices.

For Thailand, a journal of the Thai FDA (2022) carries an analysis of cases in which food exported from Thailand to the US was refused import by the US FDA (2011–2020). The main cause of refusal was adulteration (defects and hygiene) at 70.2%, and incorrect food labeling is included among the reasons for refusal. The number or share of labeling-related cases is not shown in the abstract. In addition, this article’s research did not find any statistics summarizing the number of recalls in Thailand caused by date coding.

More important than the size of the numbers is that the methods that can stop an incident differ by incident “type”. Coding errors that occur on the shop floor fall roughly into the following 5 types.

TypeTypical causesAppearancePresence and quality inspectionOCROCV
(1) Setting error (wrong date, wrong lot)Wrong job selected at changeover, manual entry error, forgetting to roll over the dateClearly readableDoes not stop itReadable, so does not stop it (a record remains)Stops it
(2) No printInk out, clogged nozzle, trigger failure, product orientationNothing thereStops itUnreadable, so stops itStops it
(3) Fading and broken charactersInk viscosity, dirty print head, compatibility with the substrate, conveyor vibrationPartly unreadableStops it depending on severityStops it depending on severityStops it depending on severity
(4) Position shift and overlapProduct position shift, double trigger, printing on the seal areaHard to read, overlaps another printStops itStops it depending on severityStops it depending on severity
(5) Readable but another line’s valueJobs mixed up between multiple lines, wrong plant code or timeClearly readableDoes not stop itDoes not stop itStops it if the expected value is per line

As this table shows, types (1) and (5) are cleanly readable, so presence and quality inspection or OCR alone will not stop them. And once type (1) happens, every product printed between one changeover and the next carries the same error. Fading and broken characters are defects of individual units, but a setting error is a defect of the whole lot. Set the priorities for print inspection with this difference in mind.

When taking stock, cross-checking the following three records narrows down the target.

  • Records of returns, recalls and complaints from customers (retailers and wholesalers): which type, on which line, how many units escaped
  • Records of print defects found in end-of-line sampling inspection: which type, found how many hours later, how many units reworked
  • Records of printer job changes and changeovers: who set which value, and when

Many plants do not keep the third record. In that case, building a mechanism to record “who set which value” before print inspection is itself the first improvement.

Deep learning OCR vs font-trained OCR

When comparing print inspection systems, the big difference between methods lies in how characters are read. Conventional OCR reads by registering the fonts used for printing and teaching a reference for each character. Deep learning OCR uses models pre-trained on large numbers of images and fonts, and is a technology aimed at removing font registration.

Let us look at what vendors claim. In its flyer for date and lot inspection, Zebra says that “Conventional OCR often requires font definitions, character training, and significant setup”, and says its own AI OCR (the Aurora Focus software combined with the NS42 smart vision sensor or the FS42 fixed industrial scanner) is pre-trained on large numbers of real-world images and fonts. According to the company’s claims, it can inspect up to 900 date and lot codes per minute, with an individual read in as little as 40 milliseconds, handles shrink wrap, reflections and glare, curved (concave) surfaces, embossed characters and variations in print quality, and achieves “near 100% accuracy”. All of these are vendor claims, and the conditions for the accuracy figure are not stated. They need to be confirmed during acceptance testing with your own products and prints.

KEYENCE claims that OCR on its AI-equipped vision sensors requires no character segmentation, dictionary registration or other setting adjustments, that the built-in AI selects the optimal inspection tool in 2 seconds, and that reading remains stable even when character shading, thickness or size changes. The company also says it supports OCR/OCV for food and beverages with the VS series and the CV-X series, and cites as factors that hinder reading: reduced readability from mismatches between print method, ink and substrate; lighting, dust and humidity; and high speed with many product variants.

AspectFont-trained (conventional OCR/OCV)Deep learning OCR (pre-trained model)
Start-upRequires font definitions, per-character teaching and threshold tuningVendors claim font registration can be skipped. Lighting, field of view and read-area settings remain
Adding products and formatsRegistration and tuning for every new font or formatVendors claim robustness to format changes. Re-verification is still needed when adding
Curved surfaces, reflections, low contrastStrongly dependent on lighting and imaging conditionsSome products claim to handle them (vendor claim). Engineering the imaging conditions is still important
Explainability (why NG)Easy to explain with per-character match scoresHow it is explained differs by product. Check how the basis for the judgment is recorded
How misreads appearCannot read unregistered formats (tends to fail safe, i.e. reject rather than pass)Confirm by testing whether it may “manage to read” similar-looking characters
Scope of vendor claimsCheck the conditions behind figures in each product’s documentationThere are cases where accuracy figures come without conditions (e.g. Zebra’s “near 100%”)

Deep learning OCR may greatly reduce start-up effort, but there is one caution. What matters in print inspection is less “being unable to read” than “judging a wrong character as correct”. For example, when “8” and “3”, “0” and “D”, or “1” and “7” fade into similar shapes, is the degraded character wrongly judged to match the expected value? Regardless of method, confirm this with tests that deliberately run prints degraded into similar-looking characters.

For pharmaceutical plants, developments in the EU and PIC/S are also a useful reference. According to a GMP Insiders commentary (2025), the draft of the new EU GMP Annex 22 (Artificial Intelligence) calls, where applicable, for treating low-confidence predictions as “undecided”, for explainability of decisions, and for strict separation of training data and test data, among other things. According to a PharmaNow article, as of August 12, 2026 Annex 22 is still at the draft stage and has not been adopted or put into effect. Applied to print inspection design, this leads to the idea of rejecting items that are “neither OK nor NG, with low confidence” in the same way as NG items and having a person re-check them.

Where should the expected value come from? Single-source distribution from ERP/MES to printer and camera, and changeovers

How well OCV works depends on how correct the expected value is. If operators type the expected value into the inspection system’s screen by hand, then entering the same mistake into the inspection system as was entered into the printer means the wrong date will be judged “correct”. If the same person enters both the print settings and the inspection expected value while looking at the same sheet of paper, the inspection is not an independent check.

The basic configuration should therefore be one in which the expected value is received automatically from the ERP or MES production order and the same value is distributed simultaneously to the printer and the camera. A typical configuration is summarized in the figure.

Date Code Inspection AI – OCR/OCV, RFP and FAT/SAT for Thai Plants - figure 1

Figure: Example system architecture for date code inspection AI. The same expected value (print content) is distributed from the ERP/MES production order to the printer and the camera. The camera’s read result is compared with the expected value and judged OK, NG or unreadable (No-read); NG and No-read units are ejected by the reject device, and a reject confirmation sensor confirms the ejection. When N consecutive NGs occur, the line is stopped, and images, judgments and expected values are recorded.

What to decide about handing over the expected value

  • Source of the expected value: Which items are assembled, and how, from the item master (shelf-life days, format, plant code) and the production order (production date, lot, line). Because the best-before date is calculated as “production date + number of days”, the calculation rule is also part of the expected value.
  • Destinations and simultaneity: The same value must reach the printer and the camera at the same time. Make sure production does not start with only one of them updated.
  • Job selection at changeover: Operators should not enter values; they should only select the production order number (or scan its barcode). Some printer makers say that, using centralized label distribution software, job management and label selection can be automated from an existing ERP/MES (Domino’s claim).
  • Prohibition of manual entry and exception procedures: For cases where manual entry is unavoidable, such as system failures, decide in advance who approves it, a two-person check, and how it is recorded.
  • Change history: Record who set which expected value, to which job, and when. The deficiencies in “control of label operations” shown in the recall study can be considered to include this kind of setting and change management.
  • Date rollover: Decide how the production date is handled for production that runs past midnight, and how time is synchronized when a time is printed.

The printed lot and date are also the starting point of traceability. A mechanism for receiving the expected value from the production order is almost the same data flow as a mechanism for reverse lot lookup. The overall design of traceability in a food plant is covered in “Food Factory Traceability System: RFP and 90-Day Deployment“.

Aligning the human-readable date with the date inside the barcode

If GS1 barcodes or 2D codes are printed on the packaging, whether the human-readable date and the date inside the code point to the same day can also be a target of verification. In the official GS1 dataset, Application Identifier (AI) (10) is the batch/lot (alphanumeric, up to 20 characters), (11) the production date, (13) the packaging date, (15) the best-before date, (16) the sell-by date, and (17) the expiration/use-by date, and all dates are 6 digits in YYMMDD. In addition, date AIs cannot be used on their own; they are used in combination with a GTIN (AI (01)) or similar.

On the other hand, under Thai Notification No.450, expiry dates are to be written in forms such as “day/month/year” (covered in more detail in the section on issues specific to Thailand and ASEAN below). In other words, the same date exists in different formats: “day/month/year” on the package and “YYMMDD” inside the code. If you receive the expected value from ERP/MES as a single date, generate both formats from it and verify against them, format conversion errors can also be detected. If you are considering a move to 2D codes, “GS1 Digital Link implementation in Thailand: QR migration and acceptance” is also a useful reference.

Designing imaging, lighting and rejection

Once the flow of expected values is settled, the next step is design that “captures reliably and ejects reliably”. The performance of print inspection is often decided here, before the model.

Line speed and character size

First, confirm the line speed (units per minute or per hour) and the processing time available per unit. The throughput figures vendors give are upper limits. Domino states up to 60,000 units per hour for the OEM type of the R-Series (1 camera) and up to 90,000 units per hour for the i-Tech type (1–2 cameras); Zebra states up to 900 units per minute (equivalent to 54,000 units per hour by simple conversion) and a minimum read time of 40 milliseconds. All of these are vendor claims, and actual speed changes with lighting, field of view, number of characters and conveying conditions.

Character size is also a precondition. According to the USDA GAIN report, under Thai Notification No.450 the character height of mandatory information, including the expiry date, must be at least 1 mm for label areas of 100 cm² or less and at least 1.5 mm for label areas over 100 cm². Reading 1 mm-high characters stably requires camera resolution and a field of view to match. Widening the field of view to absorb position shifts reduces the number of pixels per character. Because this is a trade-off, measure the variation in print position first and then decide the field of view. How to choose a camera is covered in detail in “Industrial Camera Selection for Thai Factories: FAT/SAT Guide“.

Lighting and the print surface

Packaging print surfaces are often in poor condition for inspection. The conditions that Zebra’s materials list as difficult to read are shrink wrap and uneven surfaces, reflective packaging and glare, distorted, uneven or low-quality prints, changes in product shape or code position, changes in fonts or character styles, concave surfaces, and embossed characters. On aluminum-metallized film, transparent bottles, can bottoms and curved caps, how the light is applied determines whether the code can be read. Lighting selection is covered in “AI Visual Inspection Lighting Selection: Reflective Parts to FAT and SAT“.

Triggering and tracking

The camera is driven by a trigger (such as a photoelectric sensor) that decides when to capture as the product arrives. If a trigger is missed, a product “that was never captured” is created. To avoid passing uncaptured products as OK, design the system to reconcile the number of triggers with the number of judgments and to stop if they diverge. A mechanism is also needed to track the distance from the camera position to the reject device, using a conveyor encoder or similar, so that the very product judged NG is the one ejected.

Rejection and reject confirmation

Even if NG is judged, it escapes if ejection fails. Beyond choosing a reject device such as an air blast, pusher or drop type, decide the following.

  • Reject confirmation: Use a sensor to confirm that the product that should have been ejected actually entered the reject bin. If this cannot be confirmed, stop the line.
  • Reject bin management: Lock it, detect when it is full, and record collection and disposition. Make sure ejected products are not put back by hand.
  • Line stop on consecutive NGs: When N consecutive NGs occur, a setting error or a printer failure is likely, so stop the line rather than continuing to eject. Because a type (1) setting error makes everything NG from the first unit, stopping here is the fastest response.
  • Handling of unreadable items: Do not pass unreadable items as OK. Eject them in the same way as NG, or divert them to a separate bin for re-checking by a person.
  • Equipment failure: Interlock the line so that it does not keep running when the camera or the judgment unit stops.

On the other hand, making NG too strict increases false rejects, in which correct prints are also ejected. False rejects become scrap and rework costs and are also a reason the shop floor wants to switch inspection off. How to reduce false rejects and how to settle them at acceptance is covered in detail in “AI Visual Inspection False Rejects: Thresholds and Acceptance“.

Product and method options for print inspection

When comparing print inspection systems, discussions move faster if you first sort out which family to choose before looking at product names. Based on public information, there are four broad options. The product names and functions mentioned here are all claims in each company’s public materials and do not recommend any specific product.

1. Smart camera type (sensors and cameras from dedicated vision makers)

These are devices that integrate the camera, lighting and judgment functions, and can be used regardless of printer make. Zebra’s AI OCR (Aurora Focus and NS42/FS42) and KEYENCE’s AI-equipped vision sensors fall into this family. It is a configuration that is easy to consider one line at a time. On the other hand, integration for receiving expected values from ERP/MES, reject confirmation and record storage may need to be built separately as surrounding systems.

2. PC-based vision system

This configuration connects multiple cameras to an image-processing PC or controller. Please check each company’s materials for which configuration a specific product falls into. It is considered when you want to consolidate multiple inspections (print, label presence, caps and so on) on 1 unit, or when line speeds are high.

3. Inspection options from printer makers

This family uses the same maker for both printer and inspection. Domino says its R-Series works with all of its printers, offers tiers from presence and position (R150) to OCR/OCV (R550), and, combined with centralized label distribution software, can automate job management and label selection from ERP/MES. There are also examples of printer makers and vision makers teaming up. According to a 2018 article in Food Processing (Australia), Markem-Imaje and Cognex had collaborated since 2015 on automated code verification using printers and cameras, and in 2018 announced a deepened collaboration as “Mark & Read”. The aim was described as reducing rework caused by missing or illegible characters and barcodes, and scrap caused by printing wrong data. The strength is that printer and job management come as one, and suitability depends on whether your existing printers are from the same maker.

4. In-house development or SIer build

This approach combines general-purpose industrial cameras and lighting with open-source or commercial OCR libraries. While expected-value integration, records, multilingual screens and so on can be built exactly to your own requirements, you take on all of the training and maintenance of the deep learning model and the validation records yourselves. In fields such as pharmaceuticals, where validation documentation is heavy, the burden tends to be large.

How to choose

A rough guide to choosing is as follows.

Decision axisSmart camera typePC-based visionPrinter maker’s inspection optionIn-house development or SIer build
Mixed printer makesSuitableSuitableMay be unsuitableSuitable
Expected-value integration with ERP/MESMay need to be built around itMay need to be built around itSometimes provided as one package (vendor claim)Can be built to requirements
Integrating high speed and multiple inspectionsUnit count tends to growSuitableDepends on modelDepends on design
Speed of start-upFastMediumFast if done together with the printerSlow
Maintenance and supportMaker and distributorMaker and distributorCan be unified with printer maintenanceIn-house or SIer

What matters in every family, before method or product, is deciding for yourselves “where to get the expected value, how to eject NG, and what to record”. Once that is decided, any product can be compared through the RFP and acceptance tests.

Judgment results and records: what to keep, and for how many years

Print inspection records exist so that, when an incident occurs, you can show afterwards “whether that product passed inspection” and “what the expected value was at the time”. What should be kept can be organized into the following 5 items.

  • Images: All NG and unreadable images; OK images at fixed intervals or for every unit (depending on storage capacity)
  • Judgments: Time, line, product serial number, OK/NG/unreadable, confidence
  • Expected values: The production order number at the time, the expected-value string, the time the expected value was distributed
  • Operator actions: Job selection, threshold changes, temporary suspension of inspection, who was logged in
  • Reject confirmation: The number of units ejected and the number confirmed, records of line stops and approvals to restart

Decide the retention period from the product’s shelf life, contracts with customers and your internal rules for quality records. As a general point, a length that covers at least the period the product is on the market and the period in which complaints could arrive makes the records usable for incident investigation. Please confirm the specific number of years against customer requirements and your own rules.

For pharmaceutical plants, and plants that refer to pharmaceutical standards, the handling of electronic records becomes an issue. In the US, 21 CFR 11.10 requires persons who handle electronic records in closed systems to have, among other things, system validation, secure, computer-generated, time-stamped audit trails, and operational system checks to enforce permitted sequencing of steps and events. When the judgment records and setting change histories of a print inspection system are treated as electronic records, these aspects come into play. In the EU, a public consultation on the draft revision of GMP Annex 11 (Computerized Systems) and the draft new Annex 22 (Artificial Intelligence) ran from July 7 to October 7, 2025, and according to a PharmaNow article about 1,300 comments were received. As of August 12, 2026 Annex 22 had not been adopted or put into effect, and submission of the final draft to the European Commission is targeted in the work plan for Q4 2026 (not a confirmed date). Because we have not been able to confirm when it would apply in Thailand, here we only introduce it as “a draft being developed in the EU and PIC/S”.

For food, the realistic approach is to keep record items in a form you can explain in customer audits. Be able to answer from the records not only “the inspection system issued an NG” but also “the NG product was definitely removed, and which part of the lot, from where to where, was affected”.

Model calculation of costs and benefits (placeholder figures)

From here on is a model calculation for thinking about the cost-effectiveness of date code inspection AI. The counts, unit costs, amounts and detection rates below are all placeholder figures set for this article. They are not industry averages, survey results or manufacturers’ prices. Please replace them with your own figures.

Assumptions for the model plant

The model plant covers only 1 food packaging line (best-before date and lot printed by inkjet). It is not the whole plant. The currency is Thai baht (THB). Counts are annual expected values, so they can be fractional.

ItemValueCalculation
Coding incidents currently found at customers (retailers and wholesalers) and leading to recalls or returns2 per yearPlaceholder
Loss per customer escape (recall, returns, relabeling, logistics, customer handling; internal rework cost not included)600,000 THBPlaceholder
Coding incidents currently found internally (end-of-line sampling)20 per yearPlaceholder
Per internally found incident, difference in rework cost between finding it by sampling and finding it immediately on the line12,000 THBPlaceholder (15,000→3,000)
AI incident detection rate (middle case)80%Placeholder. Assumed to apply at the same rate to both customer escapes and internal finds
(1) Reduction in customer escapes1.6 incidents → 960,000 THB/year2×80%=1.6, 1.6×600,000
(2) Reduction in internal rework cost16 incidents → 192,000 THB/year20×80%=16, 16×12,000
Total annual benefit1,152,000 THB/year(1)+(2)
Initial cost (camera, lighting, judgment unit, reject confirmation, ERP/MES expected-value integration, PoC)1,500,000 THBPlaceholder
Annual operating cost (maintenance, licenses, adding products, retraining, operating labor)300,000 THB/yearPlaceholder
Annual net benefit852,000 THB/year1,152,000−300,000
Simple payback periodAbout 1.8 years1,500,000÷852,000=1.76

There is only one baseline: “current state = 2 customer escapes, 20 internal finds”. (1) covers incidents that were being found at customers and (2) covers incidents that were being found by internal sampling; they are separate populations of incidents. Because the same incident is not counted in both, adding (1) and (2) is not double counting. The 12,000 THB in (2) is the difference between the rework cost when found by sampling (15,000 THB) and the rework cost when found immediately on the line (3,000 THB); it is not the internal rework cost itself. Also, the loss per customer escape in (1) does not include internal rework cost.

The loss per customer escape varies greatly with the scale of the incident. Depending on how many days’ worth and how many cases were shipped, and which stores of which customers they reached, it can be many times 600,000 THB or a fraction of it. Please re-estimate it from your own records of past incidents.

How the payback period moves when the detection rate changes

The detection rate is not set as “a value AI can achieve”. It is a placeholder for seeing how much the benefit depends on this assumption. Only the detection rate is changed, and the other assumptions are held fixed.

Detection rate(1) Reduction in customer escapes(2) Reduction in internal rework costAnnual benefitAnnual net benefitSimple payback period
40%0.8 incidents×600,000=480,000 THB8 incidents×12,000=96,000 THB576,000 THB276,000 THBAbout 5.4 years
60%1.2 incidents×600,000=720,000 THB12 incidents×12,000=144,000 THB864,000 THB564,000 THBAbout 2.7 years
80%1.6 incidents×600,000=960,000 THB16 incidents×12,000=192,000 THB1,152,000 THB852,000 THBAbout 1.8 years
Date Code Inspection AI – OCR/OCV, RFP and FAT/SAT for Thai Plants - figure 3

Figure: Sensitivity of the model calculation (placeholder figures). At detection rates of 40%, 60% and 80%, the simple payback period is about 5.4 years, about 2.7 years and about 1.8 years respectively, and the annual net benefit is 276,000 THB, 564,000 THB and 852,000 THB.

When the detection rate falls from 80% to 40%, the annual benefit halves, but because the annual operating cost of 300,000 THB does not change, the annual net benefit shrinks from 852,000 THB to 276,000 THB, to less than 1/3, and the payback period lengthens from about 1.8 years to about 5.4 years. As long as operating costs are fixed, when the detection-rate assumption falls, the net benefit shrinks by an even larger proportion, and the investment decision changes significantly. That is exactly why the detection rate should not be set from catalog figures; measure it with your own products and prints through a PoC and “deliberate-error tests”, and replace the figures in the calculation.

What this calculation leaves out

The following items are not included in the calculation, because including them tends to lead to double counting or overestimation.

  • Cost of false rejects: Scrap, rework and stoppage costs from judging correct prints as NG and discarding them or stopping the line. If false rejects are frequent, the benefit here is eroded. Measure the false reject rate in acceptance testing and subtract its effect when making the decision.
  • Reducing sampling inspectors: Even if every unit is inspected, people are needed for start-up checks, re-checking NG items and checking jobs. Whether headcount can be reduced is judged after the operation has been decided.
  • Brand damage: Loss of customer trust and effects on trading terms are highly uncertain when converted into money and tend to overlap with the loss in (1), so they are not included.

Put the other way around, this calculation shows the range that can be judged from “the number of incidents and the loss per incident” alone. If your records of incidents are sparse, putting the three records listed in the section on where incidents occur in order first is the quickest way to explain cost-effectiveness.

What to put in an RFP for date code inspection AI

When comparing print inspection systems, writing “how it stops and how it records” into the RFP, rather than “what it can read”, makes proposals more consistent in quality. We recommend including at least the following 12 items.

No.ItemExamples of what to write
1Target lines and productsNumber of lines, number of products, packaging formats, material and shape of the print surface, annual number of product changeovers
2Print method and print itemsInkjet/laser/TTO, printer make and model, format and examples of production date, best-before date, lot, time and plant code
3Judgment methodOCV (expected-value verification) mandatory, output as the 3 values OK/NG/unreadable, handling of low-confidence items
4Handover of expected valuesReceived automatically from the ERP/MES production order, the same value distributed to printer and camera, prohibition of manual entry and exception procedures
5Line speed and processing timeMaximum line speed, allowable processing time per unit, pitch variation
6Imaging conditionsMinimum character height, print position variation, conditions such as reflection, curved, transparent and shrink-wrapped surfaces, lighting proposal
7Ejection and reject confirmationReject method, tracking, reject confirmation, reject bin management, stop on consecutive NGs, interlock on equipment failure
8Adding products and retrainingWho can add products and formats and in how many minutes, whether retraining is needed and the procedure, verification method before and after changes
9RecordsItems and retention period for images, judgments, expected values, operation history and reject confirmation, tamper prevention, output format
10Acceptance testingFAT/SAT test patterns, counts, pass criteria (miss, false reject and unreadable rates, and processing time), test record format
11Operator screens and trainingThai, English and Japanese screens, permission levels, training for operators and maintenance staff
12Maintenance and supportMaintenance base in Thailand, response time, spare parts, whether remote maintenance is possible and the connection method

When you receive proposals, always check “under what conditions” the accuracy and speed figures given by the vendor were measured. Figures such as “near 100%” or “so many units per minute” cannot be compared if the conditions are unknown. If the vendor will not provide the conditions, make measurement with your own samples a condition of the proposal.

What to check at FAT/SAT: designing deliberate-error tests

The most important thing in acceptance testing for print inspection is not running correct prints and confirming that “everything was OK”. It is running deliberately wrong prints and confirming that they are reliably stopped, reliably ejected, and that records remain.

Building test patterns

Make defect samples for testing to match the types that occur on the shop floor. Representative patterns are summarized in the figure.

Date Code Inspection AI – OCR/OCV, RFP and FAT/SAT for Thai Plants - figure 2

Figure: Conceptual diagram of the FAT/SAT test matrix. Rows are prints deliberately made for testing (wrong date, wrong lot or line code, no print, fading and broken characters, smearing and double printing, position shift and printing on the seal area, correct print [control]). Columns are the check items (expected result, judged correctly, removed from the line, reject confirmed, image and log saved).

  • Wrong date: A date 1 day off from the expected value, a date with month and day swapped, a date with the wrong year. Change only the printer job, keep the expected value correct, and run them.
  • Wrong lot or line code: The previous product’s lot, the neighboring line’s code, a lot that differs by only 1 character.
  • No print: Stop the ink, or make the printer skip printing.
  • Fading and broken characters: Grade them from partly unreadable to almost unreadable. Include ones that degrade into similar-looking characters (8 and 3, 0 and D, etc.).
  • Smearing and double printing: Prints overlapped by a double trigger, prints thickened by smearing.
  • Position shift and printing on the seal area: Prints at the edge of the field of view, or over the seal area or a seam.
  • Correct print (control): Good products for measuring false rejects. Run far more of these than defective ones.

The 5 items to check

For each pattern, check the 5 items in the columns of the figure.

  1. Expected result: Decide and write down before the test whether the pattern should be OK, NG or unreadable
  2. Judged correctly: Whether the actual judgment matched the expected result
  3. Removed from the line: Whether NG and unreadable products were ejected
  4. Reject confirmed: Whether the sensor confirmed that the ejected product entered the reject bin
  5. Image and log saved: Whether the image, judgment, expected value and time were recorded

Even if the judgment is correct, the product escapes if it is not removed. Even if it is removed, it cannot be used in incident investigation if there is no record. Only when all 5 columns are satisfied does it pass.

Counts and how to measure

Run the tests at full line speed. Tests that stop the line and show units one at a time do not reveal problems with triggering, tracking or ejection timing. Mix the defect samples randomly into the flow of good products and record where each was inserted. For each pattern, tally the miss rate (the share of test samples that should be NG but were judged OK), the false reject rate (the share of good products removed as NG or unreadable), the unreadable rate and the processing time per unit.

As for counts, keep in mind that “zero misses” over a small number of units does not prove that the miss rate is sufficiently low. Decide how many units to accumulate based on the severity of incidents and the time available for testing, and agree on it together with the pass criteria at the RFP stage.

Testing product changes and changeovers

If the main purpose of print inspection is to stop type (1) setting errors, include the changeover itself in the tests.

  • When the production order is switched, do the expected values of the printer and the camera change at the same time?
  • When production starts with only the printer still on the old job, does it go NG from the first unit and does the line stop after N consecutive NGs?
  • When the manual-entry exception procedure is used, are the approval and the record kept?
  • When production crosses midnight, do the expected values for the production date and the best-before date switch correctly?

Division of roles between FAT and SAT

StageLocationMain things to confirmPoints to note
FAT (Factory Acceptance Test)Vendor’s factoryJudgment logic, judgment results for each test pattern, record items, screensSend your actual packaging materials and printer and test under conditions close to production
SAT (Site Acceptance Test)Your own lineJudgment at line speed, tracking and ejection, reject confirmation, ERP/MES integration, changeovers, record storageMeasure again under local conditions such as lighting, vibration, humidity and temperature

Passing FAT does not guarantee the same result at SAT, because the plant’s lighting, conveyor vibration and the condition of the printer’s ink can only be reproduced on site. Set the SAT pass criteria separately from those for FAT.

Issues specific to Thailand and ASEAN

Label formats and language

According to the USDA GAIN report, under Thai Notification No.450, foods with less than 90 days until the best-before or use-by date show the date as “day/month/year”, and foods with longer than 90 days show it as “day/month/year” or “month/year”, together with the wording “Best before” or “Expired by”. The month may be in numerals or letters. Labeling in Thai is mandatory, and English may be added alongside. For certain foods, individual notifications may require the production date or expiry date to be shown.

For print inspection, this means that expiry dates in different formats can coexist within the same plant: products that write the month in numerals and products that write it in letters, Thai wording and English wording, products that show down to the day and products that show only to the month. Hold the expected-value format per product in the item master, and confirm at the RFP stage whether the inspection system needs to read prints that include Thai characters.

Also pay attention to calendar notation. The Buddhist Era (B.E.) is also used in Thailand, and Notification No.450 is itself expressed in the Buddhist calendar, as in “B.E.2567 (2024)”. Whether to print in the Buddhist or the Gregorian calendar should be decided from your own labeling specifications and the requirements of the destination market, and included in the expected-value format. Because the same date has a different year number in the Buddhist and Gregorian calendars, mixing them up in the logic that generates the expected value results in the same incident as a cleanly printed wrong date.

In addition, according to the USDA report, a draft amendment to Notification No.450 (No.2) was notified to the WTO on January 8, 2026. It includes adding 4 allergens, optional digital labeling, and showing the earliest expiry date on assorted products, among other things, but no adoption date has been set. Because labeling requirements may change with future amendments, a design that allows formats to be changed in the item master makes it easier to respond. What is written here is an introduction to public information and is not legal advice. Please confirm how it applies to your products with professionals or with information from the Thai FDA.

Labeling by export destination

For exports, the date format and wording change depending on the destination. If the “day/month/year” format for the Thai domestic market differs from the destination’s format, you will be switching between jobs with different formats on the same line. If you separate item codes by destination and design the system to generate expected values from the item master, OCV can also stop mix-ups of destination.

Heat, humidity and ink

KEYENCE cites lighting, dust and humidity as factors that hinder OCR reading. In hot and humid environments, you also need to assume, as inspection conditions, things such as condensation on the packaging surface of chilled or frozen products and smearing caused by slower ink drying. To be safe, run tests in both the dry and rainy seasons, run at least the SAT under actual temperature and humidity conditions, and re-check when the season changes. The selection of the print method itself, for example the issues when marking by laser, is covered in “Industrial Laser Marking Machine Selection for Thai Factories: RFP and FAT/SAT“.

Multilingual operator screens and training

In plants where operators and maintenance staff view the screens in Thai while managers view them in Japanese or English, language design affects operation. It is important that the reasons for NG, for unreadable results and for line stops can be understood on the Thai screen. If the display cannot be understood, the shop floor will want to suspend inspection temporarily and keep producing. Include the permission and recording of temporary suspension in the screen design as well.

Support structure

When a print inspection system stops, you are forced to decide whether to stop the line or run without inspection. Confirm whether there is a maintenance base in Thailand, the response time, spare parts stock and whether remote maintenance is possible. Also decide before implementation who will add settings when products are added. If you leave it to the vendor, there will be waiting time every time a new product is launched.

Frequently asked questions

What is the difference between OCR and OCV?

OCR is the function that reads and records the printed string, and OCV is the function that verifies whether the read string matches the expected value (the correct print content). An incident in which a date or lot was set wrongly at changeover and keeps being printed cleanly passes OCR as “read successfully”. It is OCV, with an expected value, that can stop this incident. If the purpose of lot code verification or expiry date verification is to stop incidents, think on the premise of OCV.

Can expiry date printing be inspected on every unit?

If line speed and imaging conditions fit, a configuration that inspects every unit is possible. Some throughput figures given by vendors are on the scale of tens of thousands of units per hour, but these are claims of upper limits. Decide after measuring misses and false rejects at full line speed with your own products, print surfaces, lighting and conveying conditions. Even when every unit is inspected, without reject confirmation and a stop on consecutive NGs, defects that should have been stopped may still flow through.

How should the cost of print inspection systems be compared?

Comparing only the price of the equipment itself leads to wrong decisions. Compare including not only the camera, lighting and judgment unit, but also the reject device and reject confirmation, expected-value integration with ERP/MES, PoC, acceptance testing, adding products and retraining, and maintenance costs. The model calculation in this article set placeholder initial and annual operating costs, but actual amounts vary greatly with line conditions and scope. Aligning the items in the RFP and obtaining quotes makes comparison easier.

What is the difference between a barcode verifier and a print inspection system?

A barcode verifier is a device that grades the print quality of 1D and 2D codes according to standards. For example, ISO/IEC 15416:2025 is the standard that defines how to measure the print quality of linear barcodes; it does not measure the quality of human-readable date or lot strings. A print inspection system judges whether date and lot strings are correct and readable. For packaging that carries both, also consider a design that checks whether the date inside the code matches the human-readable date.

Can date code inspection AI be introduced with our existing inkjet printers?

In many cases, a configuration that keeps the existing printers and adds a camera and judgment unit afterwards can be considered. Products from dedicated vision makers can generally be used regardless of printer make. However, to distribute the expected value to the printer and the camera at the same time, you need to check whether the printer supports job selection and receiving values from outside. If it does not, either supplement with a manual-entry exception procedure and a two-person check, or also consider replacing the printer.

Does deep learning OCR remove the need for font registration in manufacturing?

Vendors claim that deep learning OCR can skip font registration and character segmentation thanks to pre-trained models. However, settings for lighting, field of view, read area and the expected-value format remain. Also, whether degraded characters are wrongly judged to match the expected value needs to be confirmed with tests that run prints degraded into similar-looking shapes. As with introducing AI visual inspection, the design of acceptance testing decides success or failure.

Summary

If the introduction of date code inspection AI starts from comparing character recognition accuracy, the result tends to be a system that cannot stop incidents on the shop floor. First, take stock of coding errors using the three records of customer recalls and returns, internal sampling, and changeovers, and decide which types you want to stop. If you want to stop cleanly printed wrong dates, do not stop at reading (OCR) but go as far as verifying against the expected value (OCV); receive the expected value from the ERP/MES production order rather than manual entry, and distribute the same value to the printer and the camera. Distinguish OK, NG and unreadable, reliably remove NG and unreadable units, confirm the removal with reject confirmation, and stop the line when NGs occur consecutively. Setting the order this way makes it clear what to buy and what you should decide yourselves.

Cost-effectiveness moves significantly with the detection-rate assumption. In the model calculation (placeholder figures), simply lowering the detection rate from 80% to 40% lengthened the payback period from about 1.8 years to about 5.4 years. That is exactly why acceptance testing should deliberately create and run wrong dates, wrong lots, no print, fading, double printing and position shifts, and measure whether all 4 elements, namely judgment, ejection, reject confirmation and records, come together under mass-production conditions of line speed and changeovers. Now that full compliance with Notification No.450 has begun, it is also a good opportunity to review print jobs and the flow of expected values.

TOMAS TECH helps plants in Thailand build print inspection systems tailored to their lines and equipment. You can consult us even before the method or product has been decided, for example at the stage of taking stock of the print items and past incidents on the target line. Please contact us through this form.

References