Gear damage detection method and device, electronic equipment and storage medium

By inputting the gear detection image into the U-Net neural network containing residual structure, a binarized image mask is generated and phenotypic quantization is performed, which solves the problems of slow speed, low accuracy and strong subjectivity of artificial visual detection, and achieves high-accuracy gear damage detection.

CN119599955APending Publication Date: 2025-03-11NEW ENERGY BRANCH OF NORTH UNITED POWER CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411593588.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art, artificial visual detection gears are slow, have low accuracy and strong subjectivity when damaged gears, making it difficult to effectively detect gear damage.

Method used

By obtaining the gear detection image to be identified and inputting it into a U-Net neural network containing the residual structure, a binarized image mask is generated and phenotypic quantization is performed to determine the gear damage area.

Benefits of technology

It improves the accuracy of gear damage detection, shortens the detection cycle, reduces maintenance costs, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599955A_ABST
    Figure CN119599955A_ABST
Patent Text Reader

Abstract

The invention discloses a gear damage detection method and device, electronic equipment and a storage medium, and the main technical scheme comprises the steps: obtaining a to-be-recognized gear detection image, inputting the to-be-recognized gear detection image into a U-Net neural network, and obtaining a binary image mask of the to-be-recognized gear detection image outputted by the U-Net neural network; performing phenotype quantization on the binarized image mask to obtain a phenotype actual area of the foreground object; and determining that the phenotype actual area is a gear damage area, and determining whether the gear is damaged or not according to a preset gear damage area threshold value. According to the method, a to-be-recognized gear detection image is input into a U-Net neural network containing a residual structure, and an obtained binary image mask clearly distinguishes a foreground from a background, so that phenotype quantization is more accurate, and the gear damage area is accurately calculated. The gear damage detection accuracy is improved, the detection period is greatly shortened, the maintenance cost is reduced, and the production efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a gear damage detection method and device, electronic equipment and storage medium. Background Art

[0002] Industrial intelligence refers to the industrial revolution with intelligent manufacturing as the core, which realizes the artificial intelligence upgrade of industrial production based on the high integration of information technology and manufacturing technology. The goal of industrial intelligence is to effectively improve production efficiency, quality and flexibility through technologies such as automation, data analysis and deep learning, meet the personalized needs of modern industrial production, and create higher value. The intelligence of wind farms will change the traditional production methods and organizational models, improve resource utilization efficiency, reduce environmental pollution, etc. Its current technical application directions include the Internet of Things, cloud computing, neural networks, etc., which play a significant role in promoting the entire new energy production system.

[0003] Gears are a common mechanical transmission component, generally used to transmit power and motion, change speed and direction. Gears are subject to various forces during operation, such as bending stress, contact stress, friction and impact, which can cause gears to fail in the form of wear, deformation, breakage, etc. Gear failure can affect the performance and accuracy of transmission, and even cause mechanical failures and accidents, bringing serious consequences to production and safety.

[0004] Therefore, it is necessary to effectively detect and diagnose gears. Timely detection of gear defects and faults can improve the service life and reliability of gears and reduce maintenance costs and risks. At present, the traditional method is mainly manual visual inspection, which has problems such as slow measurement speed, low accuracy and strong subjectivity. Summary of the invention

[0005] The present invention provides a gear damage detection method, device, electronic device and storage medium, which are mainly intended to solve the problems of slow speed, low precision and strong subjectivity of manual visual detection.

[0006] According to a first aspect of the present disclosure, a method for detecting gear damage is provided, comprising:

[0007] Acquire a gear detection image to be identified, input the gear detection image to be identified into a U-Net neural network, and obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; and the U-Net neural network includes a residual structure;

[0008] Performing phenotype quantization on the binary image mask to obtain the phenotype actual area of ​​the foreground object;

[0009] The actual area of ​​the phenotype is determined to be the gear damage area, and whether the gear is damaged is determined based on a preset gear damage area threshold.

[0010] Optionally, performing phenotype quantization on the binary image mask to obtain the phenotype actual area of ​​the foreground object includes:

[0011] Performing edge detection processing on the binary image mask, calculating the gradient value of each pixel in the binary image mask, and extracting the edge coordinate matrix of the image mask;

[0012] Acquire the number of phenotypes in the binary image mask, and calculate the pixel perimeter of the binary image mask according to the edge of the binary image mask;

[0013] Calculating the actual perimeter of the binary image mask according to the ratio of the pixel perimeter to the actual length of the binary image mask;

[0014] The pixel points of the edge coordinate matrix are accumulated to obtain the actual area of ​​the foreground object.

[0015] Optionally, before inputting the gear detection image to be identified into a U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network, the method further includes:

[0016] The resolution of the gear detection image to be identified is compressed to make it conform to the preset model input format.

[0017] Optionally, before inputting the gear detection image to be identified into a U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network, the method further includes:

[0018] Acquire a training gear detection image, and input the training gear detection image into the U-Net neural network; wherein the training gear detection image includes a gear damage label;

[0019] Downsampling is performed based on the maximum pooling in the U-Net neural network, and the maximum pixel value of each small area of ​​the training gear detection image is taken;

[0020] The down-sampling result is up-sampled based on the maximum pooling in the U-Net neural network to increase the feature resolution of each of the small areas; wherein, in the up-sampling process, tensor addition is performed on the down-sampling result and the up-sampling result;

[0021] Interpolation is performed according to four adjacent pixel values ​​in the up-sampling result to obtain a target pixel value.

[0022] Optionally, after interpolating four adjacent pixel values ​​in the upsampling result to obtain a target pixel value, the method further includes:

[0023] The target pixel value is compared with the gear damage label in the training gear detection image, and the loss function is calculated. The model weight and bias of the U-Net neural network are optimized according to the loss function. After the bias of the U-Net neural network is less than a preset threshold, the training of the U-Net neural network is stopped; wherein the loss function includes an L1 norm.

[0024] Optionally, after stopping the training of the U-Net neural network, the method further includes:

[0025] The gear detection image to be identified is input into the trained U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the trained U-Net neural network.

[0026] According to a second aspect of the present disclosure, a gear damage detection device is provided, comprising:

[0027] A first output unit is used to obtain a gear detection image to be identified, input the gear detection image to be identified into a U-Net neural network, and obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; and the U-Net neural network includes a residual structure;

[0028] A processing unit, used for performing phenotype quantization on the binary image mask to obtain the phenotype actual area of ​​the foreground object;

[0029] The determination unit is used to determine that the actual area of ​​the phenotype is a gear damage area, and determine whether the gear is damaged according to a preset gear damage area threshold.

[0030] Optionally, the processing unit is further used for:

[0031] Performing edge detection processing on the binary image mask, calculating the gradient value of each pixel in the binary image mask, and extracting the edge coordinate matrix of the image mask;

[0032] Acquire the number of phenotypes in the binary image mask, and calculate the pixel perimeter of the binary image mask according to the edge of the binary image mask;

[0033] Calculating the actual perimeter of the binary image mask according to the ratio of the pixel perimeter to the actual length of the binary image mask;

[0034] The pixel points of the edge coordinate matrix are accumulated to obtain the actual area of ​​the foreground object.

[0035] Optionally, the device further comprises:

[0036] The preprocessing unit is used to input the gear detection image to be identified into the U-Net neural network in the first output unit, and before obtaining the binary image mask of the gear detection image to be identified output by the U-Net neural network, the resolution of the gear detection image to be identified is compressed to make it conform to the preset model input format.

[0037] Optionally, the device further comprises:

[0038] an acquisition unit, configured to acquire a training gear detection image before the first output unit inputs the gear detection image to be identified into a U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network, and input the training gear detection image into the U-Net neural network; wherein the training gear detection image includes a gear damage label;

[0039] A downsampling unit, used for downsampling based on the maximum pooling in the U-Net neural network, and taking the maximum pixel value of each small area of ​​the training gear detection image;

[0040] An upsampling unit, configured to upsample the downsampling result based on the maximum pooling in the U-Net neural network to increase the feature resolution of each of the small regions; wherein, in the upsampling process, tensor addition is performed on the downsampling result and the upsampling result;

[0041] An interpolation unit is used to perform interpolation according to four adjacent pixel values ​​in the up-sampling result to obtain a target pixel value.

[0042] Optionally, the device further comprises:

[0043] A calculation unit is used for, after the interpolation unit interpolates the four adjacent pixel values ​​in the upsampling result to obtain the target pixel value, comparing the target pixel value with the gear damage label in the training gear detection image, calculating the loss function, optimizing the model weight and deviation of the U-Net neural network according to the loss function, and stopping the training of the U-Net neural network after the deviation of the U-Net neural network is less than a preset threshold; wherein the loss function includes an L1 norm.

[0044] Optionally, the device further comprises:

[0045] The second output unit is used to input the gear detection image to be identified into the trained U-Net neural network after the computing unit stops training the U-Net neural network, so as to obtain a binary image mask of the gear detection image to be identified output by the trained U-Net neural network.

[0046] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0047] at least one processor; and

[0048] a memory communicatively connected to the at least one processor; wherein,

[0049] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0050] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0051] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

[0052] The present disclosure provides a gear damage detection method, device, electronic device and storage medium, and the main technical scheme includes: obtaining a gear detection image to be identified, inputting the gear detection image to be identified into a U-Net neural network, and obtaining a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; the U-Net neural network includes a residual structure; phenotypically quantifying the binary image mask to obtain the phenotypical actual area of ​​the foreground object; determining the phenotypical actual area as the gear damage area, and determining whether the gear is damaged according to a preset gear damage area threshold. Compared with the related art, the embodiment of the present application clearly distinguishes the foreground from the background by inputting the gear detection image to be identified into a U-Net neural network containing a residual structure, so that the phenotypical quantification is more accurate, thereby accurately calculating the gear damage area. The accuracy of gear damage detection is improved, the detection cycle is greatly shortened, the maintenance cost is reduced, and the production efficiency is improved.

[0053] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0055] Figure 1 A schematic flow chart of a method for detecting gear damage provided by an embodiment of the present disclosure;

[0056] Figure 2 A schematic flow chart of a method for detecting gear damage provided by an embodiment of the present disclosure;

[0057] Figure 3 A schematic flow chart of a method for detecting gear damage provided by an embodiment of the present disclosure;

[0058] Figure 4 A schematic diagram of the structure of a U-Net neural network provided in an embodiment of the present disclosure;

[0059] Figure 5 A schematic diagram of an encoding module and a decoding module provided in an embodiment of the present disclosure;

[0060] Figure 6 A schematic diagram of the structure of a gear damage detection device provided in an embodiment of the present disclosure;

[0061] Figure 7 A schematic diagram of the structure of a gear damage detection device provided in an embodiment of the present disclosure;

[0062] Figure 8 A schematic block diagram of an exemplary electronic device provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0063] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0064] The following describes a gear damage detection method, device, electronic device, and storage medium according to an embodiment of the present disclosure with reference to the accompanying drawings.

[0065] Figure 1 A schematic flow chart of a method for detecting gear damage provided in an embodiment of the present disclosure.

[0066] like Figure 1 As shown, the method comprises the following steps:

[0067] Step 101, obtain a gear detection image to be identified, input the gear detection image to be identified into a U-Net neural network, and obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; and the U-Net neural network includes a residual structure.

[0068] The U-Net neural network is an image segmentation model based on a convolutional neural network (CNN). It uses a symmetrical encoder-decoder structure that can effectively capture contextual information in the image. In the encoder part, the network gradually extracts image features through multiple convolutional layers and pooling layers; in the decoder part, the network gradually restores the spatial resolution of the image through upsampling and convolution operations, and generates the final binary image mask.

[0069] To improve the accuracy and robustness of segmentation, we introduced the residual structure in the U-Net neural network. The residual structure is a basic building block of a deep neural network, which solves the gradient vanishing problem caused by the increase of network depth through skip connections. Specifically, a residual block is added between each encoder block and decoder block, so that the network can learn deeper feature representations.

[0070] Step 102, phenotype quantization is performed on the binary image mask to obtain the phenotype actual area of ​​the foreground object.

[0071] It is necessary to separate the foreground object from the background in the binary image mask so that it can be processed separately, and use various image processing techniques (such as edge detection, morphological operations, etc.) to extract the contour of the foreground object, and estimate the actual area of ​​the foreground object by counting the number of pixels within the contour.

[0072] Step 103, determining that the actual area of ​​the phenotype is the gear damage area, and determining whether the gear is damaged according to a preset gear damage area threshold.

[0073] In some embodiments, first, a damaged area is defined, such as defects such as cracks, wear, and peeling. In a binary image, these defects are usually marked as foreground (white pixels). The damaged area is calculated by counting the foreground pixels in the binary image mask. This area can be the number of pixels or converted into an actual physical area, depending on the resolution and calibration of the image, which is not limited in the embodiments of the present application.

[0074] In some embodiments, a damage area threshold can be preset according to the design standards and quality requirements of the gear. This threshold is the standard line for judging whether the gear is damaged. If it exceeds this threshold, the gear is considered damaged. If the calculated damage area is less than or equal to the preset threshold, the gear damage degree is considered to be within an acceptable range and the gear is not damaged. If the calculated damage area is greater than the preset threshold, the gear damage degree is considered to exceed the acceptable range and the gear is damaged. After determining that the gear is damaged, the damaged gear can be marked, an alarm can be triggered, or it can be removed from the production line.

[0075] The present disclosure provides a method for detecting gear damage, and the main technical scheme includes: obtaining a gear detection image to be identified, inputting the gear detection image to be identified into a U-Net neural network, and obtaining a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; the U-Net neural network includes a residual structure; phenotypically quantifying the binary image mask to obtain the phenotypical actual area of ​​the foreground object; determining the phenotypical actual area as the gear damage area, and determining whether the gear is damaged according to a preset gear damage area threshold. Compared with the related art, the embodiment of the present application clearly distinguishes the foreground and the background by inputting the gear detection image to be identified into a U-Net neural network containing a residual structure, so that the phenotypical quantification is more accurate, thereby accurately calculating the gear damage area. The accuracy of gear damage detection is improved, the detection cycle is greatly shortened, the maintenance cost is reduced, and the production efficiency is improved.

[0076] In some embodiments, the calculation of the actual area of ​​the foreground object further includes the following steps; see Figure 2 , Figure 2 A schematic diagram of a process for detecting gear damage provided by an embodiment of the present disclosure:

[0077] Step 201 : performing edge detection processing on the binary image mask, calculating the gradient value of each pixel in the binary image mask, and extracting the edge coordinate matrix of the image mask.

[0078] After obtaining the binary image mask, the Sobel edge detection operator is used for edge detection. The Sobel edge detection operator detects edges based on the gray value change rate of the image. It uses two convolution kernels (corresponding to the x and y directions respectively) to calculate the gradient value of each pixel in the image. The edge coordinate matrix of the image mask is extracted. The function is implemented by the formula:

[0079]

[0080] In the above formula, Gx and Gy are the grayscale values ​​of the image after horizontal and vertical edge detection respectively, A is the original image matrix, x and y are the horizontal and vertical coordinates of the specific pixels in the image, G is the gradient, θ is the gradient direction, and when G is greater than a certain threshold, the pixel point with horizontal and vertical coordinates x and y is judged to be the coordinate point.

[0081] Step 202, obtaining the number of phenotypes in the binary image mask, and calculating the pixel perimeter of the binary image mask according to the edge of the binary image mask.

[0082] It realizes accurate extraction and analysis of the contour of the foreground object (such as gear) in the gear detection image to be identified, separates the foreground object from the background in the binary image mask so that it can be processed separately. Various image processing techniques (such as edge detection, morphological operations, etc.) can be used to extract the contour of the foreground object, and the actual area of ​​the foreground object can be estimated by calculating the number of pixels within the contour.

[0083] Step 203 : calculating the actual perimeter of the binary image mask according to the ratio of the pixel perimeter to the actual length of the binary image mask.

[0084] By extracting the pixel perimeter of the image mask from the binary image mask through the edge detection algorithm, and multiplying the pixel perimeter with the actual length ratio, we can get the actual perimeter of the image mask in the real world.

[0085] Step 204, accumulating the pixel points of the edge coordinate matrix to obtain the actual area of ​​the foreground object.

[0086] Phenotype quantification through image mask includes: obtaining the number of phenotypes by counting the number of image masks; calculating the pixel perimeter of the image mask for the edge of the image mask, and then multiplying it by the ratio of the actual length of the pixel and the pixel image to obtain the actual perimeter of the phenotype; accumulating the pixel points in the closed edge to obtain the pixel area of ​​the image mask, and then calculating the actual area of ​​the phenotype. The function is implemented by the formula:

[0087]

[0088] In the above formula, g is the actual area of ​​the image mask, f is the number of pixels in the image mask, and w is the actual area of ​​the image mask. 2 The pixel area is usually set to 1, r 2 Map the actual area size in reality for one pixel.

[0089] The actual area of ​​the final mask is the damaged area of ​​the gear surface.

[0090] Optionally, before inputting the gear detection image to be identified into a U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network, the method further includes:

[0091] The resolution of the gear detection image to be identified is compressed to make it conform to the preset model input format.

[0092] In some embodiments, in order to improve the recognition ability of the U-Net neural network, the U-Net neural network needs to be trained. Figure 3 , Figure 3 A schematic diagram of a process for detecting gear damage provided by an embodiment of the present disclosure:

[0093] Step 301, obtaining a training gear detection image, and inputting the training gear detection image into the U-Net neural network; wherein the training gear detection image includes a gear damage label.

[0094] In the process of building the U-Net neural network model for gear detection, a large number of gear images are collected. These images should cover gears of different types, sizes and states, especially various damage conditions, such as wear, fracture, tooth surface damage, etc. In order to ensure that the trained model has wide applicability, these images should be captured in the actual working environment or generated by simulation.

[0095] These training gear detection images with damage labels are input into the U-Net neural network. During the training process, the network will learn how to recognize and distinguish different parts of the gear from the input images, especially the damaged areas. Due to its unique encoder-decoder structure and skip connections, the U-Net neural network can effectively learn contextual information in the image and accurately locate the damaged area in the output.

[0096] Step 302, downsampling is performed based on the maximum pooling in the U-Net neural network, and the maximum pixel value of each small area of ​​the training gear detection image is taken.

[0097] Step 303, upsampling the downsampling result based on the maximum pooling in the U-Net neural network to increase the feature resolution of each of the small areas; wherein, during the upsampling process, tensor addition is performed on the downsampling result and the upsampling result.

[0098] Step 304: interpolate the four adjacent pixel values ​​in the up-sampling result to obtain a target pixel value.

[0099] Step 304: compare the target pixel value with the gear damage label in the training gear detection image, calculate the loss function, optimize the model weight and bias of the U-Net neural network according to the loss function, and stop training the U-Net neural network after the bias of the U-Net neural network is less than a preset threshold; wherein the loss function includes an L1 norm.

[0100] See also Figure 4 . Figure 4 A schematic diagram of the structure of a U-Net neural network provided in an embodiment of the present application; Figure 4 As shown in the figure, Input is the image input, CB1 and CB2 are encoding modules 1 and 2, DS is downsampling, ADD is tensor addition, Conv is the convolution layer, AT is the CMAM attention mechanism block, L1R is the L1 norm regularization, US is upsampling, and Output is the output. Downsampling is used to reduce the resolution of an image or feature map. Downsampling is usually used to reduce the size and computational complexity of feature maps, thereby improving the training and reasoning efficiency of neural networks. This research topic uses maximum pooling for downsampling. Maximum pooling takes the maximum value of the pixel value of each small area, thereby halving the size of the feature map. Upsampling is used to increase the resolution of the feature map. The subject model uses bilinear interpolation to interpolate based on the four adjacent pixel values ​​to obtain new pixel values.

[0101] The model input is an RGB image, and its resolution is compressed to make it fit the square input interface. The output is a binary image, with the white area being the identified foreground object and the black area being the background. By comparing with the label, the classification cross entropy CE is used as the loss function. The input is the model's predicted area and the true function of the data set. The output is a non-negative real number used to represent the difference between the model's predicted result and the true result.

[0102] The optimizer uses the Adam optimizer, which is an adaptive optimization algorithm that uses the first-order moment estimate and second-order moment estimate of the gradient to dynamically adjust the learning rate of each parameter. The first-order moment estimate is the exponential moving average of the gradient, and the second-order moment estimate is the exponential moving average of the square of the gradient, which is used to optimize the weights and biases of the neural network.

[0103] L1 regularization is a method to reduce model complexity. It penalizes the model's weight parameters by adding the L1 norm to the loss function, making some weight parameters become 0, thereby reducing the number of features and improving the model's generalization ability. The L1 norm formula is as follows:

[0104]

[0105] In the formula, L is the value of the L1 norm, x is the value of the non-zero element, the L1 norm is the sum of the absolute values ​​of all elements, and L1 regularization can be used for feature selection. When some features have little effect on the model, the weight parameter is set to 0 to remove these features that contribute less to the model, so that the model reduces redundant structure and the decoding module in the network can improve the accuracy of foreground recovery.

[0106] like Figure 5 As shown, Figure 5 A schematic diagram of an encoding module and a decoding module provided in an embodiment of the present application, such as Figure 5 As shown, Figure 5 In the figure, Conv is a convolutional layer, BN is a batch normalization layer, ReLU is a ReLU activation function, encoding module 1 is used when the input dimensions are different when residuals are added, encoding module 2 is used when the input dimensions are the same when residuals are added, and the decoding module is used for foreground restoration. The convolutional layer is the main layer type in the neural network, in the form of a matrix convolution kernel. The convolution kernel slides on the input data and performs a weighted sum operation to generate an output feature map. Generally, the input image data is convolved to generate an output feature map, which is used to extract the edge, corner, and texture features of the image data.

[0107] The Batch Normalization layer is a standard layer of a neural network, which is used to normalize the input data in the neural network. It improves the stability and convergence speed of the neural network by normalizing the input of each layer in the neural network to a distribution with a mean of 0 and a variance of 1. The ReLU activation function is one of the most commonly used activation functions in neural networks. When the input x is greater than 0, the output is equal to x. When the input is less than or equal to 0, the output is 0. When x is greater than 0, the derivative is 1. Therefore, it has relatively good numerical and gradient characteristics. CBAM (Convolutional Block Attention Module) is a lightweight convolutional attention module, which is a module that combines channel and spatial attention mechanisms.

[0108] The CBAM expression is as follows:

[0109]

[0110] In the above formula, F∈RC×H×W represents the module input feature, Mc∈RC×1×1 represents 1D channel attention, Ms∈R1×H×W represents 2D spatial attention, represents the multiplication of the same-position elements, Favg represents global average pooling, Fmax represents maximum pooling, W0∈RC / r×C and W1∈RC×C / r represent the fully connected weights respectively, and f7×7 represents the convolution layer with a convolution kernel size of 7x7.

[0111] Optionally, after stopping the training of the U-Net neural network, the method further includes:

[0112] The gear detection image to be identified is input into the trained U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the trained U-Net neural network.

[0113] Corresponding to the above-mentioned gear damage detection method, the present invention also provides a gear damage detection device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

[0114] Figure 6 A schematic diagram of the structure of a gear damage detection device provided by an embodiment of the present disclosure, such as Figure 6 As shown, including:

[0115] The first output unit 41 is used to obtain a gear detection image to be identified, input the gear detection image to be identified into a U-Net neural network, and obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; and the U-Net neural network includes a residual structure;

[0116] The processing unit 42 is used to perform phenotype quantization on the binary image mask to obtain the phenotype actual area of ​​the foreground object;

[0117] The determination unit 43 is used to determine that the actual area of ​​the phenotype is a gear damage area, and determine whether the gear is damaged according to a preset gear damage area threshold.

[0118] The gear damage detection device provided by the present disclosure has the following main technical solutions: obtaining a gear detection image to be identified, inputting the gear detection image to be identified into a U-Net neural network, and obtaining a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; the U-Net neural network includes a residual structure; phenotypically quantifying the binary image mask to obtain the phenotypical actual area of ​​the foreground object; determining the phenotypical actual area as the gear damage area, and determining whether the gear is damaged according to a preset gear damage area threshold. Compared with the related art, the embodiment of the present application clearly distinguishes the foreground and the background by inputting the gear detection image to be identified into a U-Net neural network including a residual structure, so that the phenotypical quantification is more accurate, thereby accurately calculating the gear damage area. The accuracy of gear damage detection is improved, the detection cycle is greatly shortened, the maintenance cost is reduced, and the production efficiency is improved.

[0119] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the processing unit 42 is also used for:

[0120] Performing edge detection processing on the binary image mask, calculating the gradient value of each pixel in the binary image mask, and extracting the edge coordinate matrix of the image mask;

[0121] Acquire the number of phenotypes in the binary image mask, and calculate the pixel perimeter of the binary image mask according to the edge of the binary image mask;

[0122] Calculating the actual perimeter of the binary image mask according to the ratio of the pixel perimeter to the actual length of the binary image mask;

[0123] The pixel points of the edge coordinate matrix are accumulated to obtain the actual area of ​​the foreground object.

[0124] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the device also includes:

[0125] The preprocessing unit 44 is used to input the gear detection image to be identified into the U-Net neural network in the first output unit 41, and before obtaining the binary image mask of the gear detection image to be identified output by the U-Net neural network, perform resolution compression on the gear detection image to be identified so that it conforms to the preset model input format.

[0126] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the device also includes:

[0127] The acquisition unit 45 is used to acquire a training gear detection image before the first output unit 41 inputs the gear detection image to be identified into the U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network, and input the training gear detection image into the U-Net neural network; wherein the training gear detection image includes a gear damage label;

[0128] A downsampling unit 46, configured to perform downsampling based on the maximum pooling in the U-Net neural network and take the maximum pixel value of each small area of ​​the training gear detection image;

[0129] An upsampling unit 47 is used to upsample the downsampling result based on the maximum pooling in the U-Net neural network to increase the feature resolution of each of the small areas; wherein, in the upsampling process, tensor addition is performed on the downsampling result and the upsampling result;

[0130] The interpolation unit 48 is used to perform interpolation according to four adjacent pixel values ​​in the up-sampling result to obtain a target pixel value.

[0131] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the device also includes:

[0132] A calculation unit 49 is used to interpolate the four adjacent pixel values ​​in the upsampling result in the interpolation unit 48 to obtain a target pixel value, compare the target pixel value with the gear damage label in the training gear detection image, calculate a loss function, optimize the model weight and deviation of the U-Net neural network according to the loss function, and stop training the U-Net neural network after the deviation of the U-Net neural network is less than a preset threshold; wherein the loss function includes an L1 norm.

[0133] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 7 As shown, the device also includes:

[0134] The second output unit 410 is used to input the gear detection image to be identified into the trained U-Net neural network after the calculation unit 49 stops training the U-Net neural network, and obtain a binary image mask of the gear detection image to be identified output by the trained U-Net neural network.

[0135] It should be noted that the above explanation of the method embodiment is also applicable to the device of the embodiment of the present disclosure, and the principle is the same, which is no longer limited in the embodiment of the present disclosure.

[0136] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0137] Figure 8 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0138] like Figure 8 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 502 or a computer program loaded from a storage unit 508 to a RAM (Random Access Memory) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O (Input / Output) interface 505 is also connected to the bus 504.

[0139] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0140] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as a method for detecting gear damage. For example, in some embodiments, the method for detecting gear damage may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the aforementioned gear damage detection method in any other appropriate manner (eg, by means of firmware).

[0141] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a special purpose or general purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0142] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0143] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0144] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0145] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0146] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0147] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0148] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0149] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for detecting gear damage, characterized in that: include: Acquire a gear detection image to be identified, input the gear detection image to be identified into a U-Net neural network, and obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; and the U-Net neural network includes a residual structure; Performing phenotype quantization on the binary image mask to obtain the phenotype actual area of ​​the foreground object; The actual area of ​​the phenotype is determined to be the gear damage area, and whether the gear is damaged is determined based on a preset gear damage area threshold.

2. The method according to claim 1, characterized in that The step of performing phenotype quantization on the binary image mask to obtain the phenotype actual area of ​​the foreground object comprises: Performing edge detection processing on the binary image mask, calculating the gradient value of each pixel in the binary image mask, and extracting the edge coordinate matrix of the image mask; Acquire the number of phenotypes in the binary image mask, and calculate the pixel perimeter of the binary image mask according to the edge of the binary image mask; Calculating the actual perimeter of the binary image mask according to the ratio of the pixel perimeter to the actual length of the binary image mask; The pixel points of the edge coordinate matrix are accumulated to obtain the actual area of ​​the foreground object.

3. The method according to claim 1, characterized in that Before inputting the gear detection image to be identified into a U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network, the method further includes: The resolution of the gear detection image to be identified is compressed to make it conform to the preset model input format.

4. The method according to claim 3, characterized in that Before inputting the gear detection image to be identified into a U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network, the method further includes: Acquire a training gear detection image, and input the training gear detection image into the U-Net neural network; wherein the training gear detection image includes a gear damage label; Downsampling is performed based on the maximum pooling in the U-Net neural network, and the maximum pixel value of each small area of ​​the training gear detection image is taken; The down-sampling result is up-sampled based on the maximum pooling in the U-Net neural network to increase the feature resolution of each of the small areas; wherein, in the up-sampling process, tensor addition is performed on the down-sampling result and the up-sampling result; Interpolation is performed according to four adjacent pixel values ​​in the up-sampling result to obtain a target pixel value.

5. The method according to claim 4, characterized in that After interpolating the four adjacent pixel values ​​in the up-sampling result to obtain the target pixel value, the method further includes: The target pixel value is compared with the gear damage label in the training gear detection image, and the loss function is calculated. The model weight and bias of the U-Net neural network are optimized according to the loss function. After the bias of the U-Net neural network is less than a preset threshold, the training of the U-Net neural network is stopped; wherein the loss function includes an L1 norm.

6. The method according to claim 5, characterized in that After stopping the training of the U-Net neural network, the method further includes: The gear detection image to be identified is input into the trained U-Net neural network to obtain a binary image mask of the gear detection image to be identified output by the trained U-Net neural network.

7. A gear damage detection device, characterized in that: include: A first output unit is used to obtain a gear detection image to be identified, input the gear detection image to be identified into a U-Net neural network, and obtain a binary image mask of the gear detection image to be identified output by the U-Net neural network; wherein the binary image mask includes a foreground object and a background; and the U-Net neural network includes a residual structure; A processing unit, used for performing phenotype quantization on the binary image mask to obtain the phenotype actual area of ​​the foreground object; The determination unit is used to determine that the actual area of ​​the phenotype is a gear damage area, and determine whether the gear is damaged according to a preset gear damage area threshold.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Cleaning method for internal cavity of GIS equipment and cleaning robot

    CN120606404A