Pharmaceutical and medical device manufacturing is defined by two pressures that pull in opposite directions: zero tolerance for an escaped defect, and a documentation burden that treats every inspection station as part of a validated, auditable process. A misread expiry date, an unreadable 2D code on a unit-level serial, or a hairline crack in a vial closure is not just scrap — it is a recall risk, a regulatory finding, and in many markets a reportable event. The vision system has to be right, and it has to be demonstrably right.
Most lines in this sector combine three distinct tasks that are often confused with one another: reading and verifying printed human-readable text (OCR/OCV), grading the print quality of 1D/2D codes to a published standard, and detecting physical or cosmetic defects on the product, container or closure. Each has different optical, lighting and software requirements, and getting the hardware split right is what separates a system that passes IQ/OQ/PQ cleanly from one that generates false rejects and operator overrides. This page frames those tasks, explains why the recommended hardware fits, and shows where deep-learning inspection earns its place alongside conventional rule-based tools.
What you are actually being asked to guarantee
In a GMP context the question is rarely "can the camera see the feature?" — it is "can you prove, repeatably and under audit, that every unit was inspected against a defined acceptance criterion?" Serialization mandates (US DSCSA, EU FMD and the broader GS1 framework) push a unique 2D Data Matrix and human-readable serial, GTIN, lot and expiry onto the smallest saleable unit, and aggregate that data up through bundle and case. Every one of those marks must be both correctly encoded and physically legible, often on curved, reflective or low-contrast substrates such as foil, glass ampoules, blister lidding or moulded device housings.
That requirement decomposes into three inspection jobs that should be specified separately. OCV (optical character verification) confirms that the printed lot and expiry match the expected string for that batch — a verification task, not a discovery task. OCR (optical character recognition) reads characters where the content is not known in advance. Code grading goes beyond a simple decode: it measures the print quality of a 1D or 2D symbol against ISO/IEC 15415, 15416 or the GS1 verification specification and returns a letter or numeric grade, which is what auditors and trading partners expect to see logged. Treating "the camera read the code" as equivalent to "the code passed grade" is one of the most common and costly mistakes on a pharma line.
- OCV: confirm printed lot/expiry/serial matches the expected, known string for the batch.
- OCR: read characters whose content is variable or not known in advance.
- Code grading: measure 1D/2D symbol print quality against ISO/IEC 15415/15416 / GS1 and log a formal grade.
- Defect inspection: detect physical, cosmetic and fill defects on container, closure and product.
- Traceability: every result tied to a unit, time-stamped and exportable for audit.
Code grade verification: why a reader is not a verifier
A standard industrial code reader is optimised to decode quickly and reliably under varied, real-world conditions — it tolerates poor print so the line keeps running. A code verifier does the opposite: it presents the symbol under a tightly controlled, standardised illumination geometry (typically 45-degree four-direction or 90-degree per the relevant ISO/IEC method) and a calibrated optical setup so the print-quality grade is reproducible and traceable to the standard. The same Data Matrix can decode perfectly on a reader and still fail an A-to-F grade because of axial non-uniformity, fixed pattern damage or low modulation. In pharma, the grade is the deliverable, so the verifier is the instrument you specify when print-quality conformance must be proven, not merely assumed.
Practically, this means most serialized lines carry both: an in-line code reader at speed to decode and route every unit for the serialization software, and a code verifier — used in-line or as a calibrated audit/sampling station — to confirm that the marking process is staying within grade. The verifier's controlled lighting and fixed geometry are exactly what makes its result defensible. When you scope the station, fix the read distance, the substrate presentation and the lighting first; verifier repeatability collapses if the part can move, tilt or reflect differently from read to read.
Datalogic/Datasensing and Omron/Sentech (STC) sit naturally in this part of the catalog for reading and verification duty, and the verifier category exists precisely so the grading function is treated as the metrology task it is rather than folded into a general-purpose reader.
Imaging and lighting for text, codes and surfaces
For OCR/OCV and most container or closure inspection, an area-scan camera is the right base: it captures a full 2D frame of a presented part, which suits discrete units indexed under the camera and lets you inspect text, code and a region of the surface in one acquisition. Size the resolution from the smallest feature you must resolve — the thinnest stroke of a printed character or the smallest defect, not the overall part — and aim for that feature to span several pixels so it survives noise and optical blur. On glass, foil and clear liquids, a global shutter is strongly preferred wherever the part moves or indexes, because rolling-shutter smear on a moving ampoule destroys exactly the fine edges OCV depends on. Monochrome sensors generally outperform colour for text and code work because they put every pixel toward spatial detail and contrast rather than splitting it across a colour filter array; reserve colour for cases where a defect or a label check is genuinely colour-dependent.
Lighting is usually the deciding factor in this sector, more than the sensor. Print on reflective foil or curved glass is a low-contrast, specular problem: diffuse dome or coaxial (on-axis) illumination flattens hot-spots and lifts dark-on-dark print, while a backlight is the cleanest way to gauge fill level, meniscus position or a closure silhouette. Dark-field grazing light brings out embossed or debossed text, micro-cracks in glass and scratches on moulded plastic that vanish under bright-field. The right answer is frequently a combination, switched or strobed per inspection, and it is worth fixing the lighting geometry experimentally on real samples before locking the camera and lens. DCM Sistemes lighting covers the dome, coaxial, backlight and dark-field geometries this work demands; Basler and iRAYPLE area-scan cameras provide the monochrome global-shutter sensors that pair with them.
- Area scan + global shutter for indexed parts; size resolution from the finest stroke or defect, not the whole part.
- Monochrome by default for text and codes; colour only when the decision is genuinely colour-based.
- Dome / coaxial light to tame reflective foil and dark-on-dark print.
- Backlight for fill level, meniscus and closure-silhouette gauging.
- Dark-field grazing light for embossing, glass micro-cracks and surface scratches.
Where rule-based tools end and deep learning begins
Conventional, rule-based vision is the correct and preferred tool for a large share of pharma inspection: a code either decodes and grades or it does not; a known expiry string either matches or it does not; a fill level either falls within a gauged tolerance band or it does not. These tasks are deterministic, explainable and easy to validate, which is exactly what a regulated environment rewards. Do not reach for AI where a measurement or a template match already gives a defensible, repeatable answer.
The picture changes when the defect or the text cannot be reduced to a fixed rule. Variable, low-contrast or hard-to-describe defects — subtle cracks in glass, particulate in solution, cosmetic flaws on a moulded device, inconsistent or distorted print across many SKUs, degraded codes on difficult substrates — are where rule-based thresholds either miss escapes or drown the line in false rejects. Deep-learning models learn the appearance of "good" and the range of "defective" from examples, and they generalise to the natural variation that defeats hand-tuned rules. This is precisely the territory where Rosepetal, the group's deep-learning visual-inspection software, is designed to operate, complementing rather than replacing the deterministic tools that already work.
Validation, traceability and putting it on the line
Whatever the algorithm, a pharma vision station has to behave like validated equipment. That means stable, reproducible imaging (fixed optics, controlled lighting, defined part presentation), versioned inspection recipes and models, audit-ready result logging tied to each unit, and a defined behaviour for rejects and for the AI's decision boundary so the system survives IQ/OQ/PQ and routine requalification. Deep-learning tools belong inside that framework, not outside it: model versions are controlled artefacts, the training and validation image sets are documented, and acceptance behaviour is demonstrable. Designing for this from the start is far cheaper than retrofitting traceability onto a station that was scoped only for throughput.
If your inspection has a genuine AI need — variable, low-contrast or hard-to-describe defects, or text and codes that defeat conventional OCR/OCV — the fastest way to de-risk it is to send representative sample images, including your hardest "borderline" and known-defect cases, to be evaluated with Rosepetal. That feasibility step tells you what the model can separate before any line hardware is committed. From there, AIS Vision, the group's machine-vision integrator, can specify and integrate the full system — cameras, verifiers, readers and lighting from this catalog, the inspection software, and the handling, rejection and data interfaces — into a validated, GMP-ready station.



























































































































