A deep learning-based automobile bearing surface defect detection method and device

By constructing a deep learning network with a reflection suppression module and a detail enhancement and dual-scale interaction module, the problems of reflection interference and detail loss in the surface inspection of automotive bearings are solved, and high-precision and robust defect detection is achieved.

CN122453697APending Publication Date: 2026-07-24SHANGHAI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI UNIV
Filing Date
2026-03-08
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing deep learning methods lack sufficient anti-reflection interference capability in the detection of surface defects in automotive bearings, leading to false detections and missed detections. Furthermore, they lack the ability to express refined defect features, making it difficult to achieve high-precision detection.

Method used

A deep learning network constructed using a Reflection Suppression Module (RSM) and a Detail Enhancement and Dual-Scale Interaction Module (DEDIB) suppresses specular reflection interference and restores detail information through multi-stage feature processing and differential feature enhancement, achieving highly robust detection.

Benefits of technology

It significantly improves the robustness and accuracy of detection in strong reflective environments, accurately segments the defect area on the surface of automotive bearings, and solves the problems of false detection and loss of details in traditional detection methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122453697A_ABST
    Figure CN122453697A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of based on deep learning's automobile bearing surface defect detection method and device, it is related to the technical field of automobile bearing surface defect detection technology.The method thereof includes: obtaining the surface image of automobile bearing to be detected;Encoder network is used to carry out multi-stage down-sampling processing to the surface image, to generate multiple different scale encoder feature maps;The first processing is carried out to the multiple encoder feature maps, to generate pure feature map;The top-down multi-stage up-sampling processing is carried out to the pure feature map, to generate the defect segmentation result of the surface image.By the application, the problem of low precision of automobile bearing surface detection is solved, and the effect of improving the precision of automobile bearing surface detection is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive bearing surface defect detection, and more specifically, to a method and apparatus for automotive bearing surface defect detection based on deep learning. Background Technology

[0002] In modern industrial production processes such as automobile manufacturing, rigorous surface quality inspection of critical components like bearings is a core element in ensuring the reliability and safety of the entire product. Automotive bearings are typically made of highly polished metal, and their surfaces, under specific lighting conditions in industrial inspection environments, are prone to strong and dynamically changing specular reflections. These bright areas can not only mask actual surface defects (such as tiny dents, scratches, or pitting), but they themselves or their sharp edges are often misidentified as defects by inspection algorithms, posing a serious challenge to the accuracy of automated inspection.

[0003] Traditional surface defect detection mainly relies on manual visual inspection, which suffers from inherent drawbacks such as low efficiency, high cost, susceptibility to subjective factors, and poor consistency, making it difficult to meet the demands of large-scale, high-speed modern production. With the development of machine vision technology, automated defect detection methods have become a research hotspot. In recent years, deep learning methods, represented by convolutional neural networks (CNNs), have demonstrated powerful capabilities in general image segmentation tasks and are gradually being introduced into the field of industrial defect detection.

[0004] However, when existing general-purpose image segmentation networks (such as U-Net and DeepLab) are directly applied to industrial components with special physical properties, such as automotive bearings, their performance often degrades significantly. This is mainly due to two major technical bottlenecks: First, insufficient resistance to reflection interference. Existing networks lack mechanisms specifically designed to suppress strong specular reflections, causing the model to either fail to identify submerged true defects or generate a large number of false alarms when facing bright areas. Second, poor ability to represent refined defect features. The defects on the surface of automotive bearings are diverse in shape and scale, ranging from tiny dot-like pits to long, thin scratches. Deep neural networks perform multiple downsampling operations during the encoding stage to extract high-level semantic information. This process inevitably loses feature information of tiny defects and edge details of complex defects, resulting in blurry and incomplete segmentation results when decoding to restore resolution.

[0005] Therefore, current technology urgently needs a new technical solution that can simultaneously address the two major challenges of strong reflection interference and loss of defect details, in order to achieve high-precision, high-robust automated defect detection for such highly reflective curved metal parts. Summary of the Invention

[0006] This invention provides a method and apparatus for detecting surface defects in automotive bearings based on deep learning, which at least solves the problem of low defect detection accuracy in related technologies.

[0007] According to an embodiment of the present invention, a deep learning-based method for detecting surface defects in automotive bearings is provided, comprising: Obtain a surface image of the automotive bearing to be inspected; An encoder network is used to perform multi-stage downsampling processing on the surface image to generate encoder feature maps of different scales; The plurality of encoder feature maps are subjected to a first processing to generate a clean feature map; The clean feature map is subjected to top-down multi-stage upsampling processing to generate the defect segmentation result of the surface image.

[0008] In one exemplary embodiment, the first processing of the plurality of encoder feature maps to generate a clean feature map includes: Multi-scale gradient information of the encoder feature map is extracted by a set of parallel convolution operations with different dilation rates, and the multi-scale gradient information is fused to generate a comprehensive gradient map. Based on a preset first threshold, a soft threshold filtering operation is performed on the comprehensive gradient map to generate a filtered gradient map, wherein the first threshold is a learnable threshold. The reflection component is determined based on the negative values ​​of the filtered gradient map, and the reflection component corresponds to the high-amplitude reflection gradient. The reflection component is combined with the input encoder feature map to generate the clean feature map.

[0009] In one exemplary embodiment, the soft thresholding operation on the comprehensive gradient map based on a learnable first threshold includes: A soft mask is generated by a first function, which is used to smoothly decay regions in the integrated gradient map whose magnitude is higher than the learnable threshold.

[0010] In an exemplary embodiment, the top-down multi-stage upsampling process on the clean feature map to generate the defect segmentation result of the surface image includes: Receive the clean feature map from the same level of the reflection suppression module, and the upsampled deep feature map from the decoder module; Based on the pure feature map and the deep feature map, parallel large-scale feature streams and small-scale feature streams are constructed. Obtain the difference features between the large-scale feature stream and the upsampled small-scale feature stream, and the difference features are used to characterize high-frequency detail information; The differential features are enhanced to obtain enhanced differential features; The enhanced differential features are fused back into the large-scale feature stream to generate a detail-enhanced feature stream, and the output feature map of the detail enhancement and dual-scale interaction module is generated based on the detail-enhanced feature stream and the small-scale feature stream.

[0011] In an exemplary embodiment, constructing parallel large-scale feature streams and small-scale feature streams based on the clean feature map and the deep feature map includes: The clean feature map is downsampled and then concatenated with the deep feature map to construct the small-scale feature flow; The deep feature map is upsampled and then concatenated with the clean feature map to construct the large-scale feature stream.

[0012] According to another embodiment of the present invention, a deep learning-based device for detecting surface defects in automotive bearings is provided, comprising: The image acquisition module is used to acquire surface images of the automotive bearing to be inspected. The encoder module is used to perform a first processing on the plurality of encoder feature maps to generate a clean feature map; A reflection suppression module is used to perform a first processing on the plurality of encoder feature maps to generate clean feature maps; The decoder module is used to perform top-down multi-stage upsampling processing on the clean feature map to generate the defect segmentation result of the surface image.

[0013] In one exemplary embodiment, the first processing of the plurality of encoder feature maps to generate a clean feature map includes: Multi-scale gradient information of the encoder feature map is extracted by a set of parallel convolution operations with different dilation rates, and the multi-scale gradient information is fused to generate a comprehensive gradient map. Based on a preset first threshold, a soft threshold filtering operation is performed on the comprehensive gradient map to generate a filtered gradient map, wherein the first threshold is a learnable threshold. The reflection component is determined based on the negative values ​​of the filtered gradient map, and the reflection component corresponds to the high-amplitude reflection gradient. The reflection component is combined with the input encoder feature map to generate the clean feature map.

[0014] In one exemplary embodiment, the soft thresholding operation on the comprehensive gradient map based on a learnable first threshold includes: A soft mask is generated by a first function, which is used to smoothly decay regions in the integrated gradient map whose magnitude is higher than the learnable threshold.

[0015] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0016] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0017] By using this invention, the high-brightness noise caused by specular reflection on metal surfaces can be effectively identified and filtered out at the feature level by setting a reflection suppression module, thus avoiding the real defects being submerged or the high-brightness areas being falsely detected. This significantly improves the detection robustness in strong reflective environments, thereby solving the problem of low defect detection accuracy and achieving the effect of improving defect detection accuracy. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the structure of the neural network model RSDENet according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the RSM module structure according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the DEDIB module structure according to an embodiment of the present invention; Figure 4 This is a visualization of experimental results according to an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0020] In the following description, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0021] Furthermore, in this application, directional terms such as "upper," "lower," "left," and "right" may be defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms can be relative concepts, used for relative description and clarification, and may change accordingly depending on the orientation of the components in the accompanying drawings.

[0022] In this application, unless otherwise expressly specified and limited, the term "connection" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral part; it can be a direct connection or an indirect connection through an intermediate medium. Furthermore, the term "coupled" can refer to an electrical connection that enables signal transmission.

[0023] As used herein, “about,” “approximately,” or “approximately” includes the stated value and the average value within an acceptable range of deviation from the given value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the given quantity (i.e., the limitations of the measurement system).

[0024] This application provides a method and apparatus for detecting surface defects in automotive bearings based on deep learning. Its core lies in constructing a system... Figure 1 The neural network model RSDENet shown employs a mainstream encoder-decoder architecture but innovatively integrates two core functional modules: a Reflection Suppression (RSM) module and a Detail Enhancement and Dual-Scale Interaction (DEDIB) module. The former aims to address the interference of strong specular reflections from metal surfaces in industrial lighting environments on defect features, while the latter addresses the loss of minute defect detail information during feature extraction in deep networks. Through the collaborative work of these two modules, this method enables high-precision and robust automated defect detection on the surfaces of highly reflective components such as automotive bearings.

[0025] Below, we will combine the appendix Figures 1 to 4 The technical solution provided by this invention will be described in detail.

[0026] Example 1 In this embodiment, a deep learning-based method for detecting surface defects in automotive bearings is provided. This method employs an end-to-end deep learning network to directly segment defect areas from input automotive bearing surface images at the pixel level. This solves the technical problems in the prior art, such as false detection and missed detection caused by strong reflection interference, and loss of details of minute defects due to network structure. It achieves the beneficial effect of accurate and robust automated defect detection.

[0027] The overall process of the method described in this embodiment mainly includes the following steps: S100: Acquire a surface image of the automobile bearing to be detected, and use an encoder network to perform multi-stage downsampling processing on the surface image to generate multiple encoder feature maps of different scales.

[0028] In this step, a digital image of the surface of the automotive bearing to be inspected is first acquired using image acquisition equipment such as an industrial camera. To accommodate network processing, the size of the input image is typically normalized.

[0029] For example, input a picture of size An RGB three-channel image of the surface of an automotive bearing, which may contain various types of defects such as dents and scratches, as well as areas of strong specular reflection caused by the lighting system.

[0030] After acquiring the image, it is fed into an encoder network for feature extraction. The encoder network gradually reduces the spatial resolution of the feature map while increasing the number of channels (feature dimension), thereby capturing hierarchical features from low-level texture to high-level semantics.

[0031] In this embodiment, the encoder network uses a finely tuned VGG16 network as the backbone. Specifically, the first five convolutional stages of the VGG16 are retained, while the last pooling and fully connected layers are removed. These five stages correspond to five different scales (or layers), and each stage outputs a feature map at a specific resolution. Therefore, the encoder outputs a total of five feature map sets at different resolutions. ,in, It has the highest resolution, is closest to the original image, and retains rich spatial details; It has the lowest resolution but contains the highest level of semantic information.

[0032] To enhance the expressive power of features, the encoder feature map output at each stage... The process begins with a feature preprocessing step. This step includes a Convolutional Block Attention (CBAM) module and a 3x3 convolutional layer. The CBAM module adaptively weights the channel and spatial dimensions of the feature map, allowing the network to focus more on feature channels and spatial regions containing important information while suppressing irrelevant features. The subsequent 3x3 convolutional layer adjusts the number of channels in the feature map, preparing it for processing by later modules. After preprocessing, a new set of feature maps is obtained. .

[0033] For example, suppose the input image size is After five stages of the encoder, five feature maps are output. The space dimensions are respectively , , , , The number of channels increases accordingly, for example, to 64, 128, 256, 512, and 512 respectively; after preprocessing with CBAM and convolutional layers, the feature map with adjusted channel count is obtained. Their spatial dimensions remain unchanged, but the number of channels may be adjusted uniformly. For example, for computational efficiency, their number of channels can all be adjusted to 64.

[0034] S200: For at least one encoder feature map among the plurality of encoder feature maps, a reflection suppression module is applied for first processing to generate a clean feature map that suppresses specular reflection interference.

[0035] In this embodiment, the preprocessed feature map Each signal is fed into the Reflection Suppression (RSM) module to identify and filter out high-amplitude gradient signals caused by specular reflection at the feature level, thereby obtaining a feature map that reflects the true surface condition; such as Figure 2 As shown, the workflow of the RSM module can be decomposed into the following four sub-steps (i.e., the first process): S210: Multi-scale gradient calculation and fusion.

[0036] For any input feature map RSM first uses a set of parallel structures with different expansion rates. The convolutional layers are used to extract multi-scale gradient information because specular reflections in images typically appear as regions of abrupt brightness changes, corresponding to high-amplitude gradients in the feature map. However, the shape and size of reflections vary, making it difficult for a single-scale gradient operator to capture them all. Therefore, three parallel branches are used here, with their dilation rates... The values ​​are set to 1, 2, and 3 respectively. Each branch's convolutional layer uses a fixed gradient operator as the convolution kernel; for example, a Sobel operator approximating the horizontal and vertical directions (such as...) can be used. and convolution kernel and This is achieved through convolution operations with different dilation rates. These operations enable the network to perceive feature changes within different spatial ranges, thus providing a good response to reflective regions of varying sizes.

[0037] Gradient maps extracted from each scale branch The gradients will be averaged and then integrated through a 3x3 convolutional layer to finally generate a combined gradient map. The mathematical expression of this process can be summarized as follows: in, It is a set of expansion rates, for example ; It is the number of elements in the set.

[0038] For example, suppose the feature map is input to RSM One The values ​​for the local region are: Here, the high values ​​in the middle two columns (approximately 250) simulate a strong specular reflection stripe, while the low values ​​on the left (approximately 50) represent the background, and the value in the lower right corner (approximately 90) simulates a realistic and low-contrast defect.

[0039] when When the gradient operator is applied to this region, it produces huge gradient values ​​at the reflection edges (such as between columns 2 and 3), for example... At defect edges (such as between columns 3 and 4, and between rows 3 and 4), the gradient values ​​are relatively small, for example... .

[0040] when When performing dilated convolution, it calculates the difference between pixels that are further apart. For example, when calculating the gradient of the 3rd column, it may use pixels from the 1st and 5th columns to perceive a larger range of structure, and so on.

[0041] By fusing gradients of different scales, the obtained It can more robustly characterize all edge and abrupt changes in an image from reflections or real defects.

[0042] S220: Learnable soft threshold filtering.

[0043] In this embodiment, a comprehensive gradient map is obtained. Then, it is also necessary to distinguish which high gradients are caused by unwanted reflections and which are caused by defect edges that need to be preserved.

[0044] To address this, a learnable soft threshold filtering mechanism is employed, which involves setting learnable scalar parameters. This serves as a threshold to distinguish between reflected and non-reflected gradients; during network training, It will automatically learn an optimal value through backpropagation.

[0045] The filtering operation generates a soft mask using a sigmoid function. This soft mask has a value between 0 and 1 and is used to smoothly decay gradients with magnitudes greater than 1. The specific calculation formula for the region is as follows: in, This indicates element-wise multiplication. It is the Sigmoid function. It is a hyperparameter that controls the steepness. It is the absolute value of the combined gradient map.

[0046] when much smaller hour, The output is close to 1, therefore Gradient information is preserved.

[0047] when Much larger hour, The output is close to 0, therefore Gradient information is suppressed.

[0048] Near the threshold, the attenuation transitions smoothly, avoiding artifacts that might be introduced by a hard threshold. In this way, high-amplitude gradients caused by strong reflections are effectively suppressed, while gradients caused by real defects, which are typically lower in magnitude, are preserved.

[0049] For example, suppose the network learns 180 (dimensionless), hyperparameter Set to 0.1. For the high gradient value of 198 at the reflection edge, its absolute value is 198; calculate the soft mask value. Therefore, the filtered gradient value Approximately The gradient value of 162 at the defect edge is significantly attenuated. Its absolute value is 162, and the soft mask value is calculated to be... Filtered gradient values Approximately Most of them were preserved, thus successfully distinguishing and selectively suppressing the reflection gradient.

[0050] S230: Reconstruction based on the Poisson equation.

[0051] In this embodiment, after soft thresholding, a gradient map is obtained that retains only the gradient of the non-reflective structure. To recover the shape of the reflection itself on the feature map from this suppressed gradient field, a reconstruction method based on the Poisson equation is introduced. The Poisson equation is a second-order partial differential equation that describes the relationship between a field (such as an electric potential field or a temperature field) and its source (such as a charge density or a heat source), in the form of: ,in It is the Laplace operator.

[0052] In this application, the suppressed gradient portion (i.e. () is considered as a source term, or as the filtered gradient graph. Invert the term and use it as the source term for reconstructing the equation. At this point, the solution is required for one image component. Its gradient field is as close as possible to... Then solve the Poisson equation. This reflection component can then be obtained. This solution process can be performed in the frequency domain using the Fast Fourier Transform (FFT); it should be noted that... Visually, it can be understood as an image that contains only those structures (i.e., specular reflections) corresponding to the suppressed gradient.

[0053] For example, the filtered gradient map Invert the value and use it as input to the Poisson solver; the solver will output a feature map. This image numerically reproduces primarily the structure of the bright reflective stripes in the original feature image, while the values ​​in other areas (such as the background and real defect areas) are relatively flat or zero; for example, the values ​​corresponding to the original reflective areas... The value may be very high, corresponding to the defect area. The value will be very low.

[0054] S240: Residual Learning and Output.

[0055] In this embodiment, the reconstructed reflection components Feature map of the original input The feature maps are fused to obtain a final, pure feature map free from reflection interference. In practice, this is usually accomplished through a residual join: and Element-wise addition is physically equivalent to subtracting the identified reflection portion from the original feature map. Then, a 3x3 convolutional layer is used for feature integration and refinement to obtain the final output, as shown in the following formula: The output feature map after processing by the RSM module In this model, the characteristic response caused by specular reflection is significantly weakened, while the characteristics related to real defects are preserved and highlighted.

[0056] S300: Employs a decoder network that performs top-down, multi-stage upsampling on the clean feature map through cascaded detail enhancement and dual-scale interaction modules to generate defect segmentation results for the surface image.

[0057] In this embodiment, the decoder's task is to gradually restore the low-resolution, high-semantic feature map extracted by the encoder to the resolution of the original image, and finally generate a pixel-level segmentation mask.

[0058] Traditional decoders (such as skip connections in U-Net) often struggle to effectively recover fine details lost during downsampling when fusing shallow and deep features. To address this, this application constructs a decoder using detail enhancement and dual-scale interaction modules (DEDIB). The decoder consists of five cascaded DEDIB modules operating in a top-down manner. That is, it starts from the deepest (lowest resolution) feature map... Initially, it gradually merges with shallower feature maps and upsamples to restore resolution.

[0059] like Figure 3 As shown, each DEDIB module receives two inputs: one is a clean feature map from the same level as the RSM module. (For example, in the i-th decoding stage, the receiver) The other is the feature map from the output of the deeper (i+1th layer) decoder module, after upsampling. At this point, the internal workflow of the DEDIB module can be broken down into the following three sub-steps: S310: Dual-scale feature preparation.

[0060] To facilitate the full interaction of information at different scales and to explicitly extract details, the DEDIB module first constructs two parallel feature streams: a large-scale feature stream... and a small-scale feature flow This is achieved through an "interwoven" splicing strategy, specifically: To construct large-scale feature flow Deep upsampling features ( (Indicates upsampling operation) and same-layer purity features The parts are then assembled. Maintained with Same high resolution.

[0061] To construct small-scale feature flow To achieve the same layer of pure characteristics Perform downsampling ( (This represents a downsampling operation), then compared with the original deep features. During the splicing process, at this time The resolution is low.

[0062] For example, suppose that in the fourth stage of the decoder, the DEDIB module receives two inputs: one from RSM-4 and the other from the RSM-4. (size ) and from DEDIB-5 upsampled (size ). It is and It is pieced together and has a size of ;and It is the downsampled (size ) and the original (size It is assembled from pieces, and its dimensions are... .

[0063] S320: Enhanced differentiation.

[0064] Since high-frequency detail information is mainly found in high-resolution feature maps, large-scale feature flow... Compared with the upsampled small-scale feature flow The differences between them represent fine information that can only be captured at high resolution (such as the edges of tiny defects, the texture of scratches, etc.).

[0065] In response, the module calculates this difference feature: This difference feature After processing by a BConv (Conv+BatchNorm+ReLU) layer and a CBAM module to extract and emphasize the most important details, the enhanced differential features are finally obtained. This process enables the network to actively focus on and amplify details that are easily lost.

[0066] For example, the product generated in the previous step (size Upsampling Then with (size Perform element-wise subtraction; in the resulting difference tensor, regions with larger values ​​correspond to details unique to the original high-resolution features. For example, in... Fine scratches that are clearly visible at the current resolution become more apparent when downsampled. If the scratch becomes blurred or disappears, its features will be highlighted in the difference tensor with a higher value; subsequently, these highlighted features are further enhanced through convolution and attention mechanisms.

[0067] S330: Final fusion and output.

[0068] Finally, the enhanced differential features Added back to the large-scale feature flow in the form of residuals In this process, the enhanced detail information is fused back in, resulting in a feature stream with enhanced details. .

[0069] Simultaneously, this enhanced feature flow and the upsampled small-scale feature flow... Attention weights are applied separately through their respective CBAM modules, then the two are summed and fused; finally, the final result of the DEDIB module is output through a convolutional layer. The final output formula can be expressed as: By cascading multiple DEDIB modules, the decoder can effectively recover and enhance defect details at each upsampling step, ultimately outputting a high-quality segmentation prediction map at the shallowest and highest-resolution stage.

[0070] In this embodiment, a deep supervised training strategy is employed, which means that each DEDIB module of the decoder (from...) arrive Each of the five outputs will generate a segmentation prediction map; during training, all five outputs... The loss is calculated with the real label, and all losses are weighted and summed to guide the optimization of network parameters, so as to alleviate the gradient vanishing problem and enable the network to learn meaningful feature representations at different levels.

[0071] During inference (i.e., actual detection), typically only the shallowest layer output with the highest resolution and richest detail is used. This serves as the final defect segmentation result.

[0072] In summary, this invention addresses reflection interference by cascading an RSM module after the encoder and resolves detail loss by using a cascaded DEDIB module in the decoder, forming a complete end-to-end solution. Visualized experimental results (e.g.) Figure 4 As shown in the figure, without RSM, the network is prone to misclassifying highlight areas as defects; however, after introducing RSM, the false activation of highlight areas is significantly suppressed, and the network can focus more on the real defect areas. Even if the defect is occluded by the highlight or located at its edge, RSDENet can still show strong robustness and accurately segment the complete defect morphology.

[0073] Example 2 This embodiment provides a deep learning-based device for detecting surface defects in automotive bearings. This device is a hardware implementation or functional modular embodiment of the above-described method embodiments. It can be a dedicated industrial inspection device or a detection unit integrated into a production line. The device includes: Image acquisition module: Typically consists of an industrial camera, lens, and light source system (such as ring light, coaxial light, etc.), responsible for clearly capturing surface images of automotive bearings in a controlled industrial environment and transmitting the image data to the processing unit.

[0074] Processor: This can be a CPU, GPU, FPGA, or a dedicated AI chip (such as an ASIC), serving as the computing core of the device and responsible for running the pre-trained RSDENet deep learning model.

[0075] Memory: Used to store the network weights of the RSDENet model, the program code required for running, and temporary data during processing (such as input images, feature maps of intermediate layers, etc.).

[0076] Input / output interface: Used to interact with external devices, such as receiving trigger signals from the production line control system and outputting detection results (such as defect images, locations, types, pass / fail signals) to downstream rejection devices or data recording systems.

[0077] In terms of logical function, the device can be divided into the following cooperating modules, the functions of which are implemented by the processor executing programs in memory: Encoder module: Responsible for implementing the encoder network function in step S100. It receives surface images from the image acquisition module and extracts a series of encoder feature maps at different scales through multi-level convolution and pooling operations.

[0078] The reflection suppression module is responsible for implementing the RSM function in step S200. It receives the feature map output by the encoder module and performs a series of operations such as multi-scale gradient analysis, soft thresholding and Poisson reconstruction on each feature map to generate a clean feature map that has removed reflection interference.

[0079] Decoder Module: Responsible for implementing the decoder network function in the S300 step. It contains multiple cascaded detail enhancement and dual-scale interaction (DEDIB) sub-modules; it gradually fuses clean feature maps from the reflection suppression module and feature information from the deep decoder in a top-down manner, and restores defect details through a dual-scale differential enhancement mechanism during the process, ultimately generating a high-precision defect segmentation mask.

[0080] The result generation and output module performs post-processing (such as thresholding, connected component analysis, etc.) on the final segmentation mask output by the decoder module to determine the specific location, size, and shape of the defect, and judges whether the product is qualified according to the preset standard. Then, the detection results are output through the input / output interface.

[0081] This device achieves efficient, accurate, and automated online detection of surface defects in automotive bearings through a combination of hardware and a specific algorithm (RSDENet model) embedded within it.

[0082] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0083] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0084] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.

[0085] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0086] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0087] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0088] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0089] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0090] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0091] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0092] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0093] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for detecting surface defects in automotive bearings based on deep learning, characterized in that, include: Obtain a surface image of the automotive bearing to be inspected; An encoder network is used to perform multi-stage downsampling processing on the surface image to generate encoder feature maps of different scales; The plurality of encoder feature maps are subjected to a first processing to generate a clean feature map; The clean feature map is subjected to top-down multi-stage upsampling processing to generate the defect segmentation result of the surface image.

2. The method according to claim 1, characterized in that, The first processing of the plurality of encoder feature maps to generate a clean feature map includes: Multi-scale gradient information of the encoder feature map is extracted by a set of parallel convolution operations with different dilation rates, and the multi-scale gradient information is fused to generate a comprehensive gradient map. Based on a preset first threshold, a soft threshold filtering operation is performed on the comprehensive gradient map to generate a filtered gradient map, wherein the first threshold is a learnable threshold. The reflection component is determined based on the negative values ​​of the filtered gradient map, and the reflection component corresponds to the high-amplitude reflection gradient. The reflection component is combined with the input encoder feature map to generate the clean feature map.

3. The method according to claim 2, characterized in that, The soft thresholding operation on the comprehensive gradient map based on a learnable first threshold includes: A soft mask is generated by a first function, which is used to smoothly decay regions in the integrated gradient map whose magnitude is higher than the learnable threshold.

4. The method according to claim 1, characterized in that, The top-down, multi-stage upsampling process of the clean feature map to generate the defect segmentation result of the surface image includes: Receive the clean feature map from the same level of the reflection suppression module, and the upsampled deep feature map from the decoder module; Based on the pure feature map and the deep feature map, parallel large-scale feature streams and small-scale feature streams are constructed. Obtain the difference features between the large-scale feature stream and the upsampled small-scale feature stream, and the difference features are used to characterize high-frequency detail information; The differential features are enhanced to obtain enhanced differential features; The enhanced differential features are fused back into the large-scale feature stream to generate a detail-enhanced feature stream, and the output feature map of the detail enhancement and dual-scale interaction module is generated based on the detail-enhanced feature stream and the small-scale feature stream.

5. The method according to claim 4, characterized in that, The construction of parallel large-scale and small-scale feature streams based on the pure feature map and the deep feature map includes: The clean feature map is downsampled and then concatenated with the deep feature map to construct the small-scale feature flow; The deep feature map is upsampled and then concatenated with the clean feature map to construct the large-scale feature stream.

6. A deep learning-based device for detecting surface defects in automotive bearings, characterized in that, include: The image acquisition module is used to acquire surface images of the automotive bearing to be inspected. The encoder module is used to perform a first processing on the plurality of encoder feature maps to generate a clean feature map; A reflection suppression module is used to perform a first processing on the plurality of encoder feature maps to generate clean feature maps; The decoder module is used to perform top-down multi-stage upsampling processing on the clean feature map to generate the defect segmentation result of the surface image.

7. The apparatus according to claim 6, characterized in that, The first processing of the plurality of encoder feature maps to generate a clean feature map includes: Multi-scale gradient information of the encoder feature map is extracted by a set of parallel convolution operations with different dilation rates, and the multi-scale gradient information is fused to generate a comprehensive gradient map. Based on a preset first threshold, a soft threshold filtering operation is performed on the comprehensive gradient map to generate a filtered gradient map, wherein the first threshold is a learnable threshold. The reflection component is determined based on the negative values ​​of the filtered gradient map, and the reflection component corresponds to the high-amplitude reflection gradient. The reflection component is combined with the input encoder feature map to generate the clean feature map.

8. The apparatus according to claim 6, characterized in that, The soft thresholding operation on the comprehensive gradient map based on a learnable first threshold includes: A soft mask is generated by a first function, which is used to smoothly decay regions in the integrated gradient map whose magnitude is higher than the learnable threshold.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to perform the method described in any one of claims 1 to 5 when executed.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 5.