Instruments & Meters

Generative Retouching Can Corrupt Mandatory Text: A Case for Independent Reference Checks

A retailer's carton-image workflow shows why polished output is not proof that legally required text survived processing.

Chidi OkonkwoOctober 25, 20265 min read11 views

A conceptual studio scene shows a carton back panel, a separate reference copy and a magnifying inspection overlay on a neutral surface.

When an image is cleaned for an online product page, the visual result can improve while the information it carries becomes less reliable. A case described by Justin Flick shows how a generative image model produced a polished carton back panel but changed legally required text: the digits 2801 became 2001, a phone number gained wrong digits, and commas and full stops were swapped. The changes were plausible and hard to catch at a glance. For images that carry mandatory information, the measurand is the printed text, not the appearance of the image.

A polished output is not a verified output

The task was to turn phone photos of carton back panels into straight, clean images on a white background for online product pages. The panels carried manufacturer and importer names and addresses, warning texts and contact details such as phone numbers. The images could be made more attractive, but the information had to remain unchanged. The first attempt used a generative model with an explicit instruction to preserve every printed character, number and symbol. The output looked professional, with sharp print, even lighting and a clean background. Comparison with the source revealed substitutions that a quick visual check would likely miss. Because the affected text was mandatory information, the generated images were discarded and none was published. The lesson is not that generative models are always wrong; it is that they produce what text plausibly looks like, not necessarily what was printed. Visual inspection is a weak control against plausible errors, so it cannot serve as the reference.

Keeping every character tied to photographed pixels

The replacement was a deterministic processing chain. Each carton face was rectified with a perspective transform based on four corner points. Uneven lighting was reduced by estimating the background illumination and dividing it out, followed by white balancing to a target tone. Denoising was kept gentle and edge-preserving. Text blocks were marked as protected regions, so their pixels passed through background clean-up unchanged. The result was then placed on a white background with a soft shadow. Nothing on the carton was redrawn or re-typeset. Every character in the final panel image remained derived from the photographed pixels. This does not make the chain automatically correct, but it removes the generative step that can invent plausible text.

A separate reference and two measurement principles

For each image, the team kept a reference: the same crop after rectification and the illumination and white-balance step only, before denoising or clean-up. Each processed carton face was compared with that reference before it was placed on the background. Two different measurement principles were used. The first was an OCR diff. Both images were upscaled and read by an open-source OCR engine with German and English language data; the resulting word sequences were aligned and every deviation was listed. The second was an ink check that did not depend on reading text. Pixels clearly darker than the carton background in the reference counted as print. If such pixels became light in the processed image and most of a connected group disappeared, the group was flagged as a lost character. The combination matters because an OCR diff can describe text changes while missing non-text marks, and an ink check can detect lost print without understanding its meaning.

The checker has measurement uncertainty too

An OCR diff is itself a measurement system with its own error. On small print, the OCR misread the reference image as well, for example reading a 5 as an S. A raw OCR diff therefore reports disagreements that processing did not cause. Taken at face value, those disagreements produce false rejects; ignored wholesale, they hide real changes and produce false accepts. The analogy with a gauge study is useful: before attributing variation to the part, the variation of the measurement system has to be separated out. In this case, the OCR's misreads of the reference had to be separated from changes introduced by processing. The independent ink check and a separate review step did that work. This follows the principle attributed to Gleb Tsipursky: identify the source of the disagreement rather than assuming that the person or the model must be wrong. Each disagreement should be treated as a stop to be resolved, not as a similarity score to be averaged away.

Classical filters also need a gate

The gate showed that classical filters are not automatically safe. A speckle filter turned 130 into 30 and removed colons. A threshold clean-up step erased the dot in a web address. Both stages were dropped. The reason is structural: any step that decides what counts as noise can also decide that a full stop is noise. Testing classical filters as rigorously as AI tools is therefore part of the same control problem. The distinction is not generative versus classical in the abstract, but whether each step is checked against an independent reference and whether an unexplained disagreement blocks publication.

Second review, backups and the delivered file

A separate automated review, independent of the processing chain, checked the images in two rounds. In the first round, a composite image failed because one inserted line could not be verified reliably. The composite was removed and the genuine information block from the carton was used instead. Before any image was replaced, the previous state was backed up so it could be restored. After publication, the files as actually delivered were downloaded and compared with the team's own copies. At reduced resolution, the mean absolute greyscale difference was well under one grey level. The published file is the last link in the chain and deserves the same check as every earlier step.

What the case supports and what it does not

The case supports a narrow but important conclusion: when an image carries mandatory text, a polished appearance is not evidence of fidelity, and a generative model should not be trusted to preserve characters without an independent text comparison against the original. It also shows that deterministic processing is not self-validating. A reference image from the earliest reliable step, two measurement principles, error characterization for the checker, an independent second review, backups and a post-publication comparison form a coherent control chain. The case does not establish that generative models always corrupt text, nor that classical filters are always unsafe. It shows that any step capable of deciding what is noise, or what text should look like, needs a gate that can stop publication when the output and the reference disagree. Generative models remain useful for images where nothing has to be read. For images carrying mandatory information, the practical route described here is classical processing plus a text comparison against the original.

Practical implications for quality teams

  • Define the measurand: for mandatory text, the characters matter, not the appearance.
  • Keep a separate reference from the earliest reliable processing step, and never compare an output only with itself.
  • Use at least two measurement principles, such as an OCR text diff and a pixel-level ink check.
  • Characterize the OCR's own errors on the reference before trusting its verdicts.
  • Treat any disagreement as a stop, not a score.
  • Test classical filters as rigorously as AI tools.
  • Add an independent second review and remove what cannot be verified.
  • Back up before every change and pixel-compare the published files.
  • Improve the input with frontal, unwrapped, frame-filling photos in daylight.

The broader question is the one Tsipursky poses for machine and human disagreement: when the output and the reference disagree, do we know who was right, why, and what changed afterward? For processed images carrying mandatory information, that answer should come before publication.