Retailer drops generative image edits after carton text changes

A German online retailer abandoned generative image edits after they altered digits and punctuation on carton labels, then built a deterministic workflow with independent text checks.

Justin Flick, who writes for SOMUVA UG (haftungsbeschränkt), a Lüdenscheid, Germany-based company that runs the German-language online shop vapechamp.de, has described how an attempt to clean up product images with a generative model altered legally required text on carton back panels. The case, published as an account of the company’s workflow, led the retailer to replace generative editing with a deterministic image pipeline and independent checks against a stored reference.

The task was to turn phone photos of carton back panels into straightened images on a white background for online product pages. The panels carry manufacturer and importer names and addresses, warning texts and contact details such as phone numbers. The images could be improved, Flick wrote, but the printed information had to remain unchanged. In measurement terms, he said, the measurand was the printed text, not the appearance of the image.

A plausible but wrong result

The first attempt used a generative image model. Flick’s team supplied a straightened image of the carton and an explicit instruction to keep every printed character, number and symbol identical. The output looked professional, with sharp print, even light and a clean background. A comparison with the source showed otherwise: the digits “2801” had become “2001”, a phone number contained wrong digits, and a comma had turned into a full stop while elsewhere a full stop had become a comma.

Because the changes were plausible, they were not easy to spot at a glance. For mandatory information, Flick said, that is not a cosmetic issue. The generated images were discarded and none was published. His conclusion was that a generative model produces what text plausibly looks like, not what was printed, and that visual inspection is a weak check against plausible errors and therefore cannot serve as the reference.

Deterministic processing and a stored reference

The replacement was a deterministic chain. The carton face is rectified with a perspective transform from four corner points. Uneven lighting is flattened by estimating the background illumination and dividing it out, followed by white balancing to a target tone. Denoising is gentle and edge-preserving. Text blocks are marked as protected regions in which pixels pass through the background clean-up unchanged. The result is then placed on a white background with a soft shadow. Nothing on the carton is redrawn or re-typeset; every character in the final image is derived from the photographed pixels, Flick wrote.

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 being placed on the background, using two measurement principles. The first was an OCR diff, in which both images are read by an open-source OCR engine with German and English language data after upscaling and the resulting word sequences are aligned, with every deviation listed. The second was an ink check that does not depend on reading text: pixels clearly darker than the carton background in the reference count as print, and if such pixels become light in the processed image and most of a connected group disappears, the group is flagged as a lost character.

Classical filters also failed the gate

Before publication, 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. Flick’s formulation was that any step which decides what counts as noise can decide that a full stop is noise.

OCR also has its own measurement uncertainty. On small print, it misread the reference image as well, for example reading a “5” as an “S”. A raw OCR diff therefore reports disagreements that the processing did not cause. Taken at face value, those lead to false rejects; ignored wholesale, they hide real changes and produce false accepts. Flick compared this with a gauge study, in which variation of the measurement system is separated before variation is attributed to the part. The ink check and a separate review step did that work, he wrote, matching a principle he drew from a related quality-management argument: treat each disagreement as a stop to be resolved, not as a similarity score to be averaged away.

Second review and publication

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 team removed the composite and used the genuine information block from the carton instead. Before any image was replaced, the previous state was backed up so it could be restored. After publication, the team downloaded the files as delivered and compared them with its own; at reduced resolution, the mean absolute greyscale difference was well under one grey level.

Flick listed practical steps for quality teams: define the measurand; keep a separate reference image from the earliest reliable processing step; use two measurement principles; characterise the OCR’s own errors on the reference before trusting its verdicts; treat disagreement as a stop rather than a score; test classical filters as rigorously as AI tools; add an independent second review; back up before every change and pixel-compare published files; and improve input with frontal, unwrapped, frame-filling photos in daylight. Generative models remain useful, he wrote, where nothing has to be read; for images carrying mandatory information, the company now uses classical processing plus a text comparison against the original.

MK

Mira Kovalenko

Mira is a renewable procurement and lifecycle editor covering solar PV modules, inverters, battery energy storage systems, charge controllers, mounting and balance of system, EV charging infrastructure and wind systems. Her comparisons apply levelized cost of energy with stated assumptions, usable energy in kWh, cycle life at defined depth of discharge and documented warranty allocation to the exact model. She supports EPC project directors, distributor product managers and procurement directors comparing cross-family specifications, verifying model-specific documentation and deciding where lifecycle cost and warranty responsibility need closer review.