A target detection method for strongly light-absorbing materials

By generating a light source network model and using an improved YOLOv8 model to simulate supplementary lighting and extract features from the surface of highly light-absorbing materials, the problems of difficulty in detecting features and low accuracy in existing technologies are solved, and high-precision cross-scale defect detection is achieved.

CN118298259BActive Publication Date: 2025-10-28NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410485508.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2025-10-28
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

Existing technologies suffer from difficulties in feature extraction, low detection accuracy, low sensitivity to defects of different sizes, and low robustness to data from smaller defects when detecting surface defects in highly light-absorbing materials.

Method used

A generative light source network model is used to simulate supplemental lighting for images. Combined with the Ham-SDI strong light-absorbing material surface defect detection model, the Wasserstein distance is used as the loss function, and cross-scale defect detection is performed through an improved YOLOv8 model. ODConv full-dimensional dynamic convolution and LSKNet selective large convolution kernels are introduced to optimize model parameters.

Benefits of technology

It improves the accuracy and cross-scale detection capability of surface defects in strong light-absorbing materials, meets the needs of real-time monitoring, and enhances the detection accuracy and robustness of defects of different sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118298259B_ABST
    Figure CN118298259B_ABST
Patent Text Reader

Abstract

This invention relates to a target detection method for strongly light-absorbing materials, comprising: simulating supplemental lighting on an acquired original image using a generative light source network model to obtain a supplemented image; acquiring surface defect data from the supplemented image and labeling the defect data into a dataset for training and testing; constructing a surface defect detection model for strongly light-absorbing materials, inputting the supplemented image dataset used for training into the defect detection model to obtain a preliminary training model; for cross-scale defects, using distance as a loss function, optimizing the training model and updating its weights to obtain a trained defect detection model; and applying the evaluated defect detection model to a new supplemented image to obtain the surface defect detection result for the strongly light-absorbing material. This invention's target detection framework has higher inference efficiency, and the simulated supplemental lighting on the acquired image significantly improves detection accuracy, making it suitable for cross-scale defect detection on the surface of strongly light-absorbing materials in most industrial scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machining and industrial visual inspection technology, and in particular to a target detection method for strongly light-absorbing materials. Background Technology

[0002] In the field of modern mechanical manufacturing, strong light-absorbing materials have a wide range of applications, including automotive engineering, aerospace engineering, and marine engineering. On one hand, they improve the safety of spacecraft. For example, during atmospheric reentry, high-speed friction generates extremely high temperatures, which strong light-absorbing materials can effectively absorb and disperse, protecting the spacecraft's interior from damage. In the automotive industry, strong light-absorbing materials are used for engine heat insulation. On the other hand, because of their ability to effectively absorb and suppress light reflection, scattering, and transmission, strong light-absorbing materials play a crucial role in stealth technology, reducing the probability of radar detection by aircraft and ships and improving the stealth and security of targets.

[0003] However, during the manufacturing and application of highly light-absorbing materials, surface defects caused by processing techniques and human factors are inevitable. These surface defects not only reduce the light absorption performance of the material but may also have a significant impact on the mechanical properties of the components. However, existing target detection algorithms have high requirements for the lighting conditions of the detection environment and the reflectivity of the material, and therefore perform poorly in the detection of highly light-absorbing materials.

[0004] In summary, exploring a surface defect detection scheme for highly light-absorbing materials is a crucial task. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a target detection method for strongly light-absorbing materials. It solves the problems of difficulty in feature extraction for surface defects in strongly light-absorbing materials, low detection accuracy, low sensitivity to defects of different sizes, and low robustness to small defects on the surface of strongly light-absorbing materials. To address the aforementioned problems, this invention can achieve real-time monitoring of surface defects in strongly light-absorbing materials through a surface defect detection model. Furthermore, compared to other target detection frameworks, this invention employs a generative light source network model to simulate supplementary lighting on the acquired images, significantly improving detection accuracy. The target detection framework proposed in this invention has higher inference efficiency and is applicable to cross-scale defect detection on the surface of strongly light-absorbing materials in most industrial scenarios.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a target detection method for strongly light-absorbing materials, comprising the following steps:

[0007] S1. Image acquisition is performed on the surface of the defective strong light-absorbing material. The acquired original image is simulated and supplemented with light using a generator light source network model to obtain the supplemented image.

[0008] S2. Collect surface defect data of the image after supplemental lighting, and label the defect data into a dataset for training and testing;

[0009] S3. Construct a surface defect detection model for Ham-SDI strong light-absorbing materials. Input the image dataset after supplementary lighting used for training into the defect detection model to obtain a preliminary training model.

[0010] S4. For cross-scale defects, Wasserstein distance is used as the loss function to optimize the training model and update the weights, so as to obtain a well-trained defect detection model.

[0011] S5. Use the image dataset after supplemental lighting for testing to evaluate the performance of the trained defect detection model. Apply the evaluated defect detection model to the new image after supplemental lighting to obtain the surface defect detection results of the strongly light-absorbing material.

[0012] Furthermore, in step S1, the generated light source network model specifically includes a Gaussian smoothing filter module, a SAGAN self-attention generative adversarial network module, and a BicycleGAN bidirectional recurrent generative adversarial network module.

[0013] Furthermore, in step S1, the specific process includes the following steps:

[0014] S11. Use a two-dimensional industrial camera to acquire images of the surface of a defective, highly light-absorbing material.

[0015] S12. Apply Gaussian smoothing filter to the original image data to remove noise points in the defective image, obtaining the filtered and denoised image; the formula for Gaussian smoothing filter is as follows:

[0016]

[0017] Where i,j represent the coordinates of each point in the Gaussian convolution kernel, H i,j This represents the image after filtering and denoising; k represents the size of the Gaussian convolution kernel, and σ represents the standard deviation of the Gaussian distribution. The larger σ is, the better the denoising ability, but the more blurred the image becomes.

[0018] S13. The filtered and denoised image is first input into the SAGAN self-attention generative adversarial network module. The discriminator executes a global image structure with complex geometric constraints through the self-attention mechanism, the generator generates fine feature details, and the discriminator implements geometric constraints, thereby generating fine detail features of the image of the strongly light-absorbing material.

[0019] S14. The refined detail features of the generated image of the strongly absorbing material are fed into the BicycleGAN bidirectional recurrent generative adversarial network module. This module is a combination of cVAE-GAN variational generative adversarial network and cLR-GAN conditional generative adversarial network, consisting of a generator, two discriminators, and an encoder. In cVAE-GAN, the image of the non-absorbing material under the experimental light source is encoded to provide real samples of the potential vectors and from which samples are taken. In cLR-GAN, the generator first generates pseudo images from random noise, then the pseudo images are encoded, and finally the difference between them and the input random noise is calculated. By comparing and training with the image of the non-absorbing material under the experimental light source and the image of the strongly absorbing material under the same light source, the image after supplementing the light on the simulated strongly absorbing material is finally obtained.

[0020] Further, in step S2, the surface defect data of the image after supplemental lighting is collected, specifically including: defining the types of images of the surface defects of the strong light-absorbing material after supplemental lighting. The types of surface defects of the strong light-absorbing material are divided into three categories: circular, strip-shaped, and irregular. After defining the types of defects, the surface defects of the strong light-absorbing material are labeled with data.

[0021] Further, in step S3, a surface defect detection model for Ham-SDI strong light-absorbing materials is constructed, specifically including: the surface defect detection model for Ham-SDI strong light-absorbing materials is an improved YOLOv8 model, multi-scale feature fusion is introduced in the forward propagation part of the YOLOv8 network structure, the convolutional module in the YOLOv8 network architecture is replaced by ODConv full-dimensional dynamic convolution, LSKNet selective large convolutional kernel is introduced in the feature extraction module, and finally WIOUv3 is used as the loss function to optimize the model parameters.

[0022] Furthermore, the formula for the full-dimensional dynamic convolution of ODConv is expressed as: y = (α w1 ⊙α f1 ⊙α c1 ⊙α s1 ⊙W1+…+α wn ⊙α fn ⊙α cn ⊙α sn ⊙W n )*x;

[0023] Where y represents the output image, α wi ∈R represents the scalar of interest for the convolution kernel; α si ∈R k*k , and This represents three newly introduced points of interest, each along the convolution kernel W. iThe k*k dimension of the kernel space, c in Input channel dimension and c out Output channel dimension calculation, ⊙ represents multiplication along different dimensions of the kernel space, where α wi α si α ci and α fi Through the multi-head attention module π i (x) is calculated, where x represents the input image.

[0024] Furthermore, in step S3, LSKNet selective large convolutional kernels are introduced into the feature extraction module. Specifically, LSKNet is a repeatable stackable block in the backbone network. Each LSK Block includes two residual sub-blocks, namely, a large kernel selection sub-block and a feedforward network sub-block. LSKNet selective large convolutional kernels are introduced into the back of the backbone network of the Ham-SDI strong light-absorbing material surface defect detection model to dynamically adjust the receptive field and effectively handle the complex environmental information in the fall detection scenario.

[0025] Furthermore, the use of WIOUv3 as the loss function to optimize model parameters specifically includes: the WIOU loss function first measures the overlap between two boxes by calculating the IoU (Intersection over Union) ratio, then weights them using the minimum weight of each part in the predicted box and the ground truth box to accurately describe the contribution of each part, and finally normalizes the weighted IoU value using the maximum weight of each part in the two boxes, as shown in the following formula:

[0026]

[0027] Where C represents the total number of categories; w c It is the weight of category c; IoU c It is the crossover union ratio of category c; the numerator is the sum of the weighted IoU of each category, and the denominator is the sum of the weights of all categories.

[0028] Further, in step S3, the image dataset after supplemental lighting is input into the defect detection model for training to obtain a preliminary training model. The specific process includes the following steps:

[0029] S31. In the backbone network, the image after supplemental lighting is input into the defect detection model. After feature extraction through a series of ODConv convolutional layers and feature enhancement through the C2f module, the network's perception ability is improved through LSKNet selective large convolutional kernels. Finally, a series of pooling cascades are performed through the SPPF feature fusion layer to extract the surface defect features of the strongly light-absorbing material.

[0030] S32. In the Neck network, there are top-down and bottom-up parts. The top-down part first upsamples the surface defect features of the strong light-absorbing material extracted from the Backbone network and splices them with the coarser-grained feature map output by the C2f feature extraction layer in the middle section of the Backbone network to achieve top-down feature fusion enhancement.

[0031] S33. After two rounds of feature fusion enhancement, the bottom-level feature map from top to bottom is processed by OCDconv full-dimensional dynamic convolution to obtain richer feature representation. The feature map after full-dimensional dynamic convolution is connected and fused with the feature map output by the C2f feature extraction layer from the previous top to bottom for further feature enhancement. Finally, it is connected and fused with the surface defect features of the strongly light-absorbing material extracted from the last layer of the backbone network. Finally, the Head detection head outputs three feature maps of different sizes, which are used to detect large, medium and small defects in the tested image, respectively.

[0032] Furthermore, in step S4, the use of Wasserstein distance as the loss function specifically includes the following steps:

[0033] S401, Set the horizontal bounding box R = (c x ,c y The model is represented as a two-dimensional Gaussian distribution N(μ,∑), where c, w, h) are represented as c. x ,c y ,w,h represent the center coordinates, width, and height of the target bounding box along the x and y axes, respectively, where μ and ∑ represent the mean vector and covariance matrix, respectively;

[0034] S402. Perform Gaussian modeling on the true defect bounding box and the predicted bounding box of the defect to be detected. Convert the similarity between the true defect bounding box and the predicted bounding box into the distribution distance between two Gaussian distributions. For the true target box with Gaussian distribution μ1=N(m1,∑1) and the predicted target box with Gaussian distribution μ2=N(m2,∑2), calculate the second-order Wasserstein distance between them. Where m1 and ∑1 represent the mean vector and covariance matrix of the true target box, respectively, and m2 and ∑2 represent the mean vector and covariance matrix of the predicted target box, respectively.

[0035] S403, For the true target bounding box and predicted target boxes Modeling a Gaussian distribution N A and N B ,in, These represent the x and y coordinates of the center of the true target bounding box A, as well as its length and width. These represent the x and y axis center coordinates and the length and width of the predicted bounding box B, respectively. The Wasserstein distance between them can be further simplified to...

[0036]

[0037] S404. The exponentially normalized form of the defect detection model is used as the localization loss function for the surface defect detection model of strong light-absorbing materials. The model is trained based on gradient descent. The formula for the localization loss function of the defect detection model is as follows:

[0038]

[0039] Where C is the average size of the defect in the image of the strongly absorbing material, and Loss represents the localization loss function of the defect detection model.

[0040] By employing the above technical solution, the present invention provides a target detection method for strongly light-absorbing materials, which has at least the following beneficial effects:

[0041] This invention provides a method for detecting surface defects in strongly light-absorbing materials. It simulates illumination on images captured of strongly light-absorbing material surfaces using a generative light source network model, highlighting the characteristics of surface defects. Compared to general target detection frameworks, the improved YOLOv8 model proposed in this invention has stronger detection capabilities for defects across scales. Furthermore, replacing the original convolutional module with OCDconv significantly reduces computational load, meeting the needs of real-time monitoring, and improves detection accuracy. Finally, by using WIOU, which incorporates weighting concepts, as the loss function, the similarity between the predicted bounding box and the real target can be measured more accurately, especially when multiple targets are present in the same image, thus improving detection accuracy. This invention effectively solves the problems of existing technologies, such as difficulty in feature extraction for detecting surface defects in strongly light-absorbing materials, low detection accuracy, low sensitivity to defects of different sizes, and low robustness to small defects on strongly light-absorbing material surfaces. Attached Figure Description

[0042] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0043] Figure 1 This is a flowchart of the surface defect detection method for strong light-absorbing materials according to the present invention;

[0044] Figure 2 This is a diagram showing the types of surface defects in strongly light-absorbing materials as defined in this invention.

[0045] Figure 3This is a framework diagram of the generative light source network model constructed in this invention;

[0046] Figure 4 A framework diagram for cross-scale defect detection of strong light-absorbing material surfaces based on the improved YOLOv8, established for this invention. Detailed Implementation

[0047] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.

[0048] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0049] Please refer to Figures 1-4 This illustration shows a specific implementation of this embodiment. This embodiment uses a generative light source network model to simulate supplementary lighting on images captured of strongly light-absorbing material surfaces, highlighting the characteristics of defects on the surface of strongly light-absorbing materials. Compared to general target detection frameworks, the improved YOLOv8 model proposed in this invention has stronger detection capabilities for cross-scale defects. At the same time, using OCDconv to replace the original convolutional module significantly reduces the computational load, meeting the needs of real-time monitoring, and improves detection accuracy. Finally, by using WIOU, which introduces the concept of weights, as the loss function, the similarity between the predicted bounding box and the real target can be measured more accurately, especially when there are multiple detection targets in the same image, which can improve detection accuracy.

[0050] Please refer to Figure 1 This embodiment proposes a target detection method for strongly light-absorbing materials, which includes the following steps:

[0051] S1. Image acquisition is performed on the surface of a defective, highly light-absorbing material. The acquired original image is then simulated using a generator light source network model to obtain a supplemented image. For example... Figure 3 The diagram shown is a framework diagram of the generative light source network model constructed in this invention.

[0052] As a preferred embodiment of step S1, the generation of the light source network model in step S1 specifically includes a Gaussian smoothing filter module, a SAGAN self-attention generative adversarial network module, and a BicycleGAN bidirectional recurrent generative adversarial network module; the specific process includes the following steps:

[0053] S11. Use a two-dimensional industrial camera to acquire images of the surface of a defective, highly light-absorbing material.

[0054] S12. Apply Gaussian smoothing filter to the original image data to remove noise points in the defective image, obtaining the filtered and denoised image; the formula for Gaussian smoothing filter is as follows:

[0055]

[0056] Where i,j represent the coordinates of each point in the Gaussian convolution kernel, H i,j This represents the image after filtering and denoising; k represents the size of the Gaussian convolution kernel, and σ represents the standard deviation of the Gaussian distribution. The larger σ is, the better the denoising ability, but the more blurred the image. σ is empirically taken as 1.4, and the convolution kernel size is 5*5.

[0057] S13. The filtered and denoised image is first input into the SAGAN self-attention generative adversarial network module. The discriminator executes a global image structure with complex geometric constraints through the self-attention mechanism, the generator generates fine feature details, and the discriminator implements geometric constraints, thereby generating fine detail features of the image of the strongly light-absorbing material.

[0058] S14. The refined detail features of the generated image of the strongly absorbing material are fed into the BicycleGAN bidirectional recurrent generative adversarial network module. This module is a combination of cVAE-GAN variational generative adversarial network and cLR-GAN conditional generative adversarial network, consisting of a generator, two discriminators, and an encoder. In cVAE-GAN, the image of the non-absorbing material under the experimental light source is encoded to provide real samples of the potential vectors and from which samples are taken. In cLR-GAN, the generator first generates pseudo images from random noise, then the pseudo images are encoded, and finally the difference between them and the input random noise is calculated. By comparing and training with the image of the non-absorbing material under the experimental light source and the image of the strongly absorbing material under the same light source, the image after supplementing the light on the simulated strongly absorbing material is finally obtained.

[0059] In this embodiment, a self-attention-guided SAGAN is used to enhance its stability and effectiveness. For image data of strongly light-absorbing materials, a BicycleGAN bidirectional recurrent generative adversarial network model is used to simulate the generation of images of normal materials illuminated by a laboratory light source, making their defect features clear. In the simulated supplemental lighting operation for strongly light-absorbing materials, both the BicycleGAN and SAGAN modules are mature and fixed structures. Here, the two modules are superimposed to better extract image features. BicycleGAN is a combination of cVAE-GAN variational generative adversarial network and cLR-GAN conditional generative adversarial network, utilizing the idea of ​​reuse and mutual improvement. Its total loss function is:

[0060]

[0061] in, It is the adversarial loss of cVAE-GAN, L GAN It is the adversarial loss of cLR-GAN. It is the L1 reconstruction loss of cVAE-GAN. It is the L1 loss between noise N(z) and the latent code, λ, λ latent , λ KL There are three weights; in the default configuration, λ is typically set to 10. latent =0.5,λ KL =0.01.

[0062] S2. Collect surface defect data of the image after supplemental lighting, and label the defect data into a dataset for training and testing;

[0063] As a preferred embodiment of step S2, in step S2, acquiring surface defect data of the image after supplemental lighting specifically includes: defining the types of images of the surface defects of the strong light-absorbing material after supplemental lighting; the types of surface defects of the strong light-absorbing material are divided into three categories: circular, striped, and irregular; after defining the defect types, data annotation is performed on the surface defects of the strong light-absorbing material, such as... Figure 2 The diagram shows the types of surface defects in strong light-absorbing materials as defined in this invention.

[0064] S3. Construct a surface defect detection model for Ham-SDI strong light-absorbing materials. Input the image dataset after supplementary lighting used for training into the defect detection model to obtain a preliminary training model.

[0065] As a preferred implementation of step S3, in step S3, a surface defect detection model for Ham-SDI strong light-absorbing materials is constructed, specifically including: the surface defect detection model for Ham-SDI strong light-absorbing materials is an improved YOLOv8 model, multi-scale feature fusion is introduced in the forward propagation part of the YOLOv8 network structure, the convolutional module in the YOLOv8 network architecture is replaced by ODConv full-dimensional dynamic convolution, LSKNet selective large convolutional kernel is introduced in the feature extraction module, and finally WIOUv3 is used as the loss function to optimize the model parameters.

[0066] More specifically: the formula for the ODConv full-dimensional dynamic convolution is expressed as: y = (α w1 ⊙α f1 ⊙α c1 ⊙α s1 ⊙W1+…+α wn ⊙α fn ⊙α cn ⊙α sn ⊙W n )*x;

[0067] Where y represents the output image, α wi ∈R represents the scalar of interest for the convolution kernel; α si ∈R k*k , and This represents three newly introduced points of interest, each along the convolution kernel W. i The k*k dimension of the kernel space, c in Input channel dimension and c out Output channel dimension calculation, ⊙ represents multiplication along different dimensions of the kernel space, where α wi α si α ci and α fi Through the multi-head attention module π i (x) is calculated, where x represents the input image.

[0068] More specifically, in step S3, LSKNet selective large convolutional kernels are introduced into the feature extraction module. Specifically, LSKNet is a repeatable stackable block in the backbone network. Each LSK Block includes two residual sub-blocks, namely a large kernel selection sub-block and a feedforward network sub-block. LSKNet selective large convolutional kernels are introduced into the back of the backbone network of the Ham-SDI strong light-absorbing material surface defect detection model to dynamically adjust the receptive field and effectively handle the complex environmental information in the fall detection scenario.

[0069] More specifically: the use of WIOUv3 as the loss function to optimize model parameters includes: the WIOU loss function first measures the overlap between two boxes by calculating the IoU (Intersection over Union), then weights them using the minimum weight of each part in the predicted box and the ground truth box to accurately describe the contribution of each part, and finally normalizes the weighted IoU value using the maximum weight of each part in the two boxes, as shown in the following formula:

[0070]

[0071] Where C represents the total number of categories; w c It is the weight of category c; IoU c It is the crossover union ratio of category c; the numerator is the sum of the weighted IoU of each category, and the denominator is the sum of the weights of all categories.

[0072] More specifically: In step S3, the image dataset after illumination for training is input into the defect detection model to obtain a preliminary training model, such as... Figure 4 The diagram shows the framework for cross-scale defect detection on the surface of strongly absorbing materials based on the improved YOLOv8, established in this invention. The specific process includes the following steps:

[0073] S31. In the backbone network, the image after supplemental lighting is input into the defect detection model. After feature extraction through a series of ODConv convolutional layers and feature enhancement through the C2f module, the network's perception ability is improved through LSKNet selective large convolutional kernels. Finally, a series of pooling cascades are performed through the SPPF feature fusion layer to extract the surface defect features of the strongly light-absorbing material.

[0074] S32. In the middle layer of the Neck network, including the top-down part and the bottom-up part, the top-down part first upsamples the surface defect features of the strong light-absorbing material extracted from the Backbone backbone network, and splices them with the coarser-grained feature map output by the C2f feature extraction layer in the middle section of the backbone network to achieve top-down feature fusion enhancement.

[0075] S33. After two rounds of feature fusion enhancement, the bottom-level feature map from top to bottom is processed by OCDconv full-dimensional dynamic convolution to obtain richer feature representation. The feature map after full-dimensional dynamic convolution is connected and fused with the feature map output by the C2f feature extraction layer from the previous top to bottom for further feature enhancement. Finally, it is connected and fused with the surface defect features of the strongly light-absorbing material extracted from the last layer of the backbone network. Finally, the Head detection head outputs three feature maps of different sizes, which are used to detect large, medium and small defects in the tested image, respectively.

[0076] In this embodiment, multi-scale feature fusion is introduced into the forward propagation part of the YOLOv8 network structure. Multi-scale feature maps are acquired at different levels of the network and fused together. This improvement helps to incorporate more contextual information into the network, improving the detection accuracy of small targets (such as circular defects). The innovation of this application in using ODConv to improve the YOLOv8 model lies in its adoption of a multi-dimensional attention mechanism. This mechanism learns complementary attention of the convolutional kernel in all four dimensions of the kernel space (i.e., spatial size, number of input channels, and number of output channels per convolutional layer) through a parallel strategy. This method is applicable to any convolutional layer, enhancing the network's flexibility and adaptability. A selective large convolutional kernel LSKNet is introduced at the rear of the backbone network to dynamically adjust the receptive field, effectively handling complex environmental information in fall detection scenarios and improving the network's perception capability and detection accuracy. Finally, WIOUv3 is used as the loss function to optimize the model parameters, thereby constructing an improved YOLOv8 model with stronger cross-scale defect detection capability and higher accuracy.

[0077] S4. For cross-scale defects, Wasserstein distance is used as the loss function to optimize the training model and update the weights, so as to obtain a well-trained defect detection model.

[0078] As a preferred embodiment of step S4, the use of Wasserstein distance as the loss function in step S4 specifically includes the following steps:

[0079] S401, Set the horizontal bounding box R = (c x ,c y The model is represented as a two-dimensional Gaussian distribution N(μ,∑), where c, w, h) are represented as c. x ,c y ,w,h represent the center coordinates, width, and height of the target bounding box along the x and y axes, respectively, where μ and ∑ represent the mean vector and covariance matrix, respectively;

[0080] S402. Perform Gaussian modeling on the true defect bounding box and the predicted bounding box of the defect to be detected. Convert the similarity between the true defect bounding box and the predicted bounding box into the distribution distance between two Gaussian distributions. For the true target box with Gaussian distribution μ1=N(m1,∑1) and the predicted target box with Gaussian distribution μ2=N(m2,∑2), calculate the second-order Wasserstein distance between them. Where m1 and ∑1 represent the mean vector and covariance matrix of the true target box, respectively, and m2 and ∑2 represent the mean vector and covariance matrix of the predicted target box, respectively.

[0081] S403, For the true target bounding box and predicted target boxes Modeling a Gaussian distribution N A and N B ,in, These represent the x and y coordinates of the center of the true target bounding box A, as well as its length and width. These represent the x and y axis center coordinates and the length and width of the predicted bounding box B, respectively. The Wasserstein distance between them can be further simplified to...

[0082]

[0083] S404. The exponentially normalized form of the defect detection model is used as the localization loss function for the surface defect detection model of strong light-absorbing materials. The model is trained based on gradient descent. The formula for the localization loss function of the defect detection model is as follows:

[0084]

[0085] Where C is the average size of the defect in the image of the strongly absorbing material, and Loss represents the localization loss function of the defect detection model.

[0086] S5. Use the image dataset after supplemental lighting for testing to evaluate the performance of the trained defect detection model, and apply the evaluated defect detection model to the new image after supplemental lighting to obtain the surface defect detection results of the strongly light-absorbing material.

[0087] In summary, this invention uses a generative light source network model to simulate supplementary lighting on images captured of strongly light-absorbing material surfaces, highlighting the characteristics of defects on these surfaces. Compared to general target detection frameworks, the improved YOLOv8 model proposed in this invention has stronger detection capabilities for cross-scale defects. Furthermore, replacing the original convolutional module with OCDconv significantly reduces computational load, meeting the needs of real-time monitoring, while also improving detection accuracy. Finally, by using WIOU, which incorporates the concept of weights, as the loss function, the similarity between the predicted bounding box and the real target can be measured more accurately, especially when multiple targets are present in the same image, thus improving detection accuracy.

[0088] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0089] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0090] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A target detection method for strongly light-absorbing materials, characterized in that, Includes the following steps: S1. Image acquisition is performed on the surface of the defective strong light-absorbing material. The acquired original image is simulated and supplemented with light using a generator light source network model to obtain the supplemented image. S2. Collect surface defect data of the image after supplemental lighting, and label the defect data into a dataset for training and testing; S3. Construct a surface defect detection model for Ham-SDI strong light-absorbing materials. Input the image dataset after supplementary lighting used for training into the defect detection model to obtain a preliminary training model. S31. In the backbone network, the image after supplemental lighting is input into the defect detection model. After feature extraction through a series of ODConv convolutional layers and feature enhancement through the C2f module, the network's perception ability is improved through LSKNet selective large convolutional kernels. Finally, a series of pooling cascades are performed through the SPPF feature fusion layer to extract the surface defect features of the strongly light-absorbing material. S32. In the Neck network, there are top-down and bottom-up parts. The top-down part first upsamples the surface defect features of the strong light-absorbing material extracted from the Backbone network and splices them with the coarser-grained feature map output by the C2f feature extraction layer in the middle section of the Backbone network to achieve top-down feature fusion enhancement. S33. After two rounds of feature fusion enhancement, the bottom-level feature map from top to bottom is processed by OCDconv full-dimensional dynamic convolution to obtain richer feature representation. The feature map after full-dimensional dynamic convolution is connected and fused with the feature map output by the C2f feature extraction layer from the top to bottom layer of the previous layer for further feature enhancement. Finally, it is connected and fused with the surface defect features of strongly light-absorbing materials extracted from the last layer of the backbone network. Finally, the Head detection head outputs three feature maps of different sizes, which are used to detect large, medium and small defects in the tested image, respectively. S4. For cross-scale defects, Wasserstein distance is used as the loss function to optimize the training model and update the weights, so as to obtain a well-trained defect detection model. S5. Use the image dataset after supplemental lighting for testing to evaluate the performance of the trained defect detection model. Apply the evaluated defect detection model to the new image after supplemental lighting to obtain the surface defect detection results of the strongly light-absorbing material.

2. The target detection method for strongly light-absorbing materials according to claim 1, characterized in that: In step S1, the generated light source network model specifically includes a Gaussian smoothing filter module, a SAGAN self-attention generative adversarial network module, and a BicycleGAN bidirectional recurrent generative adversarial network module.

3. The target detection method for strongly light-absorbing materials according to claim 2, characterized in that: In step S1, the specific process includes the following steps: S11. Use a two-dimensional industrial camera to acquire images of the surface of a defective, highly light-absorbing material. S12. Apply Gaussian smoothing filter to the original image data to remove noise points in the defective image, obtaining the filtered and denoised image; the formula for Gaussian smoothing filter is as follows: Where i,j represent the coordinates of each point in the Gaussian convolution kernel, H i,j This represents the image after filtering and denoising; K represents the size of the Gaussian convolution kernel, and σ represents the standard deviation of the Gaussian distribution. The larger σ is, the better the denoising ability, but the more blurred the image becomes. S13. The filtered and denoised image is first input into the SAGAN self-attention generative adversarial network module. The discriminator executes a global image structure with complex geometric constraints through the self-attention mechanism, the generator generates fine feature details, and the discriminator implements geometric constraints, thereby generating fine detail features of the image of the strongly light-absorbing material. S14. The refined detail features of the generated image of the strongly absorbing material are fed into the BicycleGAN bidirectional recurrent generative adversarial network module. This module is a combination of cVAE-GAN variational generative adversarial network and cLR-GAN conditional generative adversarial network, consisting of a generator, two discriminators, and an encoder. In cVAE-GAN, the image of the non-absorbing material under the experimental light source is encoded to provide real samples of the potential vectors and from which samples are taken. In cLR-GAN, the generator first generates pseudo images from random noise, then the pseudo images are encoded, and finally the difference between them and the input random noise is calculated. By comparing and training with the image of the non-absorbing material under the experimental light source and the image of the strongly absorbing material under the same light source, the image after supplementing the light on the simulated strongly absorbing material is finally obtained.

4. The target detection method for strongly light-absorbing materials according to claim 1, characterized in that: In step S2, the surface defect data of the image after supplemental lighting is collected. Specifically, this includes: defining the types of images of the surface defects of the strong light-absorbing material after supplemental lighting. The types of surface defects of the strong light-absorbing material are divided into three categories: circular, strip-shaped, and irregular. After defining the types of defects, the surface defects of the strong light-absorbing material are labeled with data.

5. The target detection method for strongly light-absorbing materials according to claim 1, characterized in that: In step S3, a surface defect detection model for Ham-SDI strong light-absorbing materials is constructed. Specifically, the Ham-SDI strong light-absorbing material surface defect detection model is an improved YOLOv8 model. Multi-scale feature fusion is introduced in the forward propagation part of the YOLOv8 network structure. The convolutional module in the YOLOv8 network architecture is replaced by ODConv full-dimensional dynamic convolution. Secondly, LSKNet selective large convolutional kernels are introduced in the feature extraction module. Finally, WIOUv3 is used as the loss function to optimize the model parameters.

6. The target detection method for strongly light-absorbing materials according to claim 5, characterized in that: The formula for the ODConv full-dimensional dynamic convolution is expressed as: y = (α w1 ⊙α f1 ⊙α c1 ⊙α s1 ⊙W1+…+α wn ⊙α fn ⊙α cn ⊙α sn ⊙W n )*x; Where y represents the output image, α wi ∈R represents the scalar of interest for the convolution kernel; α si ∈R k*k , and This represents three newly introduced points of interest, each along the convolution kernel W. i The k*k dimension of the kernel space, c in Input channel dimension and c out Output channel dimension calculation, ⊙ represents multiplication along different dimensions of the kernel space, where α wi α si α ci and α fi Through the multi-head attention module π i (x) is calculated, where x represents the input image.

7. The target detection method for strongly light-absorbing materials according to claim 5, characterized in that: In step S3, LSKNet selective large convolutional kernels are introduced into the feature extraction module. Specifically, LSKNet is a repeatable stackable block in the backbone network. Each LSK Block includes two residual sub-blocks, namely a large kernel selection sub-block and a feedforward network sub-block. LSKNet selective large convolutional kernels are introduced into the back of the backbone network of the Ham-SDI strong light-absorbing material surface defect detection model to dynamically adjust the receptive field and effectively handle the complex environmental information in the fall detection scenario.

8. The target detection method for strongly light-absorbing materials according to claim 5, characterized in that: The use of WIOUv3 as the loss function to optimize model parameters specifically includes: The WIOU loss function first measures the overlap between two boxes by calculating the IoU (Intersection over Union) ratio. Then, it weights the IoU values ​​using the minimum weights of each part in the predicted box and the ground truth box to accurately describe the contribution of each part. Finally, the WIOU loss function normalizes the weighted IoU value using the maximum weights of each part in the two boxes. The formula is shown below: Where C represents the total number of categories; w c It is the weight of category c; IoU c It is the crossover union ratio of category c; the numerator is the sum of the weighted IoU of each category, and the denominator is the sum of the weights of all categories.

9. The target detection method for strongly light-absorbing materials according to claim 1, characterized in that: In step S4, the Wasserstein distance is used as the loss function, and the specific process includes the following steps: S401, Set the horizontal bounding box R = (c x ,c y The model is represented as a two-dimensional Gaussian distribution N(μ,Σ), where c, w, h) are represented as c. x ,c y ,w,h represent the center coordinates, width, and height of the target bounding box along the x and y axes, respectively, where μ and∑ represent the mean vector and covariance matrix, respectively; S402. Perform Gaussian modeling on the true defect bounding box and the predicted bounding box of the defect to be detected. Convert the similarity between the true defect bounding box and the predicted bounding box into the distribution distance between two Gaussian distributions. For the true target box with Gaussian distribution μ1=N(m1,∑1) and the predicted target box with Gaussian distribution μ2=N(m2,∑2), calculate the second-order Wasserstein distance between them. Where m1 and ∑1 represent the mean vector and covariance matrix of the true target box, respectively, and m2 and ∑2 represent the mean vector and covariance matrix of the predicted target box, respectively. S403, For the true target bounding box and predicted target boxes Modeling a Gaussian distribution N A and N B ,in, w A ,h A These represent the x and y coordinates of the center of the true target bounding box A, as well as its length and width. w B ,h B These represent the x and y axis center coordinates and the length and width of the predicted bounding box B, respectively. The Wasserstein distance between them is further simplified to... S404. The exponentially normalized form of the loss function is used as the localization loss function for the surface defect detection model of strongly light-absorbing materials. The model is trained using gradient descent. The localization loss function of the model is expressed as follows: Where C is the average size of the defect in the image of the strongly absorbing material, and Loss represents the localization loss function of the defect detection model.

Citation Information

Patent Citations

  • Cross-scale defect detection method

    CN117094999A

  • Vehicle door surface defect detection method based on improved YOLOv8 network

    CN117173096A