Automatic Visual Packaging Control with Artificial Intelligence (AI)

May 11, 2021

Product packaging has a wide variety of characteristics. Different shapes, colors and materials can thus be the cause of different defect patterns. We at Data Spree show how artificial intelligence (Vision AI) can be used to quickly and effectively identify and eliminate complex packaging quality problems in production in real time.

Detecting defects at an early stage in ongoing production and logistics and eliminating these at short notice is often a very demanding task in the packaging sector. Reliable automation of visual inspection is a crucial factor for ensuring consistently high quality.

Challenges of visual inspection

Classic image processing systems and traditional algorithms for the visual inspection of packaging defects are often very inflexible and costly to implement. In this case, defect detection must be developed manually by experts, which requires a lot of know-how and time. At the same time, the multitude of possible defect patterns (tears, missing pieces, dents, scratches, geometric deviations, missing contents, printing errors) can only be implemented with a lot of effort or not at all. All this leads to high costs and to the fact that quality requirements for automation often cannot be met.

Solve complex quality problems efficiently with Vision AI

Artificial Intelligence (AI) can be used to reliably detect a wide range of individual error patterns and anomalies. With Data Spree's Deep Learning DS software, Vision AI software logic can be implemented efficiently and easily in the background. Continuous monitoring of production data, automatic classification of defects and time series analyses are also implemented in a user-friendly manner with Deep Learning DS in production operations.

Figure 1 Deep Learning DS - Data Management and Statistical Analysis of Blister Packaging Surfaces for Automatic Visual Quality Control

To implement AI-based defect detection, images of the packaging are first taken from the production process. Now, certain defects to be detected can be tagged to train the AI. This tagging of the data is called annotation. However, if one wants to detect general defects and deviations, the AI, without defect tagging, can also identify deviations from the norm via anomaly detection after training.  

In this process, the AI iteratively trains the detection and localization of deviations or anomalies from the good state or also special error patterns that one would like to identify as a user. Here, the AI functions similarly to the human brain and learns to recognize, assign and localize defects based on the image data - without the need to manually pre-define specific packaging features. With Deep Learning DS, you can quickly and easily perform this learning process yourself. Data Spree also offers the complete process up to productive integration into the system as a service.  

This method thus allows the most diverse and complex quality assurance tasks to be implemented quickly and easily - and without a single line of programming code.  

Figure 2 Visual quality assurance of blister packs, on the left the detection of minimal damage in the surface, on the right the exact localization of the defects in a heat map display

Automation processes can thus be implemented efficiently and robustly. A ready-to-use prototype can be created in just a few hours and expanded into a productive solution within a very short time. The fast AI models of Data Spree additionally ensure real-time capability in high-frequency production and logistics operations. Another benefit is the flexibility of the learning system. If packaging, packaging properties or products change due to production or logistics changes, the AI can simply be "fed" with new images and retrained. This allows for a quick and effective response to changes in production or logistics without having to start from scratch or purchase and implement a new solution.  

Via Deep Learning DS, the data from ongoing production operations and the detected errors can be stored, managed and statistically evaluated in the long term. In this way, the highest quality requirements can be continuously realized in the combination of data management and AI training.

Quick and easy implementation

The trained AI model can be individually integrated into any customer application through the open ONNX standard format. Data Spree's own execution environment Inference DS also offers a simple graphical user interface in which the AI model can be quickly executed on the respective hardware, such as a smart camera or industrial PC, using a drag-and-drop principle. This saves integration time - and above all costs.  

For more information or a solution to your own challenges, feel free to email or visit our quality assurance website at

Let's talk about your project.
Adopt one of our ready-to-use solutions, start creating your deep-learning-based system, or tell us your requirements to let us build an individual application for you.