
Machine vision optimizes quality inspection in automotive production
Automotive | Deep Learning | HALCON | Anomaly Detection | InspectionConsistently high quality is an absolute must in automotive production. To ensure that welded connections in body shells meet these standards, DGH has developed an application that automatically inspects them and identifies anomalies. The MVTec HALCON machine vision software and the MVTec Deep Learning Tool ensure fast and precise inspection processes.

Automotive production places high demands on quality inspection
High quality standards apply in automotive production, in particular to welding processes on the body-in-white. The challenge here is that many different defects can occur. For example, cracks, incomplete weld seams, and irregular welding patterns must be precisely identified. This challenge is addressed by the DGH Group, an automation specialist based in Valladolid, Spain, which was recently integrated into GROUPE ADF. On behalf of a large French automotive group, the DGH Group's team of experts developed an automated system for inspecting welded connections from the metal inert gas welding (MIG welding) and laser welding processes.
Automation of quality inspection with the help of machine vision
The primary aim of the implementation was to achieve a very high quality standard for all weld seams. In addition, the autonomous quality inspection was to bring the fundamental advantages of automation to bear. Namely, higher speed, reliability, accuracy, and clear consistency during the inspection. To achieve these goals, the system works as follows: When a car body reaches the inspection station, the PLC triggers various inspection processes. 2D cameras take photos of the welded connections individually or successively and transmit the images via GigE Vision protocol to the machine vision software, where the processing takes place. The system checks whether anomalies can be detected around the weld seams by reliably checking different welding joints, seams, and spots that have been created using various laser welding processes. The data is then sent to the PLC and the corresponding results are visualized on a screen.
Deep learning enables outstanding recognition rates
The MVTec HALCON machine vision software is at the core of the setup. To reliably detect all defects, the software essentially uses two methods based on deep learning AI technology. First, Instance Segmentation is used to precisely localize the relevant area, i.e., the weld seam, on the captured images. Thanks to deep learning, the method can assign objects to different, trained classes with pixel precision. The next step involves the use of Anomaly Detection technology, which is also based on deep learning. The process uses automated surface inspection to accurately detect all deviations, i.e., defects of any kind. “Anomaly detection had two decisive advantages for us: On the one hand, the detection rates are very high and robust. On the other hand, training the underlying neural networks was simple. This is because mainly “good images” of the welded joints, i.e., images of weld seams without defects, were required to train the deep learning networks. However, a few “defect images” can help find an optimal threshold value to differentiate between good and defect weld seams. We therefore only needed a small number of good images. This is very practical, as these are available quickly and easily. Large numbers of images showing defects are much more difficult to organize, not to mention the fact that it is impossible to obtain images of all possible defects. This is where deep learning has a clear advantage,” explains Guillermo Martín, Innovation & Technology Director at DGH.

Deep Learning Tool paves the way for simple labeling and training
Before the neural networks can be trained using deep learning, the images used must be labeled. DGH used the free Deep Learning Tool from MVTec for this task. This allows image data to be easily labeled and then conveniently trained. To do this, DGH first collected images of weld seams and also incorporated the knowledge of its employees. They checked each image and ensured that mainly good images were used for training. The images are then loaded into the Deep Learning Tool, where they are labeled specifically for the Instance Segmentation technology. Thanks to the Smart Label Tool, the user only has to click in the area of the welded joint and the tool automatically frames this segment. This ensures that the Deep Learning Tool only trains on the basis of the relevant areas of the image. After labeling, the image data set is divided, usually in a ratio of 50 percent for training, 25 percent for validation, and 25 percent for testing. Finally, the trained model is saved and loaded into the machine vision software through the Deep Learning Tool's seamless connection to HALCON.
Driving automation forward with machine vision and artificial intelligence
“We have been working successfully with MVTec for over ten years and are therefore familiar with their powerful tools and algorithms. That's why we decided to trust MVTec HALCON for this project as well,” reveals Guillermo Martín. The machine vision software overcomes another challenge and delivers robust detection rates despite reflective metal surfaces and fluctuating lighting conditions. “The first system was put into operation at the car manufacturer's plant in early 2024. After this had been running successfully, we received a new request from the same manufacturer in April 2024 to implement a second system for inspecting welded joints,” says Guillermo Martín happily. The DGH Group has thus achieved all its goals and has been able to reduce its dependence on skilled workers for quality inspection processes and significantly increase the level of automation. Thanks to machine vision and artificial intelligence, defects were demonstrably minimized, and all types of welding defects were detected consistently and reliably.