Method and device for detecting surface damage precursor of additive manufacturing device

By using the YOLOv11-LSF model and optical system device in the detection of surface damage precursors of additive manufacturing devices, the problems of difficulty in taking into account both detection accuracy and speed, high cost and complex operation in the prior art are solved, and efficient and low-cost detection of damage precursors is achieved.

CN119851100AActive Publication Date: 2025-04-18NAT UNIV OF DEFENSE TECH

Patent Information

Application Number
CN202510341308.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-04-18
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

In the prior art, when detecting surface damage precursors of metal additive manufacturing devices, there are problems such as difficult to take into account both detection accuracy and speed, high cost and complex operation.

Method used

Using the YOLOv11-LSF model, by introducing the LSKA attention mechanism and Slim-neck concept, a backbone network and neck network are built, and combined with optical system devices, efficient detection of surface damage precursors of additive manufacturing devices is achieved.

Benefits of technology

It significantly improves the detection ability of multi-scale targets, enhances attention to key areas, suppresses interference from complex background information, improves detection and classification capabilities, and achieves efficient and low-cost detection of damage precursors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119851100A_ABST
    Figure CN119851100A_ABST
Patent Text Reader

Abstract

The invention relates to a method and a device for detecting a damaged precursor on the surface of an additive manufacturing device. The method comprises the following steps: acquiring a target precursor image on the surface of the additive manufacturing device; inputting the target precursor image into a pre-trained damage identification model, and judging whether damage exists in the target precursor image based on the damage identification model; the injury identification model comprises a backbone network, a neck network and a head network; the backbone network is constructed by replacing a C2PSA module of the YOLOv11 model with a C2PSALKSA module; the C2PSALKSA module is obtained by a C2PSA module in which an LSKA attention mechanism is introduced; the neck network is constructed by replacing a C3K2 module in the neck network of the YOLOv11 model with a VoV-GSCSP module; and the VoV-GSCSP module is constructed according to a Slim-check concept. The detection precision and the detection efficiency are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a damage precursor measurement technology, and in particular to a method and device for detecting a damage precursor on the surface of an additive manufacturing device. Background Art

[0002] Additive Manufacturing (AM), as a breakthrough in the advanced manufacturing paradigm, has demonstrated significant technical advantages in the preparation of complex structural components in the fields of aerospace, biomedicine, etc., with its unique advantages of layer-by-layer manufacturing. Compared with traditional "subtractive" and "equal material" processing methods, it can produce complex geometric shapes and customization with minimal waste, and its processing methods are more flexible, and parts can be produced layer by layer according to the designed part model. However, when facing the needs of industrial-grade precision manufacturing, key issues such as the multi-scale characteristics of surface damage precursors, background noise interference, and the lack of high-quality training samples seriously restrict the intelligent transformation of AM quality monitoring systems.

[0003] As the most cutting-edge and difficult technology in the additive manufacturing system, metal additive manufacturing technology is an important development direction of advanced manufacturing and is expected to become a key technical approach to achieve cross-generational improvement of high-end industrial equipment structure. At present, the research on metal additive manufacturing mainly focuses on four preparation methods: selective laser melting (SLM), laser metal deposition (LMD), electron beam melting (EBM) and wire arc additive manufacturing (WAAM). However, due to the unique manufacturing method of metal additive manufacturing components, damage precursors such as low-density areas, stress, and cracks that induce device performance degradation will occur. The size range of pore-type damage precursors is about 5 to 20 μm, the size of extended damage precursors is about 50 to 500 μm, and the length and opening of crack-type damage precursors are generally less than 100 μm. The existence of these damage precursors threatens the safety of high-precision industries. Therefore, the detection and identification of various types of damage precursors of metal additive manufacturing components is of great significance, which can not only improve the utilization rate of materials, but also ensure the safety of industry applications. Traditional non-destructive damage precursor detection methods include radiographic testing, ultrasonic testing, liquid penetrant testing, magnetic particle testing, and eddy current testing. Although traditional methods have high detection accuracy, they are costly and complex to operate. They cannot balance detection accuracy and speed, and in some cases may not fully meet actual production needs. Therefore, it is necessary to propose a more efficient and low-cost damage precursor detection method. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method and device for detecting surface damage precursors of additive manufacturing devices.

[0005] To achieve the above-mentioned object of the invention, the present invention provides a method for detecting a surface damage precursor of an additive manufacturing device, comprising the following steps: S1. Collect target precursor images on the surface of additive manufacturing devices; S2. Inputting the target precursor image into a pre-trained damage recognition model, and determining whether there is damage in the target precursor image based on the damage recognition model; The damage identification model is a YOLOv11-LSF model, which includes: a backbone network, a neck network connected to the backbone network, and a head network connected to the neck network; The backbone network is constructed by replacing the C2PSA module in the backbone network of the YOLOv11 model with the C2PSA_LKSA module; wherein the C2PSA_LKSA module is obtained by introducing the C2PSA module of the LSKA attention mechanism; The neck network is constructed by replacing the C3K2 module in the neck network of the YOLOv11 model with a VoV-GSCSP module; wherein the VoV-GSCSP module is constructed based on the Slim-neck concept.

[0006] According to one aspect of the present invention, the C2PSA_LKSA module comprises: a first Conv layer, a plurality of PSABlock layers, a first Concat layer, and a second Conv layer connected in sequence; The first Conv layer is connected to the first Concat layer; The PSABlock layer includes: an LSKA attention mechanism layer, a third Conv layer and a fourth Conv layer connected in sequence.

[0007] According to one aspect of the present invention, the backbone network includes: a first main network Conv layer, a second main network Conv layer, a first main network C3k2 layer, a third main network Conv layer, a second main network C3k2 layer, a fourth main network Conv layer, a third main network C3k2 layer, a fifth main network Conv layer, a fourth main network C3k2 layer, an SPPF layer and a C2PSA_LKSA module connected in sequence; The first main network C3k2 layer and the second main network C3k2 layer are respectively configured as: C3K2 c3k=False; The third main network C3k2 layer and the fourth main network C3k2 layer are respectively configured as: C3K2 c3k=True.

[0008] According to one aspect of the present invention, if the main network C3k2 layer is configured as C3K2 c3k=False, the main network C3k2 layer includes: a fifth Conv layer, a first Split layer, N Bottleneck layers, a second Concat layer and a sixth Conv layer connected in sequence; If the main network C3k2 layer is configured as C3K2 c3k=True, the main network C3k2 layer includes: the seventh Conv layer, the second Split layer, N C3k layers, the third Concat layer and the eighth Conv layer connected in sequence; The C3k layer is configured with Bottleneck layers stacked N times.

[0009] According to one aspect of the present invention, the damage identification model is trained based on the following steps, which include: S201. Dataset acquisition Collect the damage precursor image of the surface of the additive manufacturing device, and simulate it according to the characteristics of the collected damage precursor image to obtain a preset number of simulation images, annotate the collected damage precursor image and simulation image respectively, and save them as txt files to obtain the mixed data set required for model training; Dividing the mixed data set into a training set and a validation set in a preset ratio; S202. Model training Deploy a training environment for the damage identification model, and input the training set into the damage identification model for training; S203. Model Evaluation The recognition performance of the trained damage recognition model is evaluated based on the validation set. If the evaluation result meets the preset conditions, the damage recognition model is output. The recognition performance of the damage recognition model is evaluated based on at least one of the accuracy, recall, average precision value, average precision mean, and GFLOPs indicators of model recognition.

[0010] According to one aspect of the present invention, the step of simulating the damaged precursor image and obtaining a preset number of simulated images based on the collected damaged precursor image features includes the following steps: a1. Obtaining a damage-free precursor image and constructing a simulated image background, wherein the damage-free precursor image is transformed by at least one of random scaling, random rotation, and random splicing, and the obtained image is scaled and cropped to obtain the simulated image background of a preset size; a2. Select the size of the region used to simulate damage, where the side length of the selected region is M×M; a3. Randomly generate M Gaussian functions, wherein the variance and mean of each Gaussian function are different; a4. Based on the M Gaussian functions, a matrix for simulating damage is superimposed, wherein the matrix is ​​randomly superimposed based on the type of damage in the damage precursor image feature to simulate the same type of damage; a5. Scaling and mapping the matrix to (0,255) according to the grayscale value range of the image, and randomly scaling the matrix to simulate damage of different sizes; a6. Selecting several random positions within a preset range in the background of the simulated image to arrange a number of simulated lesions to generate the simulated image, wherein in the process of arranging a number of simulated lesions in the background of the simulated image, the brightness and / or contrast of the simulated lesions are randomly changed.

[0011] According to one aspect of the present invention, in step a4, the matrix is ​​randomly superimposed based on the type of damage in the damage precursor image feature to simulate the same type of damage, and the types of damage include: pores and cracks; If the damage type is porosity, it includes: According to the cluster characteristics of the damage, the M Gaussian functions are randomly superimposed to generate a randomly fluctuating M×M dimensional matrix corresponding to the cluster characteristics of the damage, so as to simulate the same type of damage; If the damage type is crack, it includes: A vertical straight line is randomly generated, and M point coordinates are uniformly obtained based on the extension direction of the straight line; Randomly fine-tune the coordinate value of each point coordinate so that the straight line undergoes at least one of thickness increase or decrease, distortion, and bending to simulate a random extension state of a crack; At least one of random rotation and random translation is used to adjust the extension direction and / or position of the simulated crack; The M Gaussian functions are correspondingly superimposed based on the coordinates of the points in the simulated cracks to generate a matrix for simulating damage, so as to simulate the same type of damage.

[0012] To achieve the above-mentioned purpose of the invention, the present invention provides a device applied to the above-mentioned method for detecting surface damage precursors of additive manufacturing devices, comprising: a light emitting optical path, a collection optical path, a beam splitter, an objective lens group and a host computer; The collection optical path and the objective lens group are arranged coaxially; The beam splitter is arranged between the collection light path and the objective lens group; The light emitting optical path is arranged opposite to one side of the beam splitter; The beam splitter receives the light emitted by the light emitting optical path and transmits it to the objective lens group, and the beam splitter receives the image returned by the objective lens group and transmits it to the collection optical path; The host computer is connected to the collection optical path.

[0013] According to one aspect of the present invention, the light emitting optical path comprises: a light source, a first condenser, a first aperture, a beam expander, a second aperture, a polarizer, and a second condenser, which are coaxially arranged in sequence, and the light source is driven; The second condenser is arranged opposite to the beam splitter; The collection optical path includes: a CMOS sensor, a tube lens, a Bertrand lens and a polarizer which are coaxially arranged in sequence; The polarizer is arranged opposite to the beam splitter; The CMOS sensor is connected to the host computer.

[0014] According to one aspect of the present invention, the polarizer can be freely rotated along the axial direction; The analyzer can rotate freely along the axial direction; The objective lens group is a double telecentric achromatic structure objective lens, and its working distance is 20±2 mm, the numerical aperture is 0.25, and the magnification is 10 times; The light source is a halogen lamp; The size of the CMOS sensor is 1 inch, and its pixel size is 2.4 micrometers.

[0015] The beneficial effects of the present invention are as follows: According to a solution of the present invention, the present invention creatively proposes a YOLOv11-LSF model, which effectively improves the detection capability of multi-scale targets, enhances the focus on key areas, fully suppresses the interference of complex background information, and greatly improves the overall detection and classification capabilities of the model.

[0016] According to a solution of the present invention, the present invention fully reduces the complexity of convolution operations by introducing VoV-GSCSP, and at the same time more effectively integrates the feature map information of different stages, so that the detection model reduces the complexity of the model without losing the accuracy, speeds up the detection speed of the model, and makes the network more adaptable to the requirements of actual detection tasks for detection speed.

[0017] According to one solution of the present invention, in terms of model training, a simulated damage precursor image is constructed based on the damage precursor features on the surface of the additive manufacturing component collected by the hardware system, and it is mixed with the collected damage precursor image as a training sample for the damage precursor detection network, thereby solving the problem of difficulty in obtaining model training samples.

[0018] According to a scheme of the present invention, this scheme creatively proposes a microscopic polarization YOLOv11-LSF intelligent detection framework, and establishes an automatic non-destructive detection method for damaged precursors of additive manufacturing devices through triple technological innovations, effectively breaking through the bottleneck of existing technologies. First, a multi-scale perception module is constructed based on the Large Separable Kernel Attention mechanism, which significantly improves the feature detection capability of the network in complex industrial scenarios; secondly, a cross-level local network VoV-GSCSP module is designed using GSConv and a one-time aggregation method, and a Slim-neck architecture is constructed, which significantly reduces the model complexity without losing accuracy; thirdly, an innovative damage precursor simulation strategy integrating physical features is proposed to construct a training sample library of virtual-real fusion, breaking through the dependence of traditional deep learning on large-scale labeled data. Experimental results show that compared with the benchmark model, the accuracy of the YOLOv11-LSF model of the present invention is improved by 1.6%, the recall rate is improved by 1.6%, the mAP50 is improved by 1.5%, and the mAP50-95 is improved by 2.8%. Its unique adaptability to small samples and robustness under complex working conditions provide a reliable technical solution for industrial-grade AM quality monitoring.

[0019] According to a solution of the present invention, this solution not only promotes the technological innovation of the intelligent manufacturing quality assurance system, but also opens up a new path for the application of cross-scale damage precursor detection theory in the field of advanced manufacturing.

[0020] According to a solution of the present invention, this solution fully takes into account the complex changes in defect scales. The introduced C2PSA_LKSA module can fully enhance the model's adaptability to targets of different scales, enhance the model's ability to focus on key target areas, and improve the detection accuracy of defective targets.

[0021] According to a solution of the present invention, this solution inputs the image into the damage recognition model, extracts features through a series of convolution operations, and at the end of the backbone network, it is necessary to integrate semantic information at different levels, and then dynamically adjust the coverage of the large receptive field based on the LKSA attention mechanism, which can more effectively capture cross-level global dependencies.

[0022] According to a solution of the present invention, this solution realizes multi-dimensional collaborative innovation with the detection algorithm through the constructed optical system device, and realizes a breakthrough improvement in the detection of high-reflective metal surface defects. At the hardware level, the incident light path can be continuously adjusted from 0 to 180° and / or the analyzer can be dynamically compensated from 90 to 270° by designing a dual-rotating polarizer group (i.e., polarizer and analyzer), so that the signal-to-noise ratio is improved by more than 15dB; at the algorithm level, the YOLOv11-LSF model is innovatively constructed, which effectively improves the detection capability of multi-scale targets, enhances the focus on key areas, fully suppresses the interference of complex background information, and greatly improves the overall detection and classification capabilities of the model. Through the optical-algorithm joint calibration system, a closed-loop feedback system from feature acquisition, processing optimization to result output is formed, especially in micro-pore crack detection, multi-material adaptation (aluminum alloy / stainless steel / titanium alloy) and industrial complex environment robustness. It shows significant advantages, and systematically solves industry pain points such as high reflective interference, missed detection of small defects, and environmental sensitivity. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A flowchart of a method for detecting a surface damage precursor of an additive manufacturing device according to an embodiment of the present invention; Figure 2 It is an application flow chart of the YOLOv11-LSF model according to an embodiment of the present invention; Figure 3 A structural diagram of a YOLOv11-LSF model according to an embodiment of the present invention; Figure 4 A structural diagram of a C2PSA_LKSA module according to an embodiment of the present invention; Figure 5 A flowchart of a simulation image construction process according to an embodiment of the present invention; Figure 6 A flowchart of constructing a pore simulation image according to an embodiment of the present invention; Figure 7 A flowchart of constructing a crack simulation image according to an embodiment of the present invention; Figure 8 A simulated image of damage simulated according to an embodiment of the present invention, wherein: Figure 8 (a) shows the simulated image of the pores. Figure 8 (b) A simulation image showing the simulated crack; Fig. 9 A device for detecting a surface damage precursor of an additive manufacturing device according to an embodiment of the present invention; Fig.10A comparison result diagram of a YOLO series network and a YOLOv11-LSF model according to an embodiment of the present invention; Fig.11 is the Heatmap corresponding to each selected attention mechanism, where Fig.11 (a) represents the Heatmap corresponding to the YOLOv11s attention mechanism. Fig.11 (b) represents the Heatmap corresponding to the CA attention mechanism. Fig.11 (c) represents the Heatmap corresponding to the CBAM attention mechanism. Fig.11 (d) represents the Heatmap corresponding to the ECA attention mechanism. Fig.11 (e) represents the Heatmap corresponding to the GAM attention mechanism. Fig.11 (f) Heatmap corresponding to the LSKA attention mechanism; Fig.12 This is a comparison chart of ablation test results of a YOLO series network and a YOLOv11-LSF model according to an embodiment of the present invention. Fig.12 (a) Comparison of the ablation test results showing the accuracy of the YOLO series network and the YOLOv11-LSF model. Fig.12 (b) shows the ablation experiment results comparison of the recall rate of the YOLO series network and the YOLOv11-LSF model. Fig.12 (c) shows the YOLO series network and the YOLOv11-LSF model The comparison chart of ablation experiment results. Fig.12 (d) shows the YOLO series network and the YOLOv11-LSF model Comparison of ablation experiment results; Fig.13 This is a comparison diagram of the model losses of the YOLOv11 network and the YOLOv11-LSF model according to an embodiment of the present invention, wherein: Fig.13 (a) shows the training loss comparison of the YOLOv11 network and the YOLOv11-LSF model. Fig.13 (b) Comparison of validation loss between the YOLOv11 network and the YOLOv11-LSF model; Fig.14 This is a comparison diagram of the model detection results of the YOLOv3 network for damage according to an embodiment of the present invention, wherein: Fig.14 (a) shows the original image of the pores, Fig.14 (b) shows the original image of the crack. Fig.14 (c) shows the detection result of pores by the YOLOv3 network. Fig.14 (d) shows the crack detection result of the YOLOv3 network; Fig.15 This is a comparison diagram of model detection results of a YOLOv5 network and a YOLOv10 network according to an embodiment of the present invention, wherein: Fig.15 (a) shows the detection result of pores by the YOLOv5 network. Fig.15 (b) shows the crack detection result of the YOLOv5 network. Fig.15 (c) shows the detection result of pores by the YOLOv10 network. Fig.15 (d) shows the crack detection result of the YOLOv10 network; Fig.16 This is a comparison diagram of the model detection results of the YOLOv11 network of an implementation mode of the present invention and the YOLOv11-LSF model of this solution, wherein: Fig.16 (a) shows the detection result of pores by the YOLOv11 network. Fig.16 (b) shows the crack detection result of the YOLOv11 network. Fig.16 (c) shows the detection result of pores by the YOLOv11-LSF model. Fig.16 (d) shows the crack detection results of the YOLOv11-LSF model. DETAILED DESCRIPTION

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] When describing the embodiments of the present invention, the orientation or positional relationship expressed by the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" are based on the orientation or positional relationship shown in the relevant drawings and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the above terms should not be understood as limiting the present invention.

[0026] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments cannot be described one by one here, but the embodiments of the present invention are not therefore limited to the following embodiments.

[0027] Combination Figure 1 and Figure 2As shown, according to one embodiment of the present invention, a method for detecting a surface damage precursor of an additive manufacturing device of the present invention comprises the following steps: S1. Collect target precursor images on the surface of additive manufacturing devices; S2. Input the target precursor image into the pre-trained damage recognition model, and determine whether there is damage in the target precursor image based on the damage recognition model; Figure 3 As shown, in this embodiment, the damage identification model is a YOLOv11-LSF model, wherein the YOLOv11-LSF model in this scheme is obtained by introducing the LSKA attention mechanism and the Slim-neck concept based on the structure of YOLOv11; it specifically includes: a backbone network, a neck network connected to the backbone network, and a head network connected to the neck network; in this embodiment, the backbone network is constructed by replacing the C2PSA module in the backbone network of the YOLOv11 model with the C2PSA_LKSA module; wherein the C2PSA_LKSA module is obtained by introducing the C2PSA module with the LSKA attention mechanism; the neck network is constructed by replacing the C3K2 module in the neck network of the YOLOv11 model with s; wherein the VoV-GSCSP module is constructed with the Slim-neck concept.

[0028] like Figure 4 As shown, according to one embodiment of the present invention, the C2PSA_LKSA module includes: a first Conv layer, multiple PSABlock layers, a first Concat layer, and a second Conv layer connected in sequence; wherein the multiple PSABlock layers are connected in sequence. Further, the first Conv layer is connected to the first Concat layer. In this embodiment, the PSABlock layer includes: an LSKA attention mechanism layer, a third Conv layer, and a fourth Conv layer connected in sequence.

[0029] In this implementation, the LSKA attention mechanism layer uses innovative kernel decomposition and serial convolution strategies to reduce computational and memory costs while maintaining efficient image processing capabilities. The core formula for the operation of the LSKA attention mechanism layer is as follows: Input feature map After decomposed convolution: (1) in, represents the input image, Respectively represent the number of channels, image height, and image width, represents depthwise separable convolution, Indicates a cascade of operations, The expansion rate is d Depthwise separable convolution.

[0030] pass Convolution compresses the channel dimension and generates attention weights: (2) In the formula, To be learnable Convolution kernel, Represents the convolution operation, output is the spatial attention map.

[0031] Finally, feature enhancement is achieved through Hadamard product: (3) in Represents element-wise product, preserving the original feature resolution.

[0032] Through the C2PSA_LKSA module, the YOLOv11-LSF model of this solution is further effectively improved to improve the detection ability of multi-scale targets, and the overall detection and classification ability of the YOLOv11-LSF model is fully improved. In addition, through the C2PSA_LKSA module, the present invention can further enhance the detection ability of the entire model for multi-scale targets and the focus on key areas without introducing too many parameters, which is more beneficial to further promote the detection and classification capabilities of the present invention.

[0033] Through the above settings, the YOLOv11-LSF model of the present invention can fully adapt to damage precursors of different scales, and can simultaneously identify damage types of different scales and with great differences (such as pores and scratches), fully expanding the receptive field and enhancing the global modeling capability, providing a more powerful contextual understanding capability for target detection.

[0034] like Figure 3 As shown, according to one embodiment of the present invention, the backbone network includes: a first main network Conv layer, a second main network Conv layer, a first main network C3k2 layer, a third main network Conv layer, a second main network C3k2 layer, a fourth main network Conv layer, a third main network C3k2 layer, a fifth main network Conv layer, a fourth main network C3k2 layer, an SPPF layer and a C2PSA_LKSA module connected in sequence; wherein the first main network C3k2 layer and the second main network C3k2 layer are respectively configured as: C3K2 c3k=False; the third main network C3k2 layer and the fourth main network C3k2 layer are respectively configured as: C3K2 c3k=True.

[0035] In this embodiment, if the main network C3k2 layer is configured as C3K2 c3k=False, the main network C3k2 layer includes: the fifth Conv layer, the first Split layer, N Bottleneck layers, the second Concat layer, and the sixth Conv layer connected in sequence; if the main network C3k2 layer is configured as C3K2 c3k=True, the main network C3k2 layer includes: the seventh Conv layer, the second Split layer, N C3k layers, the third Concat layer, and the eighth Conv layer connected in sequence; wherein the C3k layer is configured with a Bottleneck layer stacked N times. In this embodiment, the Bottleneck layer has multiple Conv layers connected in sequence, for example, the Conv layer can be set to two layers.

[0036] According to one embodiment of the present invention, the VoV-GSCSP module introduced in the neck network constructs a path aggregation feature pyramid network, which can fully integrate the path aggregation feature pyramid network with multi-scale information, and realizes the ability to use different structural design schemes to improve feature utilization efficiency and network performance.

[0037] In this implementation, the calculation process of the VoV-GSCSP module is: (4) (5) (6) in, The operation splits the input channel into two parts and only performs n After the GSBottleneck processing, the feature fusion is completed through 1×1 convolution. represents the input feature map, Represents the first part of the features after the input feature map is split through the channel. Indicates two A sequential processing module consisting of layers, Indicates that the processed features are concatenated with the original retained features along the channel dimension. Represents the second part of the features after the input feature map is split into channels. Indicates weighted fusion of the concatenated features.

[0038] According to one embodiment of the present invention, the damage identification model is trained based on the following steps, which include: S201. Dataset acquisition The damage precursor image on the surface of the additive manufacturing device is collected, and according to the characteristics of the collected damage precursor image, it is simulated to obtain a preset number of simulation images, and the collected damage precursor image and the simulation image are annotated respectively, and saved as a txt file to obtain a mixed data set required for model training; in this embodiment, 64 images containing pores (circular or elliptical white spots with white center and regular shape) and scratches (light gray with clearly defined wavy, linear and branched thin lines) can be collected and mixed with 2000 images simulated according to the collected images as a mixed image set for training; further, the LabelImg annotation tool is used to annotate the images in the obtained mixed image set, and the images are saved as a txt file to obtain the mixed data set required for model training; wherein, the damage precursor instances on each image are annotated with precise bounding boxes, and these bounding boxes provide detailed information about the target location, size and category.

[0039] Furthermore, the mixed data set is divided into a training set and a validation set in a preset ratio; in this embodiment, the mixed data set is randomly divided into a training set and a validation set in a ratio of 8:2.

[0040] S202. Model training Deploy the training environment of the damage recognition model, and input the training set into the damage recognition model for training; in this embodiment, the training of the damage recognition model is established on the Pytorch deep learning framework and runs in the Anaconda virtual environment. Table 1 shows the configuration of the training environment. Table 2 shows the corresponding hyperparameter settings.

[0041] Table 1 Configuration of the training environment ;

[0042] S203. Model Evaluation The recognition performance of the trained damage recognition model is evaluated based on the validation set. If the evaluation result meets the preset conditions, the damage recognition model is output. The recognition performance of the damage recognition model is evaluated based on at least one of the model recognition accuracy, recall rate, average precision value, average precision mean, and GFLOPs indicators.

[0043] Accuracy( ) Accuracy refers to the probability that all detected targets are correctly detected, which is expressed as: ; in, is the number of positive examples predicted correctly; is the number of negative examples predicted as positive examples.

[0044] Recall ) Recall refers to the probability of correct identification among all positive samples, which is expressed as: .

[0045] Average precision value ( ) Taking into account the changes in precision and recall, we characterize the precision-recall ratio ( Precision-Recall ) The area under the curve is an important indicator to measure the quality of an object detection model, which is expressed as: ; in, It is the point on the PR curve The corresponding value, and .

[0046] Mean average precision ( ) The average precision is a comprehensive indicator that can comprehensively reflect the precision, recall, and average precision value. Indicates that under the 50% loU threshold Higher The value reflects that the model is more accurate, which is expressed as: ; in, The value range of is [0,1], the closer to 1 the better, this indicator is the most important target detection indicator in the algorithm; Indicates the total number of detected target types.

[0047] GFLOPs metric ( ) The GFLOPs metric is an important indicator for measuring the computational complexity of a neural network model. It represents the number of billion floating-point operations performed per second. The higher the GFLOPs, the more calculations the model needs to perform during execution, which in turn places higher demands on hardware resources, which may affect training speed and inference efficiency.

[0048] like Figure 5 As shown, according to an embodiment of the present invention, the step of simulating the collected damage precursor image features and obtaining a preset number of simulation images includes the following steps: a1. Obtain a non-damaged precursor image and construct a simulated image background, wherein the non-damaged precursor image can be collected based on the non-damaged position on the surface of the precursor, or can be obtained by cropping the non-damaged position in the collected damaged precursor image. Since the collected non-damaged precursor image is limited by the different sizes of the cropping position, it is difficult for its overall size to reach the preset size. Therefore, at least one processing method of random scaling, random rotation, and random splicing is used to transform the cropped non-damaged precursor image, and then the non-damaged precursor images of different sizes can be transformed into a large-area non-damaged precursor image, and then the obtained large-area image is scaled and cropped to obtain a simulated image background of a preset size; wherein the preset size can be set to 3000×3000. In another embodiment of the present invention, in the process of randomly splicing different non-damaged precursor images, the spliced ​​images can be further superimposed together by dislocation superposition and / or scaling superposition to effectively eliminate the holes that may appear in the splicing position of the single-layer image, so as to ensure the display quality of the spliced ​​image.

[0049] a2. Select the size of the area used to simulate damage, where the side length of the selected area is M×M; for example, if M is 100, the side length of the selected area is 100×100.

[0050] a3. randomly generate M Gaussian functions, wherein the variance and mean of each Gaussian function are different; wherein the number of Gaussian functions is set to be determined by the side length of the region simulating the damage, thereby simulating the entire damaged region based on the constructed Gaussian function; a4. A matrix for simulating damage is superimposed based on M Gaussian functions, wherein the matrix is ​​randomly superimposed based on the type of damage in the damage precursor image feature to simulate the same type of damage; in this embodiment, the types of damage include: pores and cracks; Combination Figure 5 and Figure 6 As shown in the figure, if the damage type is porosity, it includes: According to the cluster characteristics of the damage, M Gaussian functions are randomly superimposed to generate a randomly fluctuating M×M dimensional matrix corresponding to the cluster characteristics of the damage, so as to simulate the same type of damage; Combination Figure 5 and Figure 7 As shown, if the damage type is crack, it includes: A vertical line is randomly generated, and the coordinates of M points are uniformly obtained based on the extension direction of the line; Randomly fine-tune the coordinate value of each point coordinate to make the straight line produce at least one change in thickness increase or decrease, distortion, and bending to simulate the random extension state of the crack; in this embodiment, the relative position of different points can be adjusted by adjusting the horizontal and vertical coordinates in the coordinates of each point, so as to achieve the corresponding thickness increase or decrease and / or bending, and the relative position of different points can be adjusted by adjusting the horizontal coordinate in the coordinates of each point, so as to achieve the corresponding distortion effect.

[0051] At least one of random rotation and random translation is used to adjust the extension direction and / or position of the simulated crack. In this embodiment, all point coordinates of the simulated crack are rotated and / or translated as a whole to enable further flexible adjustment of its position.

[0052] Based on the coordinates of the points in the simulated crack, M Gaussian functions are correspondingly superimposed to generate a matrix for simulating damage, so as to simulate the same type of damage.

[0053] Through the above settings, this scheme can effectively eliminate the influence of background pixels on the damage by randomly superimposing the corresponding matrix using Gaussian function to simulate the damage, and can directly obtain accurate damage morphology. Furthermore, when it is superimposed on the background, the damage can be directly mapped to the pixels of the background image, effectively avoiding the influence of redundant pixels on the edge of the damage, thereby effectively ensuring that the damage is more easily and realistically attached to the background image, greatly improving the authenticity of the simulated image.

[0054] a5. Scaling the matrix to (0, 255) according to the grayscale value range of the image, and randomly scaling the matrix to simulate damage of different sizes; in this embodiment, in the step of scaling the matrix to (0, 255) according to the grayscale value range of the image, the maximum value in the matrix is ​​taken out. and minimum value , each element in the matrix (denoted as ) are scaled by the conversion formula, which is expressed as: .

[0055] a6. Selecting a number of random positions within a preset range in the background of the simulated image to arrange a number of simulated damages to generate a simulated image. In this embodiment, the preset range selected in the background of the simulated image is In this embodiment, the selection of the random positions is based on at least one of mutual spacing, adjacency, and at least partial overlap. In this embodiment, in the process of arranging a number of simulated lesions in the simulated image background, the brightness and / or contrast of the simulated lesions can be randomly changed, thereby making the lesions in the simulated image background present light and dark changes, so that the generated simulated image background is closer to the real image, see Figure 8 .

[0056] According to one embodiment of the present invention, in step S201, in the step of annotating the collected damage precursor image and simulation image and saving them as a txt file, if the damage type is pores, the label is recorded in the txt file according to the size and position of the damage; if the damage type is a crack, an array is constructed according to the point coordinates of the crack, and the minimum circumscribed rectangle coordinates covering all the point coordinates are calculated, and the label is recorded in the txt file.

[0057] like Fig. 9 As shown, according to one embodiment of the present invention, the present invention provides a device applied to the aforementioned method for detecting surface damage precursors of additive manufacturing devices, comprising: a light emitting optical path 1, a collection optical path 2, a beam splitter 3, an objective lens group 4 and a host computer 5; wherein the collection optical path 2 and the objective lens group 4 are coaxially arranged; the beam splitter 3 is arranged between the collection optical path 2 and the objective lens group 4; the light emitting optical path 1 is arranged opposite to one side of the beam splitter 3. Thus, the beam splitter 3 receives the light emitted by the light emitting optical path 1 and transmits it to the objective lens group 4, and the beam splitter 3 receives the image returned by the objective lens group 4 and transmits it to the collection optical path 2. In this embodiment, the host computer 5 is connected to the collection optical path 2. Thus, the precursor to be detected is placed at the intersection position of the objective lens group 4, so that the collection optical path 2 can collect images of the precursor surface, and then the surface quality of the precursor is detected based on the connected host computer 5 to execute the aforementioned method for detecting surface damage precursors of additive manufacturing devices.

[0058] like Fig. 9 As shown, according to one embodiment of the present invention, the light emitting optical path 1 includes: a light source 11, a first condenser 12, a first aperture 13, a beam expander 14, a second aperture 15, a polarizer 16 and a second condenser 17, which are coaxially arranged in sequence, and a light source driver 18; in this embodiment, the second condenser 17 is arranged opposite to the beam splitter 3; in this embodiment, the collection optical path 2 includes: a CMOS sensor 21, a tube lens 22, a Bertrand lens 23 and an analyzer 24, which are coaxially arranged in sequence; wherein the analyzer 24 is arranged opposite to the beam splitter 3; the CMOS sensor 21 is connected to the host computer 5.

[0059] Through the above-mentioned settings, the present invention achieves multiple technical breakthroughs such as polarization control, beam quality improvement, and system stability enhancement through the coordinated optimization of coaxial layout and component functions, and transforms the series function of traditional optical elements into a coordinated enhancement. It is particularly suitable for scenarios with extremely high requirements for beam quality, polarization purity, and system stability, greatly improves the high-precision acquisition of images, and is more beneficial to further improving the detection accuracy of the present invention.

[0060] Through the above-mentioned settings, the present invention can fully realize the precise control of the polarization state, wherein the polarizer 16 is placed after the beam expander 14 and the second aperture 15, and the expanded light beam with uniform light spot can be polarized and filtered to eliminate non-polarized stray light, significantly improve the polarization purity, and is particularly suitable for scenes requiring high polarization degree (such as polarization-sensitive imaging or material detection). In addition, the coaxial layout can effectively reduce the offset of the polarizer and the optical axis, and avoid polarization state drift caused by mechanical vibration or temperature change. In addition, by setting the light-limiting effect of the first aperture 13 and the second aperture 15, the stray light at the edge of the beam after expansion can be filtered, and the surface reflected light (such as metal, glass and other highly reflective materials) can be further eliminated by the polarizer, thereby improving the imaging contrast and detection accuracy.

[0061] like Fig. 9 As shown, according to one embodiment of the present invention, the polarizer 16 can realize 360° free rotation along the axis; the analyzer 24 can realize 360° free rotation along the axis. Through the above configuration, the present invention breaks through the limitations of traditional fixed polarization elements by giving the polarizer 16 and the analyzer 24 the ability to rotate freely, realizes dynamic regulation of polarization states, multi-scenario adaptability and functional expansion, and upgrades polarization processing from static adaptation to dynamic coordination, providing a new idea for optical systems in high-precision imaging.

[0062] In this embodiment, the objective lens group 4 is a bi-telecentric achromatic structure objective lens, and its working distance is about 20 mm (such as 20±2 mm), the numerical aperture is 0.25, and the magnification is 10 times.

[0063] like Fig. 9 As shown, according to one embodiment of the present invention, the light source 11 is a halogen lamp, wherein the light source 11 can be a 12V 30W halogen lamp. In this embodiment, the light source 11 has adjustable brightness to adapt to different materials of the precursor to be tested.

[0064] like Fig. 9 As shown, according to one embodiment of the present invention, the size of the CMOS sensor 21 is 1 inch, and the pixel size thereof is 2.4 microns.

[0065] In order to further illustrate the detection effect of this scheme, further examples are given in conjunction with the accompanying drawings.

[0066] In this embodiment, the damage recognition model of this scheme is obtained based on the above steps. Then, in this scheme, the training results of the model on the mixed data set are analyzed from four perspectives: quantitative experiment, ablation experiment, model loss comparison and detection performance of different damage precursors. First, in the quantitative experiment, the damage recognition model of this scheme is compared with the YOLO series models commonly used in recent years, and the reason why YOLOv11 is finally selected as the baseline in this study is analyzed. Secondly, in the ablation experiment, the effectiveness of the improved module of this study is verified by combining the data of the experiments on different improvement points. Subsequently, the loss of the YOLOv11 model and the damage recognition model of this scheme during the training process is analyzed, which proves the improvement of the stability and convergence of the improved model. Finally, in order to highlight the actual performance of the improved model, we selected different models to test on the collected damage precursor images.

[0067] Quantitative analysis The YOLOv11-LSF model (i.e., damage identification model) proposed in this scheme is compared with other networks in the YOLO series, including YOLOv3, YOLOv5, YOLOV9, YOLOv10, and YOLOv11. The experimental results of different models are shown in Tables 3 and Fig.10 shown.

[0068] Table 3 Comparison results of the YOLOv11-LSF model (i.e., damage identification model) of this solution with other networks in the YOLO series

[0069] Table 3 compares the performance of different YOLO versions in terms of the GFLOPs indicator. The GFLOPs indicator of YOLOv3 is as high as 282.2, indicating that it has a high computational complexity. In contrast, YOLOv5, YOLOv9, YOLOv10, and YOLOv11 perform significantly better than YOLOv3 in terms of the GFLOPs indicator. Specifically, the GFLOPs indicator of YOLOv5 is 23.8, the GFLOPs indicator of YOLOv9 is 26.7, and the GFLOPs indicator of YOLOv10 is 24.4. YOLOv11 has the lowest computational complexity, with a GFLOPs indicator of only 21.3. It can be seen that the developers have continuously optimized the network architecture and reduced the computational complexity during the iteration of the YOLO series networks, so that the network can better adapt to the needs of real-time reasoning and low-power devices. At the same time, from Fig.10 It can be seen that the histogram drawn by the training indicators of the scheme fluctuates relatively smoothly. The training results of the YOLO series network models selected in this scheme on the mixed data set in the experiment are relatively close in terms of model accuracy and recall rate, and the average accuracy of the models is not very different. It reached 0.963, which is the model with the highest accuracy except the improved model of this solution, while the lowest one is YOLOv10. It reached 0.944, which is 1.9% different from YOLOv9. Finally, considering the lightweightness of YOLOv11 and its latest version, it was selected as the baseline for the study. As can be seen from the figure, all indicators in the training results of YOLOv11 are inferior to other selected network structures except for model complexity, because other networks may consume more computing resources to achieve a higher accuracy. However, after the improvement and optimization of YOLOv11 in this solution, it has achieved the best results in all indicators while taking into account the lightweight model complexity, and has achieved a good balance between accuracy and model complexity.

[0070] Ablation experiment In order to intuitively feel the impact of different modules on the accuracy of the model, a series of ablation experiments were conducted based on YOLOv11 to prove the effectiveness of each module. First, experiments were conducted using YOLOv11s as the benchmark to obtain the detection results of the benchmark model as the benchmark of the experiment, and then the effectiveness of the benchmark model was verified by making different improvements to the benchmark model. First, the C2PSA module in the YOLOv11 backbone network was improved, and the rest remained unchanged. The experiment was conducted after this modification to ensure that the results were not affected by other factors. Similarly, after verifying all the improvement methods separately, all methods were combined to obtain the final YOLOv11-LSF model, thereby verifying the effectiveness of the YOLOv11-LSF model.

[0071] In order to improve the network model's feature extraction of target objects and suppression of background information, this scheme introduces an attention mechanism in the C2PSA module of the backbone network to improve the recognition ability of the network model. In order to verify the superiority of the LSKA attention module in the YOLOv11-LSF model proposed in this scheme, different attention modules are embedded in the same position of the network model, and comparative experiments are carried out.

[0072] Table 4 Comparison of results of different attention mechanisms

[0073] From the experimental results in Table 4, we can see that the model with embedded attention module does not significantly increase the number of parameters and computation. In contrast, the C2PSA_LSKA module proposed in this paper is the most effective. It is 1.1% higher than the YOLOv11 model, 1%, 0.8%, 15.5% and 1.5% higher than the CBAM module, CA module, GAM module and ECA module respectively. At the same time, compared with LSKA, other attention mechanisms have higher accuracy, recall and The improvement effect is not significant or has decreased to varying degrees. For example, after the introduction of the CBAM attention mechanism, the accuracy of YOLOv11, and The improvements were only 0.6%, 0.1%, and 1.2% respectively, but the recall rate of the model decreased by 0.07%. Therefore, this solution selected the LSKA attention mechanism. Fig.11 The Heatmap corresponding to each attention mechanism selected for this solution clearly shows that YOLOv11 cannot accurately detect all damage precursors in the image without the introduction of the attention mechanism, and there is a problem of missed detection. Fig.11 (b) to Fig.11 (e) is the Heatmap obtained by other attention mechanisms selected in this scheme. It can be seen that the Heatmap of other attention mechanisms is relatively Fig.11 (f) The positioning of the damage precursor is not accurate enough, which is most obvious in the GAM attention mechanism. In summary, this scheme can enhance the model's ability to focus on the damage precursor area and suppress background information interference by introducing the LSKA attention mechanism. This can be confirmed by the diffusion of the network's area of ​​interest in the Heatmap with the LSKA attention mechanism.

[0074] Table 5 Results based on different feature fusion networks

[0075] In this solution, the effects of four feature fusion networks, BiFPN, RepGFPN, ASF-YOLO and Slim-neck, are analyzed. As shown in Table 5, compared with the original feature fusion network of YOLOv11, the Slim-neck selected in this solution not only and The results are 1.3% and 2.9% higher, respectively, and it also successfully reduces the model complexity by 0.2. The reason is that this solution uses GSConv and VoV-GSCSP structures in the neck part of Slim-neck, which not only reduces the complexity of convolution operations, but also more effectively integrates the feature map information of different stages, so that the training results not only reduce the amount of calculation and complexity of the model, but also maintain satisfactory accuracy. Moreover, it can be clearly seen that the experimental results of selecting Slim-neck are better than those of selecting other feature fusion networks. Compared with BiFPN, RepGFPN and ASF-YOLO, they are improved by 1%, 2.1% and 1.6% respectively, and Slim-neck is selected for the model. The improvement is more significant, and compared with BiFPN, RepGFPN and ASF-YOLO, it is improved by 1.6%, 5.4% and 3.1% respectively. This also proves that the selection of Slim-neck helps to enhance the model's adaptability to targets of different scales and is conducive to the application of the detection model in practical problems. Therefore, due to the excellent performance of Slim-neck, this solution selects Slim-neck to optimize the neck network of the model in this solution.

[0076] Based on the above experiments on different attention mechanisms and feature extraction networks, this scheme also conducted an ablation experiment on the effectiveness of the combination of LSKA attention mechanism and Slim-neck to test the effectiveness of the two working together. The experimental results are shown in Table 6 and Fig.12 .

[0077] Table 6 Ablation experiment results

[0078] from Fig.12 It can be easily seen that the convergence speed of the original YOLOv11 network model during training is not very ideal. For the four indicators selected by this solution, the original YOLOv11 network basically needs to reach at least 40 rounds during training before it starts to converge. Based on the optimization and improvement of this solution, the accuracy, recall rate, and The training curve convergence speed is significantly accelerated, which is Fig.12 (a) with Fig.12 It can be clearly seen from the training curve of (c) that the training curve begins to stabilize after the first 20 rounds of training. It can also be seen that the improved scheme proposed in this study is in the best position in each training curve. As can be seen from Table 6, compared with YOLOv11, after the LSKA attention mechanism is introduced into the backbone network, The improvement was 1.1%, which significantly improved the accuracy of the model, but at the same time increased the GFLOPs index by 0.7, resulting in a higher model complexity. When Slim-neck was introduced, the GFLOPs index dropped to 21.7, but It continued to improve and reached 0.965, which reduced the computing resources of the model without losing accuracy. After all the improvements made in this solution, the accuracy of the YOLOv11-LSF model increased by 1.6% and the recall rate increased by 1.6% compared with YOLOv11. It increased by 1.5%. It is increased by 2.8%. At the same time, it can be seen from Table 6 that the improvement ideas proposed in this scheme have improved the detection accuracy of the model for both types of damage precursors, among which the detection accuracy of the crack The improvement was 2.8%, and the effect was quite obvious. From the above experimental results, it can be seen that this scheme significantly improves the detection performance while taking into account the lightweight model, making the YOLOv11 network more suitable for the target detection task of the surface damage precursor dataset of additive manufacturing devices.

[0079] Model loss graph comparison In order to further verify the effectiveness of this scheme on model convergence, Fig.13 The loss curves of the YOLOv11 model and the YOLOv11-LSF model of this solution during the training process are shown respectively. By comparing the loss change graphs of the two models during the training process, it can be clearly seen that the loss of the YOLOv11 model is always greater than the loss of the YOLOv11-LSF model of this solution. This is most obvious on the test set. The loss value of the YOLOv11-LSF model of this solution has reached the loss value of the YOLOv11 model after the training is completed at about the 10th epoch. And it can be seen that the loss of the YOLOv11-LSF model of this solution on the test set begins to stabilize at about the 30th round, while the loss value of YOLOv11 begins to stabilize after about 45 rounds. Finally, the loss values ​​of the YOLOv11-LSF model of this solution on the training set and the test set reached 0.66538 and 0.73491 respectively, while the loss values ​​of the YOLOv11 model on the training set and the test set were 0.70689 and 0.87955 respectively. Therefore, it is fully proved that the YOLOv11-LSF model of the present invention has been significantly improved in stability and convergence.

[0080] Comparison of model detection results In order to more intuitively prove that the YOLOv11-LSF model of this scheme is effective compared with other models, from the perspective of qualitative analysis, two specific representative images containing damage precursors were selected from the test set. Fig.14 , Fig.15 and Fig.16 The following are the actual detection results of several better models for the damage precursors on the workpiece surface. It should be noted that these six columns represent the original image, YOLOv3, YOLOv5, YOLOV10, YOLOV11 and the prediction results of our model.

[0081] from Fig.14 , Fig.15 and Fig.16Comparing the detection results of each model, YOLOv11 has misdetection when detecting pores, and misdetects pores with similar lengths to Li Wen as cracks, while the YOLOv11-LSF model of this scheme does not have such a situation. Among the many selected models, the YOLOv11-LSF model of this scheme has the highest confidence in pore detection and a more accurate detection frame; at the same time, it can be clearly seen from the figure that the model proposed in this study is superior in crack detection. Other models in the selected area have the problem of detecting one crack as multiple cracks when detecting cracks, while the YOLOv11-LSF model of this scheme can accurately identify each crack without multiple detections or misdetections. It can be seen that the YOLOv11-LSF model of this scheme can adapt to targets of different scales. The reason for the analysis is that the YOLOv11-LSF model of this scheme uses the C2PSA_LKSA module, which enables it to adapt to multi-scale targets, thereby achieving the effect of accurate detection of cracks and pores at the same time. This also further proves that the YOLOv11-LSF model proposed in this study has strong multi-scale feature extraction and fusion capabilities.

[0082] In summary, this solution has the following advantages: Through quantitative experimental analysis, this scheme compares the YOLOv11-LSF model creatively proposed in this scheme with YOLOv3, YOLOv5, YOLOv9, YOLOv10, and YOLOv11. The YOLOv11-LSF model proposed in this scheme has the highest detection accuracy and the best comprehensive performance, and has a certain improvement in the accuracy of various types of damage precursors, further verifying the feasibility and practicality of the YOLOv11-LSF model of the present invention in the field of surface damage precursor detection in additive manufacturing.

[0083] The effectiveness of each module in the YOLOv11-LSF model was verified through ablation experiments. That is, the C2PSA module was improved in the original network structure, the cross-level local network VoV-GSCSP module was designed using GSConv and one-time aggregation methods, and the Slim-neck model was constructed to achieve the best performance. Finally, compared with YOLOv11, the recall rate of the YOLOv11-LSF model of this solution increased by 1.6%, and the accuracy rate increased by 1.6%. It increased by 1.5%. An increase of 2.8%.

[0084] The above contents are merely examples of specific solutions of the present invention. For devices and structures not described in detail therein, it should be understood that they can be implemented by adopting general devices and general methods available in the art.

[0085] The above is only one solution of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting surface damage precursors of additive manufacturing devices, characterized in that: The following steps are involved: S1. Collect target precursor images on the surface of additive manufacturing devices; S2. Inputting the target precursor image into a pre-trained damage recognition model, and determining whether there is damage in the target precursor image based on the damage recognition model; The damage identification model is a YOLOv11-LSF model, which includes: a backbone network, a neck network connected to the backbone network, and a head network connected to the neck network; The backbone network is constructed by replacing the C2PSA module in the backbone network of the YOLOv11 model with the C2PSA_LKSA module; wherein the C2PSA_LKSA module is obtained by introducing the C2PSA module of the LSKA attention mechanism; The neck network is constructed by replacing the C3K2 module in the neck network of the YOLOv11 model with a VoV-GSCSP module; wherein the VoV-GSCSP module is constructed based on the Slim-neck concept.

2. The method for detecting surface damage precursors of additive manufacturing devices according to claim 1, characterized in that: The C2PSA_LKSA module includes: a first Conv layer, a plurality of PSABlock layers, a first Concat layer, and a second Conv layer connected in sequence; The first Conv layer is connected to the first Concat layer; The PSABlock layer includes: an LSKA attention mechanism layer, a third Conv layer and a fourth Conv layer connected in sequence.

3. The method for detecting surface damage precursors of additive manufacturing devices according to claim 2, characterized in that: The backbone network includes: a first main network Conv layer, a second main network Conv layer, a first main network C3k2 layer, a third main network Conv layer, a second main network C3k2 layer, a fourth main network Conv layer, a third main network C3k2 layer, a fifth main network Conv layer, a fourth main network C3k2 layer, an SPPF layer and a C2PSA_LKSA module connected in sequence; The first main network C3k2 layer and the second main network C3k2 layer are respectively configured as: C3K2 c3k=False; The third main network C3k2 layer and the fourth main network C3k2 layer are respectively configured as: C3K2 c3k=True.

4. The method for detecting surface damage precursors of additive manufacturing devices according to claim 3, characterized in that: If the main network C3k2 layer is configured as C3K2 c3k=False, the main network C3k2 layer includes: a fifth Conv layer, a first Split layer, N Bottleneck layers, a second Concat layer, and a sixth Conv layer connected in sequence; If the main network C3k2 layer is configured as C3K2 c3k=True, the main network C3k2 layer includes: the seventh Conv layer, the second Split layer, N C3k layers, the third Concat layer and the eighth Conv layer connected in sequence; The C3k layer is configured with Bottleneck layers stacked N times.

5. The method for detecting surface damage precursors of additive manufacturing devices according to claim 4, characterized in that: The damage identification model is trained based on the following steps, which include: S201. Dataset acquisition Collect the damage precursor image of the surface of the additive manufacturing device, and simulate it according to the characteristics of the collected damage precursor image to obtain a preset number of simulation images, annotate the collected damage precursor image and simulation image respectively, and save them as txt files to obtain the mixed data set required for model training; Dividing the mixed data set into a training set and a validation set in a preset ratio; S202. Model training Deploy a training environment for the damage identification model, and input the training set into the damage identification model for training; S203. Model Evaluation The recognition performance of the trained damage recognition model is evaluated based on the validation set. If the evaluation result meets the preset conditions, the damage recognition model is output. The recognition performance of the damage recognition model is evaluated based on at least one of the accuracy, recall, average precision value, average precision mean, and GFLOPs indicators of model recognition.

6. The method for detecting surface damage precursors of additive manufacturing devices according to claim 5, characterized in that: The step of simulating the damaged precursor image according to the collected features and obtaining a preset number of simulated images includes the following steps: a1. Obtaining a damage-free precursor image and constructing a simulated image background, wherein the damage-free precursor image is transformed by at least one of random scaling, random rotation, and random splicing, and the obtained image is scaled and cropped to obtain the simulated image background of a preset size; a2. Select the size of the region used to simulate damage, where the side length of the selected region is M×M; a3. Randomly generate M Gaussian functions, wherein the variance and mean of each Gaussian function are different; a4. Based on the M Gaussian functions, a matrix for simulating damage is superimposed, wherein the matrix is ​​randomly superimposed based on the type of damage in the damage precursor image feature to simulate the same type of damage; a5. Scaling and mapping the matrix to (0,255) according to the grayscale value range of the image, and randomly scaling the matrix to simulate damage of different sizes; a6. Selecting several random positions within a preset range in the background of the simulated image to arrange a number of simulated lesions to generate the simulated image, wherein in the process of arranging a number of simulated lesions in the background of the simulated image, the brightness and / or contrast of the simulated lesions are randomly changed.

7. The method for detecting surface damage precursors of additive manufacturing devices according to claim 6, characterized in that: In step a4, the matrix is ​​randomly superimposed based on the type of damage in the damage precursor image feature to simulate the same type of damage, and the types of damage include: pores and cracks; If the damage type is porosity, it includes: According to the cluster characteristics of the damage, the M Gaussian functions are randomly superimposed to generate a randomly fluctuating M×M dimensional matrix corresponding to the cluster characteristics of the damage, so as to simulate the same type of damage; If the damage type is crack, it includes: A vertical straight line is randomly generated, and M point coordinates are uniformly obtained based on the extension direction of the straight line; Randomly fine-tune the coordinate value of each point coordinate so that the straight line undergoes at least one of thickness increase or decrease, distortion, and bending to simulate a random extension state of a crack; At least one of random rotation and random translation is used to adjust the extension direction and / or position of the simulated crack; The M Gaussian functions are correspondingly superimposed based on the coordinates of the points in the simulated cracks to generate a matrix for simulating damage, so as to simulate the same type of damage.

8. A device applied to the method for detecting surface damage precursor of an additive manufacturing device according to any one of claims 1 to 7, characterized in that: include: Light emitting optical path (1), light collecting optical path (2), beam splitter (3), objective lens group (4) and host computer (5); The collection optical path (2) and the objective lens group (4) are coaxially arranged; The beam splitter (3) is arranged between the collection light path (2) and the objective lens group (4); The light emitting optical path (1) is arranged opposite to one side of the beam splitter (3); The beam splitter (3) receives the light emitted by the light emitting optical path (1) and transmits it to the objective lens group (4); and the beam splitter (3) receives the image returned by the objective lens group (4) and transmits it to the collection optical path (2); The host computer (5) is connected to the collection optical path (2).

9. The device according to claim 8, characterized in that The light emitting optical path (1) comprises: a light source (11), a first condenser (12), a first aperture (13), a beam expander (14), a second aperture (15), a polarizer (16) and a second condenser (17), which are coaxially arranged in sequence, and a light source driver (18); The second condenser (17) is arranged opposite to the beam splitter (3); The collection optical path (2) comprises: a CMOS sensor (21), a tube lens (22), a Bertrand lens (23) and an analyzer (24) which are coaxially arranged in sequence; The polarizer (24) is arranged opposite to the beam splitter (3); The CMOS sensor (21) is connected to the host computer (5).

10. The device according to claim 9, characterized in that The polarizer (16) can rotate freely along the axial direction; The polarizer (24) can rotate freely along the axial direction; The objective lens group (4) is a double telecentric achromatic structure objective lens, and its working distance is 20±2 mm, the numerical aperture is 0.25, and the magnification is 10 times; The light source (11) is a halogen lamp; The size of the CMOS sensor (21) is 1 inch, and its pixel size is 2.4 micrometers.

Citation Information

Patent Citations

  • Aircraft skin damage detection method and system based on FC-YOLO network model

    CN118314388A

  • Road damage detection method based on improved YOLOv8

    CN118521869A

  • Metasurface device preparation and test integrated system and metasurface device preparation method

    CN118937282A

  • Electric arc additive manufacturing macroscopic surface defect detection method based on YOLOv8 improvement

    CN119090802A

  • X-ray image contraband detection method based on multi-scale feature fusion

    CN119295886A

Cited By

  • Steel surface defect detection method and device based on YOLO11n improvement

    CN120088240A