Case Study
AI-Assisted Quality Inspection
Combining thermal imaging, deep-learning-based vision and machine-control integration to detect a difficult packaging-quality defect under high-speed production conditions.
The project progressed from imaging-method selection and defect classification to large-scale dataset creation, inline inference, PLC integration and real-production validation.
Context
A high-speed packaging process was experiencing a recurring quality problem in which a small percentage of packages could leave the process without being properly sealed.
Because the packaging material was transparent, open-package defects were difficult to distinguish in visible-spectrum images. Rule-based vision also showed limited robustness across defect types with different visual characteristics. The project therefore focused on thermal imaging combined with deep-learning-based classification for inline inspection.
The engineering objective was to develop an inspection system that could operate at production speed, identify sealing-related defect patterns, communicate the result to the machine control system and support a practical response without unnecessarily disrupting normal production.
Engineering Challenge
The main challenge was not simply training an AI model, but making the complete inspection system work reliably under real high-speed production conditions.
Key engineering challenges included:
- capturing usable thermal images at production speed,
- defining camera positioning and image-acquisition timing,
- creating and labeling a sufficiently large production dataset,
- distinguishing true sealing defects from normal thermal variation,
- developing a deep-learning model fast enough for inline use,
- coordinating image capture with product movement,
- integrating inspection results with PLC/machine control,
- handling timing between image acquisition, inference and machine response,
- minimizing false detections that could create unnecessary production losses,
- validating the system using real production rather than laboratory-only data.
The project therefore required machine vision, deep learning, automation, timing and production-process knowledge to be engineered as one integrated system.
My Role
My role covered the complete engineering chain from concept development to production integration and validation.
Responsibilities included:
- defining the inspection concept and system architecture,
- evaluating thermal imaging as the sensing method,
- selecting and integrating the camera system,
- defining image-acquisition and PLC synchronization logic,
- creating the image-acquisition and data-management workflow,
- defining defect types and establishing the defect-classification approach,
- creating and labeling the real-production dataset,
- developing and validating the deep-learning-based defect-detection approach,
- integrating inference results with the PLC/machine control system,
- managing timing between product movement, image capture and inspection result,
- testing the system under real production conditions,
- analyzing false detections and missed defects,
- improving the inspection logic based on production feedback,
- validating the practical impact of the solution on the quality problem.
Engineering Approach
The engineering approach focused on developing the inspection solution as a complete production system rather than as an isolated AI model.
-
Define the inspection problem
Understand the sealing-related quality problem and determine which defect conditions had to be detected during production.
-
Evaluate the imaging and detection method
Because the packaging material was transparent, open-package defects were difficult to distinguish in visible-spectrum images. Rule-based vision also showed limited robustness across defect types with different visual characteristics. Thermal imaging combined with deep-learning-based classification was therefore selected.
-
Define image acquisition and synchronization
Define camera positioning, image timing and synchronization with product movement so that each package could be captured consistently under production conditions.
-
Define defect classes
Identify recurring defect types and organize them into a classification structure before dataset labeling.
-
Build and label the production dataset
Collect real production images and label them according to the defined defect classes.
-
Develop and validate the deep-learning approach
Develop the model to distinguish acceptable packages from different defect conditions while maintaining inference speed suitable for inline use.
-
Integrate the inspection result with machine control
Transfer inference results to the PLC/machine control system so that the inspection decision becomes part of the production process.
-
Validate under real production conditions
Test the complete system during production, including image quality, inference timing, false detections, missed defects and machine interaction.
-
Improve through production feedback
Refine inspection logic, classification and system behavior based on real-production results.
The objective was not simply to achieve high model accuracy, but to create a reliable inline inspection system capable of making useful decisions within the timing constraints of a high-speed production process.
System Architecture
Product & Process Layer
High-speed packaged products moving through the production process
Thermal Imaging Layer
Thermal cameras capturing temperature patterns associated with package and sealing conditions
Image Acquisition & Synchronization Layer
Product detection, trigger logic, acquisition timing and synchronization with product movement
Dataset & Classification Layer
Defined defect types, labeled real-production images and structured training/validation datasets
Deep Learning Inference Layer
Image preprocessing, defect classification/detection and inline inference
Decision Layer
Conversion of model output into a usable inspection decision
PLC / Machine Integration Layer
Transfer of inspection results to the machine control system and coordination with production logic
Production Response Layer
Machine or operator response according to the inspection result and production requirements
Validation & Improvement Layer
False-positive analysis, missed-defect analysis, production validation and iterative model/system improvement
Key Technologies & Methods
The project combined thermal imaging, deep-learning-based vision and machine-control integration within a high-speed production environment.
The engineering value of the technology stack came from combining sensing, data, AI and machine control as one production system rather than treating the vision model as a standalone component.
Outcome / Engineering Value
The project demonstrated that a defect which was difficult to distinguish using visible-spectrum imaging and insufficiently robust with rule-based vision could be detected reliably enough for practical high-speed production use by combining thermal imaging with deep-learning-based classification.
The developed system was deployed on two packaging machines using four thermal cameras and was validated under real production conditions.
The solution achieved:
- inspection timing compatible with the production cycle,
- detection of a low-frequency but recurring packaging defect,
- integration of inspection results with machine control,
- stable operation under real production variability,
- practical reduction of the targeted quality issue during the validation period.
During production validation, the system processed approximately 400,000 labeled images, with inference performance around 150 ms per package, against an available production window of approximately 400 ms.
The targeted defect had previously occurred at roughly 1% of production. During the validation period, customer complaints related to this defect were reduced to zero.
The main engineering value was not simply achieving a working AI model. The project showed that a difficult-to-detect quality problem could be converted into an inline, machine-integrated inspection process capable of operating within real production constraints.
Thermal Signal → Classified Defect → Production Decision → Machine Response → Quality Improvement
What This Demonstrates
- Selection of an imaging method based on the physical characteristics of the defect
- Ability to move from rule-based vision to deep learning when defect variability requires it
- Definition of defect classes before dataset creation
- Creation and labeling of large real-production datasets
- Deep-learning development for practical industrial inspection
- Inline inference under strict production timing constraints
- Integration of vision results with PLC / machine control
- Validation using real production rather than laboratory-only conditions
- Ability to analyze false positives and missed defects systematically
- Translation of AI-based inspection into measurable quality improvement
- Ability to combine automation, machine vision and AI within one production system