Clear Sky Science · en

An effective detection model based on YOLO for pore defects in additive manufacturing

· Back to index

Why tiny holes matter in 3D‑printed metal

Metal parts made by 3D printing are moving into airplanes, cars, and medical implants. But inside these shiny components can lurk invisible flaws: tiny bubbles and holes, called pores, that weaken the metal and can lead to cracks or failure. Today, checking for such defects often means slow, manual inspection of microscope images. This study introduces an automated way to spot and measure these microscopic pores and to link them directly to how the part was printed, offering a path toward safer, more reliable 3D‑printed metal parts.

Figure 1
Figure 1.

Making metal parts layer by layer

The work focuses on a popular metal 3D‑printing method called selective laser melting, where a laser scans across a thin layer of metal powder, melting it to form each new slice of a solid part. This approach allows complex shapes and efficient use of material, which is why it is attractive for demanding uses like aerospace and medical devices. However, the intense heating and cooling can trap gas, leave regions only partly melted, or create deep “keyholes” in the melt pool. All of these routes form pores—microscopic voids scattered through the material—that concentrate stress and reduce strength and fatigue life. Controlling porosity is therefore essential to making trustworthy printed components.

Teaching a computer to see hidden flaws

Instead of asking experts to inspect every microscope image by eye, the authors built an automated image analysis system based on a family of artificial‑intelligence models known as YOLO, widely used for fast object detection. They collected high‑resolution optical microscope images from 49 aluminum‑alloy samples printed with different laser powers and scanning speeds, creating a dataset of 980 images. Each pore in these images was painstakingly outlined by hand to serve as ground truth. On top of the standard YOLOv5 design, the team added several improvements: a smarter schedule for how quickly the model learns during training, an “attention” module that helps the network focus on pore‑like patterns instead of background texture, and a lightweight feature‑fusion scheme that keeps the model compact while combining information across scales.

From pictures to precise pore statistics

Once trained, the improved model can both locate each pore and outline its shape in new microscope images. The software then automatically counts how many pixels belong to pores and compares that to the total number of pixels in the metal region, yielding an overall porosity value for each sample surface. Tests against other modern YOLO variants showed that the new design achieved higher accuracy in identifying pores while keeping computing demands modest, making it suitable for use on typical industrial hardware. When its pore‑area measurements were compared with careful manual estimates, the differences were within about five percent, indicating that the automated method is reliable enough for routine quantitative analysis.

Figure 2
Figure 2.

Connecting printing settings to pore formation

With automatic pore measurements in hand, the researchers examined how two key printing settings—laser power and scanning speed—shape porosity. They found that raising the laser power from very low levels quickly reduces pores, because the powder melts more completely and trapped gas has more time to escape. But beyond a certain point, further power increases cause unstable, violently oscillating melt pools that actually create new defects. Scanning speed shows a similar trade‑off: moving the laser too slowly can overheat the material, while moving it too fast prevents full melting and traps gas. To capture these complex trends, the team used a mathematical tool called Chebyshev polynomials to build a smooth surface that links power and speed to porosity, achieving an excellent match to the experimental data.

Toward smarter, safer 3D‑printed metals

For non‑specialists, the key message is that the study turns microscope images into automatic, trustworthy measurements of how “hole‑free” a printed metal part is, and then ties those measurements back to the printing knobs engineers can actually turn. The method not only spots and outlines pores but also quantifies their overall amount and maps out which combinations of laser power and scanning speed keep porosity low. Although the current work relies on polished lab samples and optical microscopes, the same ideas could be extended toward factory‑floor monitoring and process optimization. In the long run, such automated, data‑driven tools will help make metal 3D printing more predictable, less wasteful, and safer for critical applications.

Citation: Ni, R., Xu, S., Chen, H. et al. An effective detection model based on YOLO for pore defects in additive manufacturing. Sci Rep 16, 14379 (2026). https://doi.org/10.1038/s41598-026-43970-2

Keywords: additive manufacturing, selective laser melting, defect detection, deep learning, porosity analysis