HOW DEEP LEARNING AUTOMATES INSPECTIONS FOR PACKAGING SOLUTIONS

Increasingly, packaging products require their own custom inspection systems to perfect quality, eliminate false rejects, improve throughput, and eliminate the risk of a recall. Some of the foundational machine vision applications along a packaging line include verifying that a label on a package is present, correct, straight, and readable. Other simple packaging inspections involve presence, position, quality (no flags, tears, or bubbles), and readability (barcode and date/lot codes present and scannable) on a label.

But packaging like bottles, cans, cases, and boxes—present in many industries, including food and beverage, consumer products, and logistics—can’t always be accurately inspected by traditional machine vision. For applications which present variable, unpredictable defects on confusing surfaces such as those that are highly patterned or suffer from specular glare, manufacturers have typically relied on the flexibility and judgment-based decision-making of human inspectors. Yet human inspectors have some very large tradeoffs for the modern consumer packaged goods industry: they aren’t necessarily scalable.

For applications which resist automation yet demand high quality and throughput, deep learning technology is an effective new tool at the disposal of application engineers in the packaging industry. Deep learning technology can handle all different types of packaging surfaces, including paper, glass, plastics, and ceramics, as well as their labels. Be it a specific defect on a printed label or the cutting zone for a piece of packaging, Cognex Deep Learning can identify all of these regions of interest simply by learning the varying appearance of the targeted zone. Using an array of tools, Cognex Deep Learning can then locate and count complex objects or features, detect anomalies, and classify said objects or even entire scenes. And last but not least, it can recognize and verify alphanumeric characters using a pre-trained font library.

Here, we’ll explore how Cognex Deep Learning does all of the above for packagers and manufacturers.

Packaging Defect Detection

Machine vision is invaluable to packaging inspections on bottles and cans. In fact, in most factories, it is machine vision which not only inspects the placement of labels and wrapping but also places and aligns them during manufacturing.

deep learning defect detection for packaging

Labeling defects are well-handled by traditional machine vision, which can capably detect wrinkles, rips, tears, warpage, bubbles, and printing errors. High-contrast imaging and surface extraction technology can capture defects, even when they occur on curved surfaces and under poor lighting conditions. Yet the metal surface of a typical aluminum can might confuse traditional machine vision with its glare as well as the unpredictable, variable nature of its defects, not all of which need to be rejected. Add to those challenging surface inspections countless forms and types of defects—for example, long scratches and shallow dents—and it quickly becomes untenable to explicitly search for all types of potential defects.

Using a novel deep learning-based approach, it’s possible to precisely and repetitively inspect all sorts of challenging metal packaging surfaces. With Cognex Deep Learning, rather than explicitly program an inspection, the deep learning algorithm trains itself on a set of known “good” samples to create its reference models. Once this training phase is complete, the inspection is ready to start. Cognex Deep Learning can identify and report all defective areas on the can’s surface which deviate outside the range of a normal acceptable appearance.

Packaging Optical Character Recognition

Hiding somewhere on almost all consumable packages, regardless of material or type, lies a date/lot code. Having these codes printed cleanly and readabe is important not only for end-users and consumers doing their shopping but also for manufacturers during the verification stage. A misprinted, smeared, or deformed date/lot code printed onto a label on a bottle or package of cookies, for example, causes problems for both.

deep learning OCR for packaging

Typically, traditional machine vision could easily recognize and/or verify that codes are readable and correct before they leave the facility, but certain challenging surfaces make this too difficult. In these cases, a smeared or slanted code printed on specular material like a metal soda case could be read with some effort by a human inspector but not with much reliability by a machine vision inspection system. In these cases, packagers need an inspection system that can judge readability by human standards but, critically, with the speed and robustness of a computerized system. Enter, deep learning.

Cognex’s deep learning OCR tool is able to detect and read the plain text in date/lot codes, verifying that their chains of numbers and letters are correct even when they are badly deformed, skewed, or—in the case of metal surfaces—poorly etched. The tool minimizes training because it leverages a pre-trained font library. This means that Cognex Deep Learning can read most alphanumeric text out-of-the-box, without programming. Training is limited to specific application requirements to recognize surface details or retrain on missed characters. All of these advantages help ease and speed implementation and contribute to successful OCR and OCV application results without the involvement of a vision expert.

Packaging Assembly Verification

Visually dependent assembly verification can be challenging for multi-pack goods which may have purposeful variation, as in the case of holiday-themed or seasonal offerings. These packs showcase different items and configurations in the same case or box.

deep learning assembly verification for packaging

For these sorts of inspections, manufacturers need highly flexible inspection systems which can locate and verify that individual items are present and correct, arranged in the proper configuration, and match their external packaging. To do this, the inspection system needs to be able to locate and segment several regions of interest within a single image, possibly in multiple configurations that can be inspected line-by-line to account for variations in packaging.

To locate individual items by their unique and varying identifiable characteristics, a deep learning-based system is ideal because it generalize each item’s distinguishable characteristics based on size, shape, color, and surface features. The Cognex Deep Learning software can be trained quickly to build an entire database of items. Then, the inspection can proceed by region, whether by quadrant or line-by-line, to verify that the package has been assembled correctly.

Packaging Classification

Kitting inspections require multiple capabilities of its automated inspection system. Consumer product multi-packs need to be inspected for the right number and type of inclusions before being shipped. Counting and identification are well-loved strengths of traditional machine vision. But to ensure that the right items are included in a multi-part unit requires classifying included products by category—for example, does a sunblock multi-pack contain two types of sunblock, or does it contain an extra sunblock lip balm?

deep learning classification for packaging

This categorization is important yet remains out of reach for traditional machine vision. Luckily, Cognex’s deep learning classification tool can easily be combined with traditional location and counting machine vision tools, or with deep learning-based location and counting tools if the kitting inspection deals with variable product types and requires artificial intelligence to distinguish the generalizing features of these types.

Deep learning-based classification works by separating different classes based on a collection of labelled images and identifies products based on these packaging discrepancies. If any of the classes are trained as containing anomalies, then the system can learn to classify them as acceptable or unacceptable.

New deep learning-enabled vision systems differ from traditional machine vision because they are essentially self-learning and trained on labeled sample images without explicit programming. Deep learning-based software uses human-like intelligence which is able to appreciate nuances like deviation and variation and outperform even the best quality inspectors at making reliably correct judgments. Most importantly, however, is that it is able to solve more complex, previously un-programmable automation challenges.

Manufacturers in the packaging industry are increasingly demanding faster, more powerful machine vision systems, and for good reason: they are expected to make a great number of products at a higher quality threshold and for less cost. Cognex is meeting customers’ rigorous requirements head-on by offering automated inspection systems that marry the power of machine vision with deep learning in order to manufacture packaging more cost effectively and robustly.

Automation Update