Can Visual Inspection Technology: From Traditional Image Processing to Deep Learning – Revolutionizing Industrial Quality Control

2026/01/16 16:33



With thousands of cans flowing through the production line every minute, how do we ensure each one is perfectly flawless? Visual inspection technology is quietly improving the quality assurance of the beverages we consume.


In the modern food and beverage industry, cans are a common packaging container, and their quality directly affects product sealing and safety. Traditional manual quality inspection is inefficient and prone to missed defects, leading to the emergence of machine vision inspection technology.


Early systems were primarily based on traditional image processing algorithms, analyzing images of key areas such as the can opening, bottom, and inner wall to identify defects. With technological advancements, especially the development of deep learning, the accuracy and efficiency of can visual inspection have significantly improved.


1. Common Can Defects and Detection Challenges


Cans can have a variety of defects during the production process, mainly including notches, deformation, and uneven edges at the can opening; oil stains and metal shavings on the bottom and inner wall; and scratches, dents, deformation, printing errors, and uneven material thickness on the can body.


These defects not only affect aesthetics but can also lead to reduced sealing performance, threatening product quality and consumer safety.


The detection system faces multiple challenges: the reflective properties of the can surface can mask real defects. High-speed production lines require the detection system to have real-time processing capabilities (such as operating at a speed of 10 cans/second) while maintaining high accuracy (accuracy rate of 99.89%). In addition, curved surface imaging of the cylindrical can body and the identification of subtle defects against complex backgrounds are also technical challenges that need to be addressed.


2. Hardware Components and Imaging Optimization of the Detection System


The hardware configuration of the can visual inspection system is a crucial foundation. A reasonable lighting system can effectively suppress reflections and highlight defect features. The composite LED light source system developed by Kangshida combines a three-ring shadowless light, a dome-shaped shadowless light, a low-angle ring light, and coaxial light to meet the detection needs of different parts. For image acquisition, different strategies are required for different inspection areas:


• Bottom inspection often uses a high-resolution area scan camera with a ring light.


• Body inspection can use a line scan camera or three sets of synchronously triggered 2D-3D fusion acquisition modules, installed at 120-degree intervals to achieve full coverage scanning.


For the detection of printed patterns on the outside of the can, a high-precision servo motor can be used to rotate the can at a constant speed, combined with a prism beam-splitting line scan camera to obtain high-quality curved surface images. Appropriate hardware selection and imaging optimization provide a high-quality data foundation for subsequent algorithm processing.


3. Application of Traditional Image Processing Techniques in Detection


Before the widespread application of deep learning, traditional image processing algorithms played an important role in beverage can inspection. These methods are usually designed and optimized for specific types of defects.


For the can opening area, after separating the can opening area using the OTSU maximum inter-class variance method, the contour can be analyzed for features, and then the least squares ellipse algorithm can be used to fit the target elliptical curve. By discretizing and sampling the ellipse and calculating the eccentricity and deviation analysis map, various defects in the can opening can be effectively processed.


Defect detection in the can bottom area mostly utilizes the Hough gradient method to divide the detection area into multiple concentric circular regions. Based on the connected component pixel analysis method of the binarized image, point defects, line defects, and surface defects are detected separately.


For inner wall defects, since the middle and lower areas are compressed during vertical shooting, the detection algorithm needs to first solve the image compression problem through polar coordinate transformation, and then locate the defects through connected component analysis.


In terms of character recognition, the two-dimensional Arimoto entropy threshold method can effectively handle low-contrast character segmentation problems, and its computational complexity is low, meeting real-time requirements.


4. Breakthrough Advances of Deep Learning in Defect Detection


In recent years, deep learning technology has greatly improved the accuracy and generalization ability of beverage can defect detection. Detection systems based on FCOS (Fully Convolutional One-Stage) and HRNet (High-Resolution Network) have demonstrated significant advantages.


FCOS, as an anchor-free object detection algorithm, simplifies the detection process, avoids the complexity of anchor box design, and performs excellently in small object detection. HRNet can maintain high-resolution representation, representing features at different resolutions through a parallel multi-branch structure, which is particularly suitable for industrial defect detection tasks. Improvements to the original HRNet include introducing attention mechanisms to enhance sensitivity to defective areas, optimizing feature fusion strategies, and designing lightweight modules to reduce computational complexity. Experiments show that this deep learning method achieves a mAP (mean average precision) of 0.889 in the can defect detection task, outperforming many traditional methods.


For can body defects, the HPFST-YOLOv5 model, by introducing a hybrid attention mechanism and a high-pass filter guide, achieves a recognition accuracy of 93.9% for defects such as dents, scratches, and deformations while maintaining a processing speed of 28 frames per second.


For low-contrast laser-marked characters, the Res18-UNet semantic segmentation network, combined with a multi-attention mechanism, effectively enhances the model's ability to focus on character regions.


5. System Implementation and Industrial Deployment Considerations


Transforming the algorithm model into a practical detection system requires comprehensive consideration of hardware and software architecture design. A distributed architecture can deploy two independent detection workstations, corresponding to can bottom character defect detection and can body appearance defect recognition, respectively.


The software architecture should adopt multi-threaded parallel processing technology, designing a main control thread, image acquisition thread, algorithm processing thread, and result output thread. Memory mapping technology is used to achieve rapid exchange of large-capacity image data, and GPU acceleration technology is used to optimize the deployment of deep learning algorithms.


Real-time performance is a core indicator of industrial inspection systems. A timer interrupt mechanism strictly constrains the single-can detection cycle to ensure that the system can keep up with the production line speed. In addition, the system should integrate a parameter teaching function, allowing operators to adjust detection parameters according to product specifications, and establish a database module to store detection results and product information, providing data support for quality traceability.


In a real production environment, the system also needs to have anti-interference capabilities to cope with lighting changes and background interference in the factory environment. Hardware redundancy and software fault tolerance mechanisms ensure stable system operation, while a modular software architecture facilitates system maintenance and upgrades.


6. Future Development Trends and Challenges


Can visual inspection technology still faces many challenges and development opportunities. Reflection remains a significant factor affecting detection accuracy; novel image enhancement algorithms such as adaptive gamma transformation based on multi-frame grayscale images may provide solutions.


Further exploration of lightweight network structures to improve inference speed and reduce hardware requirements will enable wider application of the technology in small and medium-sized enterprises. Deep integration of the detection system with the production line control system to achieve automatic rejection of defective products is also an important development direction.


Future beverage can visual inspection systems may evolve towards multi-functional integration, adding defect severity assessment and quality prediction functions in addition to detecting common defects. At the same time, this technology can also be extended to the defect detection of other types of industrial products, such as metal cans and plastic bottles, contributing to the development of intelligent manufacturing and Industry 4.0.


With the acceleration of industrial intelligence, beverage can visual inspection technology has moved from the laboratory to practical application. Domestic research teams have made significant progress in this field; for example, the system developed by Guangdong University of Technology has achieved an accuracy rate of 99.89% and a detection speed of up to 10 cans per second.


In the future, with the continuous optimization of deep learning algorithms and improvements in hardware performance, visual inspection technology will play an important role in a wider range of industrial quality inspection scenarios. It will not only improve product quality but also reduce production costs for enterprises, ultimately allowing consumers to enjoy safer and more reliable beverage products.


Related Products

x