Vision & Sensors


Advanced Imaging and Deep Learning Technologies Execute

Critical Packaging Inspection

While machine vision applications have been highly successful for decades using “analytical” vision tools, deep learning is able to successfully solve very complex classification and object detection problems with ease. By David L. Dechow and Navneet Nagi

Product packaging - in an extremely broad range of markets from food to pharma - frequently incorporates an extremely important sealing technology called “tamper evident” seals. The purpose of these mechanisms is to help ensure the safety, quality, and often the shelf life of the product. Driven by a tragic incident of malicious product contamination in the early 1980s, the FDA since has mandated tamper evident packaging for all pharmaceutical OTC products and manufacturers of most all consumable products in other markets follow that lead. Several standard sealing techniques are used, and in each case verification of the integrity of the seals during packaging is a step that is critical to the process.

For a wide range of applications in packaging with plastic bottles, the use of a foil seal under the cap is one of the standard, common “tamper-evident-packaging” (TEP) implementations. In this article, we will discuss the integration of advanced imaging techniques with deep learning analysis used to successfully inspect foil seal integrity with high reliability.


Introduction to induction cap seal TEP

“Induction cap seals” and “induction cap sealing” describe the component and process of the inclusion of a foil seal assembly that adheres to the top of a bottle under the cap. These seals are found in packages for millions of products worldwide with the most prominent being OTC pills and liquid drugs, consumer liquid products, and various food products. The seal protects the product yet is easy to remove, and clearly indicates possible tampering when seal is broken, detached, or missing.

In an automated packaging process, a cap with an attached liner is installed onto a container after filling. (The liner has multiple layers of various materials that help seal and protect the container contents, and specifically include an aluminum foil layer.) The cap is torqued onto the bottle with a suitable force to create pressure between the liner (seal) and the edge surface of the bottle opening. With the cap correctly in place, the top of the capped bottle is exposed to electromagnetic induction which heats the foil in the seal which in turn heats other layers of the seal including one that bonds the seal to the edge of the bottle. The heat from the foil also releases the seal from the underside of the cap. After heating and subsequent cooling, the sealing is complete, and the cap can be removed without damaging or affecting the seal.

Example Of An Overheated Seal.

Example Of An Overheated Seal

Rendering of the production thermal seal inspection system.

Rendering Of The Production Thermal Seal Inspection System

Several things in the capping process can impact the formation of a complete and robust seal. These include over- or under-heating, insufficient or uneven pressure, liquid or foreign material on the liner, and physical deformation of the seal including cuts, tears, and folded liners.

The value of automated inspection to ensure seal quality is perhaps very clear for this application. Confirming that the seal is secure and intact for each bottle is important to consumer safety and confidence. However, the implementation of in-line inspection presents several challenges, with the primary one being the completed seal is hidden under a plastic cap.

Imaging the invisible

The nature of this packaging process provides an opportunity to use advanced imaging techniques to overcome the unique challenge of “seeing” a feature that is completely obscured. Because the foil in the seal is induction heated to create the liner seal, and because the temperature of the foil is key to the final seal quality, thermal imaging of the heat profile of the foil can be used to evaluate the sealing process. For this application a high-precision thermal camera with internal cooling was used to acquire an image of the heat retained by the foil in the seal shortly after the induction heating process. This “heat profile” is completely visible to the thermal camera through the plastic cap.

Evaluation of the thermal profile of the foil seal for all defect conditions though introduces additional application challenges. While some defects are clearly defined in the thermal images with features that can be extracted by geometry or contrast variations, other defects are more subjective and difficult to quantify relative to the typical “good” seal thermal image. The successful inspection in this application is accomplished by using a combination of analytical vision tools with deep learning in a “hybrid” analysis of the imaging.

3D rendering of the thermal image of a good seal.

3 D Rendering Of The Thermal Image Of A Good Seal In Image 1

2D thermal image of a good seal.

2 D Thermal Image Of A Good Seal

3D rendering of the loose cap example thermal image.

3 D Rendering Of The Loose Cap Example Thermal Image In Image 3

Example of a bad seal loose cap 2D thermal image.

Example Of A Bad Seal Loose Cap 2 D Thermal Image

Deep learning enables subjective analysis

Deep learning is a subset of the field of machine learning, both of which fall under the very broad umbrella of the scientific discipline of “AI” (artificial intelligence). While machine vision applications have been highly successful for decades using “analytical” or “discrete” vision tools, deep learning has been proven to be able to successfully solve very complex classification and object detection problems with ease, particularly in cases where analytical algorithms can become prohibitively complex and large, and perhaps constrained in their accuracy when images contain highly subjective defects.

Narrow applications of deep learning in machine vision have become more mainstream as the accuracy of the results continues to improve with the help of better and larger data sets and better definition of the problems. Combining the strength of deep learning in this narrow sense for subjective decisions with analytical vision tools for clearly defined features results in a highly reliable hybrid approach to the analysis of the thermal foil image in this application.

A defect of particular importance is a bad seal resulting from a loose cap at the time of induction heating. The images of the thermal profile of the heated seal with a loose cap demonstrate wide variations, depending on the degree of cap looseness relative to the angular deviation from the expected position of a fully torqued cap. Traditional analytical vision tools do not achieve the required detection rate. However, this defect case can be defined as an independent, narrow failure mode and solved efficiently using deep learning rather than implementing a large deep learning solution covering all defect conditions. In this project, this hybrid approach resulted in an increase in detection accuracy for all failure modes overall, a faster delivery of a final solution, better scalability of the system, and improved inspection cycle times.

3D rendering of the overheated seal example thermal image.

3 D Rendering Of The Overheated Seal Example Thermal Image In Image 5

Example of a bad seal overheated seal 2D thermal image.

Example Of A Bad Seal Overheated Seal 2 D Thermal Image

3D rendering of the underheated seal example thermal image.

3 D Rendering Of The Underheated Seal Example Thermal Image

Example of a seal containing an underheated section described by the magenta arc graphic 2D thermal image.

Example Of A Seal Containing An Underheated Section Described By The Magenta Arc Graphic 2 D Thermal Image

Implementation techniques

The development and implementation phases of any inspection solution start with an image dataset. Often the initial imaging can be performed off-line during initial design and build. With a thermal imaging system this can be difficult or impossible as the heat profile to be analyzed is unique to the on-line process. As such, the thermal images of the sealed product must be obtained after installation of the system on a manufacturing line.

In execution of this application, discrete vision tools can be tuned and deployed for well defined features using a relatively small sample set of images. After initial installation, the system can be run in an image collection mode to create a suitable database for a deep learning classification dataset. For this application loose cap examples are manually created for the sample dataset, with visual human confirmation of the classification of the defect.

A success story

This application demonstrates the successful development and production deployment of a hybrid inspection system using both analytical and deep learning tools with advanced thermal imaging. The strengths of all parts of the system are successfully leveraged to achieve high detection accuracy for both the clearly and weakly defined defect features.

In one implementation, such a system was successfully deployed in multiple locations for varying products. The systems proved to be highly capable in the capture of important seal defects with high accuracy while maintaining a very small false failure rate. One key area of process improvement realized was the ability to identify variation in the cap torque based on seal integrity and completeness. With this ongoing process data, the cap torque was adjusted to produce tighter seals and reduce product rejects. The system also revealed a production condition where liquid on the cap and bottle that could cause problems in other subsequent processes like labelling were captured by the thermal imaging and led to process improvements that improved overall quality. Furthermore, the system was successful in capturing some rare defects like cracked caps which otherwise had gone undetected.


This application utilizes an elegant combination of advanced imaging techniques and analysis tools to provide significant value to an important production process. Keys to the solution involve the use of well proven industrial thermal imaging, and a unique hybrid utilization of both deep learning and discrete vision tools. The result is a very scalable solution that can impact a variety of industrial use cases.

All Images Source: Integro Technologies Corp.

David L. Dechow is VP of outreach and vision technology with Landing AI. He is an experienced engineer, programmer, and entrepreneur specializing in the integration of machine vision, robotics, and other automation technologies, with an extensive career in the industry. He was the founder, owner, and principal engineer for two successful vision systems integration firms. Prior to joining Landing AI he was principal vision systems architect with Integro Technologies, responsible for application evaluation and design of complex automated imaging solutions for inspection, metrology, and robotic guidance.  Previously, he had served as staff engineer for intelligent robotics/machine vision at FANUC America Corp. Dechow is a recipient of the A3 Automated Imaging Achievement Award as well as a member of the Association for Advancing Automation (A3) Imaging Technology Strategy Board.

Navneet Nagi is a senior computer vision (CV) engineer working at Integro Technologies Corp., a large machine vision integrator. He has developed, scaled and helped deploy numerous automated inspection systems in production across industries ranging from agriculture to aerospace. He has extensive experience in developing algorithms for automated industrial inspection applications using both traditional CV techniques and deep learning. He is passionate about applying advanced deep learning techniques to solve the toughest industrial inspection challenges and scaling up those solutions. Nagi holds a Master’s degree in Mechanical Engineering from Virginia Polytechnic Institute and State University, specializing in Computer Vision and Advanced Control Theory, and a Bachelor's degree in Aerospace Engineering from Florida Institute of Technology.

March 2022  |  Volume 61  |  Number 3

Line, Trademark, Brand, Logo, Text, Font