A leading medical device manufacturer operating a high-volume inline production line had long relied on automated vision inspection to ensure product quality and regulatory compliance. The inspection process was fully integrated into production and subject to formal medical device validation (IQ/OQ/PQ) requirements. The legacy machine vision system focused primarily on verifying product features and dimensions. While effective at its original purpose, the system was not designed to reliably detect foreign matter contamination, which had become an increasingly critical quality concern as materials, tooling, and upstream processes evolved. The system would occasionally catch foreign matter defects. But detection was inconsistent and insufficiently robust to meet long-term quality and risk objectives.
The Challenge#
To address foreign matter detection, the manufacturer introduced a convolutional neural network (CNN)–based inspection model. Initially, the deep learning approach delivered strong results, significantly improving detection capability compared to the legacy system. However, as the system matured in production, a new challenge emerged. During sustained manufacturing, unforeseen visual artifacts began appearing in production imagery — driven by product design features, benign process variations, and environmental factors. While these artifacts were not defects, they appeared visually similar to foreign matter from the neural network’s perspective. The consequences quickly became apparent: False rejects increased, and yield losses began offsetting the gains from improved detection. Simply retraining the CNN was not a viable solution due to validation constraints in the regulated manufacturing environment.
The Solution: Complementary Inspection Approaches#
Rather than forcing a single inspection paradigm to solve all problems, EZ Automation developed a dual-approach hybrid architecture. This strategy allowed each method to address a specific class of risk while preserving system stability.
Approach 1#
Develop an artifact ensemble network to stabilize foreign matter detection without retraining#
EZ Automation designed an artifact ensemble network to address a fundamental limitation of deep learning: Neural networks can only reliably classify what they have seen before. Instead of retraining the validated CNN every time a new benign artifact appeared, EZ Automation introduced a secondary correction layer that operated alongside the existing model. The framework combined three components:
- The original validated CNN for foreign matter detection
- A lightweight artifact classifier trained on feature maps from the CNN rather than raw images
- An ensemble decision layer that adjusted final inspection decisions only when specific artifact patterns were detected
This architecture delivered a critical safeguard: The ensemble logic operated only after the CNN classified an image as a reject, ensuring that corrections could only recover falsely rejected product — never introduce false accepts. Deployed inline and operating continuously for more than five years, the artifact ensemble approach has delivered significant recovery of false rejects, improved yield without compromising defect detection sensitivity, enabled a rapid response to new artifact classes without CNN retraining, and provided long-term operational stability within a validated environment.
Approach 2#
Implement a hybrid metrology inspection algorithm for deterministic measurements with machine learning flexibility#
For inspection tasks that require traceable, deterministic measurements rather than probabilistic classification, EZ Automation implemented a hybrid metrology algorithm that combines classical computer vision with machine learning. The inspection process begins with classical vision techniques — morphological filtering, blob analysis, and bounding box extraction — to establish a stable region of interest that serves as the geometric reference for all downstream analysis. This deterministic foundation ensures consistent detection even under conditions of variable lighting, background clutter, or minor process noise. Once the reference region is established, the system isolates relevant inspection areas, quantifies feature size and geometry, and converts pixel measurements into real-world units for metrological decisions. Machine learning models are then applied selectively, where adaptability adds value without undermining measurement traceability. This hybrid approach delivers high precision and repeatability, clear traceability suitable for validation and audits, and flexibility to accommodate process variation without destabilizing measurements.
Benefits #
By deploying both approaches within a unified inline inspection architecture, the manufacturer achieved:
- Robust foreign matter detection without excessive false rejects
- Improved yield and reduced waste
- Preservation of validated models and inspection logic
- Long-term production stability across product and process changes
- A scalable inspection framework adaptable to future requirements
Most importantly, the system has remained fully production-deployed for more than five years, demonstrating that hybrid inspection strategies are not experimental concepts but proven manufacturing solutions. The work underscores an important lesson for medical device manufacturing: No single inspection method can solve every problem. Stability comes from layering intelligence, not replacing it. By combining deep learning, ensemble correction, and deterministic metrology, manufacturers can achieve both agility and compliance — without sacrificing yield or confidence.

