Clear Sky Science · en

An improved lightweight YOLOv11 algorithm for weld surface defect detection

· Back to index

Why tiny flaws in welds matter

From bridges and ships to skyscrapers and pipelines, countless metal structures depend on welded joints to stay safe and strong. Yet the surfaces of these welds can hide small flaws—like pores, cracks, or bits of trapped slag—that may grow into serious failures if they go unnoticed. Inspecting every weld by hand is slow, costly, and prone to human error, especially in busy factories. This paper introduces a faster, leaner computer-vision system, called YOLO-Air, designed to spot weld surface defects automatically and in real time, even on resource-limited industrial hardware.

Limits of traditional inspection tools

For decades, weld inspection has relied on physical testing methods such as X-rays, ultrasound, magnetic powders, and eddy currents. These techniques can reveal internal and surface defects, but they come with trade-offs: radiation hazards and protective requirements for radiography, operator dependency for ultrasound, and material restrictions for magnetic and eddy-current testing. They also struggle with objects that have complex shapes and with environmental variations such as lighting, temperature, or surface contamination. As industrial demand grows for rapid, continuous quality control, these older tools alone are no longer enough.

Rise of smart cameras for welds

Recent progress in deep learning has made it possible to detect defects directly from images, using algorithms originally developed for everyday object recognition. Among these, so-called one-stage detectors like the YOLO family are especially attractive for factories because they combine good accuracy with high speed. However, weld images present unusual challenges: backgrounds cluttered with rust, stains, and coatings; extremely small and densely packed defects; and multiple defect types that vary in shape and texture. Off-the-shelf models either miss subtle flaws, confuse noise with real damage, or are so heavy that they are hard to deploy on modest GPUs or embedded devices.

Figure 1
Figure 1.

A slimmer brain for sharper eyes

The authors build on the latest YOLOv11 model and reshape it into YOLO-Air, a version tailored to spot weld surface defects efficiently. They start by reworking the backbone, the part of the network that first digests the image. A new feature-extraction block combines two ideas: a "ghost" mechanism that reuses simple transformations to generate extra feature maps at low cost, and a dynamic filter mechanism that adapts to each input, emphasizing patterns associated with real defects while downplaying distracting background details. This gives the model a richer understanding of defects at different sizes and shapes without increasing the computational burden.

Speeding up information flow

Next, the team lightens the middle of the network, known as the neck, which is responsible for blending coarse, global information with fine, local details. They replace heavier operations with grouped and shuffled convolutions that encourage channels to share information while cutting unnecessary computation. A redesigned aggregation block further streamlines how features at different scales are combined. Together, these changes reduce redundancy in what the model must process, allowing it to keep track of tiny defects spread across a noisy weld surface while still running very quickly.

A lean output layer for real-time use

Finally, the authors simplify the detection head—the part of the system that turns internal features into bounding boxes and defect decisions. Instead of applying full convolutions to every channel, they use a partial scheme that processes only a subset of channels and passes the rest through unchanged. This trims a major share of the model’s parameters and floating-point operations, while preserving the essential information needed to localize and classify defects. The result is a detector that is both compact and responsive, making it suitable for on-line monitoring in production lines where every millisecond counts.

Figure 2
Figure 2.

How well the new system performs

To evaluate YOLO-Air, the researchers test it on two public datasets of metal surface defects: one focused on welds and another on general steel strip flaws. Against a lineup of classic and modern detection models—including several versions of YOLO and transformer-based designs—YOLO-Air delivers the best balance of accuracy, speed, and model size. On weld images, it improves detection quality by about one percentage point over the YOLOv11 baseline while cutting the number of parameters by more than 17 percent and the computational load by nearly one-third. It also maintains several hundred frames per second of throughput, easily meeting real-time needs. Statistical tests confirm that these gains are not due to random chance.

What this means for industry

In practical terms, YOLO-Air shows that it is possible to build a weld-inspection system that is both smart and frugal, able to run on everyday graphics cards or embedded processors without sacrificing reliability. By better distinguishing true defects from harmless surface clutter and by catching very small flaws, it could reduce missed problems and unnecessary repairs alike. While the model has not yet been rolled out at full scale in factories, the study suggests a clear path toward compact, camera-based inspectors that continuously guard the quality of critical welded structures.

Citation: Zhang, R., Pan, C., Chen, Z. et al. An improved lightweight YOLOv11 algorithm for weld surface defect detection. Sci Rep 16, 11440 (2026). https://doi.org/10.1038/s41598-026-41568-2

Keywords: weld defect detection, industrial vision, lightweight deep learning, YOLO object detection, quality inspection automation