A Local Feature Extraction Method and System for Small-Sample Bearing Surface Defects

Through the local feature extraction module and Hadamama product calculation, combined with global features, the problem of insufficient feature extraction caused by small sample size in the detection of bearing surface defects is solved, and the detection accuracy is improved.

CN119832267BActive Publication Date: 2025-07-18HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510023727.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-07-18
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

In the prior art, the bearing surface defect detection has the problem that the sample size is small, resulting in insufficient feature extraction and poor accuracy.

Method used

By designing a local feature extraction module, combining global features and local features, the correlation matrix is calculated using the Hadamar product and extracting features through a four-layer convolutional neural network to enhance feature information.

Benefits of technology

The classification accuracy of surface defect detection of small sample bearings is improved, the classification challenges under small sample data are solved, and innovative methods are provided in the case of scarcity of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832267B_ABST
    Figure CN119832267B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for extracting local features of small-sample bearing surface defects, belonging to the technical field of feature extraction. In order to solve the problems of insufficient feature extraction and poor extraction accuracy that occur in the process of extracting features of bearing surface defects with a generally small sample size. The design of local feature extraction in the present invention further extracts local feature information on the basis of global features, and represents the features in more detail. Compared with the existing small-sample image classification methods, certain improvements have been achieved on both the public dataset and the self-made bearing defect dataset. At the same time, the present invention first applies the small-sample learning method to solve the bearing surface defect classification task, solves the challenging task of few-sample bearing surface defect classification, overcomes the limited data availability, and provides an innovative method for classification tasks with scarce or difficult-to-obtain data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of feature extraction, and more particularly, to a method and system for extracting local features of small-sample bearing surface defects. Background Art

[0002] As a basic component widely used in mechanical equipment, the quality of bearings will seriously affect the stability of equipment operation. In recent years, with the rapid development of China's manufacturing industry, the demand for bearing products in various industries has been increasing continuously, and at the same time, the requirements for bearing quality have also been rising. Although China's machining technology has reached a relatively high level, it is inevitable to have certain damages in the mass production of bearings. Therefore, before leaving the factory, bearings must undergo strict inspection work to ensure that they can be used normally after leaving the factory. At present, domestic bearing manufacturers have basically achieved automated production and assembly line assembly, but the surface quality inspection after bearing assembly still relies on visual inspection by human eyes. At present, the research on intelligent detection algorithms for bearing surface defects has gradually attracted attention, and more and more deep learning algorithms have been applied to the field of bearing surface defect detection.

[0003] However, in the aspect of intelligent detection of bearing surface defects, there is generally a problem of small sample size, which will cause problems such as poor extraction accuracy and insufficient extraction during feature extraction, and has a serious impact on subsequent classification or recognition. For the phenomenon of insufficient feature extraction in existing small-sample image classification methods, in order to fully obtain category feature information, the present invention calculates the correlation between the global feature and its adjacent local features through a self-similarity descriptor, enriches the local feature information, increases the category information volume, and is more helpful to improve the classification accuracy. Summary of the Invention

[0004] The technical problem to be solved by the present invention is:

[0005] To solve the problems of insufficient feature extraction and poor extraction accuracy that occur in the process of extracting features of bearing surface defects with a generally small sample size.

[0006] The technical solution adopted by the present invention to solve the above technical problems:

[0007] The present invention provides a method for extracting local features of small-sample bearing surface defects, including the following steps:

[0008] S100. Map the image data at the input end to the same feature space through a feature embedding network, including obtaining the global feature representations of the input support set and query set in the feature space by passing the preprocessed input end image through the feature embedding network; the image data is a bearing surface defect image dataset;

[0009] S200. On the basis of extracting the input data features using the feature embedding module, design a local feature extraction module to further extract the local features of the samples;

[0010] S300. Combine the global and local information to obtain the fused features, which helps to distinguish between different categories in the small-sample image classification task.

[0011] Furthermore, in step S200, specifically,

[0012] S210. Send the support set and the query set into the feature embedding module after data preprocessing to obtain the global feature representation matrices of the support set and the query set of the input image data as where C represents the number of global feature channels, and H and W are the height and width of the global features respectively;

[0013] S220. Design a local feature extraction module to process the class prototypes and the global features of the query set obtained in step S210 to obtain the local features of the support set and the query set, which are used to enhance the feature information of the input data.

[0014] Furthermore, in step S220, it includes,

[0015] S221. Design a local feature extraction module to enhance the feature information of the input data, including the local feature extraction module processing the global features of the obtained support set and query set, and extracting local features through a sliding window on each channel; set the sliding window size to M × N , slide sequentially on the global feature, and each pixel point in the spatial dimension obtains its surrounding M × N -sized local block, so there are C local blocks on the same channel, each with a size of M×N, and the local feature block obtained by one pixel point is The local features extracted for each pixel point on all channels together form the neighborhood feature matrix where C represents the number of channels, H and W represent the height and width of the global features respectively, and M and N are the width and height of the sliding window;

[0016] S222. Process the global feature G, and its size after dimension elevation is to make its dimension consistent with the neighborhood feature matrix D;

[0017] S223. Perform the Hadamard product calculation between each pixel point in the dimension-elevated global feature G and the neighborhood feature matrix D composed of the local feature blocks around each pixel point to obtain the feature correlation matrix R. The calculation process for a certain pixel point is shown in Equation (1), and the calculation formulas for the global feature G and the domain feature matrix D are shown in Equation (2):

[0018] R(x) = G(x) ⊙ D(x) (1)

[0019] R = G ⊙ D (2)

[0020] Wherein, G(x) ∈ G, with a size of 1*1, x represents a certain pixel point in the global feature G, and x ∈ [1, H] × [1, W]; D(x) ∈ D, with a size of M×N, representing the local feature block around the pixel point x; the dot product represents the Hadamard product, R(x) ∈ R, with a size of M×N, representing the correlation between the pixel point and its surrounding features; the Hadamard products of the pixel points G and the neighborhood feature matrix D in all dimensions together form the final correlation matrix R, and

[0021] S224. Design a four-layer convolutional neural network to extract features from the correlation matrix R to obtain the local features of the support set and the query set.

[0022] Furthermore, in step S300, it includes obtaining the fused features by combining global and local information, as shown in formulas (3) and (4);

[0023]

[0024]

[0025] Wherein, S represents the fused feature obtained by combining the global feature and the local feature of the support set, and Q represents the fused feature obtained by combining the global feature and the local feature of the query set; G s represents the global feature of the support set output by the feature embedding network; G q represents the global feature of the query set output by the feature embedding network; L s represents the local graph feature of the support set output by the feature embedding network; L q represents the local feature of the query set output by the feature embedding network.

[0026] Furthermore, the bearing surface defect image dataset is the publicly available dataset mini-Imagenet, and the dataset preprocessing is to uniformly resize the input data size to 84*84.

[0027] Furthermore, the bearing surface defect image dataset includes bearing images with grooves, red rust, scratches, notches, qualified, mill scale, and pitting.

[0028] Furthermore, the feature embedding network is of the Conv64 structure, including 4 convolutional blocks; each convolutional block includes an activation function layer, a batch normalization layer, and a convolutional layer.

[0029] A local feature extraction system for small-sample bearing surface defects according to the present invention. This system has program modules corresponding to the above steps and executes the steps in the local feature extraction method for small-sample bearing surface defects when running.

[0030] A computer-readable storage medium according to the present invention, wherein the computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the local feature extraction method for small-sample bearing surface defects when called by a processor.

[0031] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0032] A local feature extraction method and system for small-sample bearing surface defects according to the present invention. The design of local feature extraction further extracts local feature information on the basis of global features and represents the features in more detail. Compared with existing small-sample image classification methods, certain improvements are achieved on both the public dataset and the self-made bearing defect dataset. At the same time, the present invention first applies the small-sample learning method to solve the bearing surface defect classification task, solves the challenging task of few-sample bearing surface defect classification, overcomes the limited data availability, and provides an innovative method for classification tasks with scarce or difficult-to-obtain data. Description of the Drawings

[0033] Figure 1 It is a structural diagram of a local feature extraction method for small-sample bearing surface defects in an embodiment of the present invention;

[0034] Figure 2 It is a schematic diagram of the feature embedding network structure in an embodiment of the present invention;

[0035] Figure 3 It is a heat map comparison of the output features of the public mini-ImageNet dataset in the benchmark network and the final method in the simulation experiment of the present invention;

[0036] Figure 4 It is a heat map comparison of the output features of the self-made bearing surface defect dataset in the benchmark network and the final method in the simulation experiment of the present invention. Detailed Embodiments

[0037] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings.

[0038] Specific Embodiment 1: Combining Figure 1 and Figure 2 As shown, the present invention provides a local feature extraction method for small-sample bearing surface defects, including the following steps:

[0039] S100. Map the image data at the input end to the same feature space through the feature embedding network, including obtaining the global feature representations of the input support set and query set in the feature space by passing the preprocessed input-end image through the feature embedding network; wherein, the data set is the publicly available data set mini-Imagenet, and the data set preprocessing is to uniformly resize the input data size to 84*84.

[0040] S200. On the basis of extracting the input data features using a common feature embedding module, design a local feature extraction module to further extract the local features of the samples, so as to extract as much feature information as possible under the limitations of few-shot and shallow feature embedding networks.

[0041] Combined Figure 2 As shown, the feature embedding network in this step can select the common Conv64 structure, including 4 convolutional blocks; each convolutional block consists of an activation function layer, a batch normalization layer and a convolutional layer; at the same time, to reduce overfitting, a max pooling layer is introduced after the first two convolutional blocks.

[0042] S210. After preprocessing the support set and query set, send them into the feature embedding module to obtain the global feature representation matrices of the support set and query set of the input image data as where C represents the number of global feature channels, and H and W are the height and width of the global features respectively.

[0043] S220. During the meta-training and meta-testing of few-shot image classification, the number of support sets for each category is small, and generally 1 or 5 data are used to represent the features of that category, which is not conducive to distinguishing between different categories; to improve the accuracy of few-shot image classification, more information that can represent the features of that category needs to be obtained under the condition of limited data; the local self-similarity descriptor can represent the local characteristic information of the image, including the object skeleton, color, edge or other common local feature information; inspired by the local self-similarity descriptor, combined Figure 1 As shown, the present invention designs a local feature extraction module to enhance the feature information of the input data and increase the distinguishability between different categories, including

[0044] S221. The local feature extraction module processes the obtained class prototype and the global features of the query set, uses the unfold function to extract local patches from the multi-dimensional global features through a sliding window, sets the sliding window size to M×N, slides sequentially on the global features, and each pixel point in the spatial dimension obtains a local patch of size M×N around it, so there are C local patches of the same size M×N on the same channel, and the local feature patch obtained by one pixel point is The local features extracted for each pixel on all channels together form the neighborhood feature matrix. Among them, C represents the number of channels, H and W respectively represent the height and width of the global feature, and M and N are respectively the width and height of the sliding window.

[0045] S222. Process the global feature G, and after dimension elevation, its size is Make its dimension consistent with that of the neighborhood feature matrix D.

[0046] S223. Perform Hadamard product calculation on each pixel in the dimension-elevated global feature G and the neighborhood feature matrix D composed of local feature blocks around each pixel to obtain the feature correlation matrix R. The calculation process of a certain pixel is shown in Equation (1), and the calculation formula of the global feature G and the domain feature matrix D is shown in Equation (2):

[0047] R(x) = G(x) ⊙ D(x) (1)

[0048] R = G ⊙ D (2)

[0049] Among them, G(x) ∈ G, with a size of 1*1, x represents a certain pixel in the global feature G, and x ∈ [1, H] × [1, W]; D(x) ∈ D, with a size of M × N, representing the local feature block around the pixel point x; the dot product represents the Hadamard product, R(x) ∈ R, with a size of M × N, representing the correlation between the pixel point and its surrounding features; the Hadamard products of the pixel points G and the neighborhood feature matrix D in all dimensions together form the final correlation matrix R, and

[0050] S224. In order to better fuse the features in the two dimensions of channels and space, design a four-layer convolutional neural network to extract features from the correlation matrix R to obtain the local features of the support set and the query set.

[0051] S300. Combine the global and local information to obtain the fused feature, as shown in Equation (3) and Equation (4); the design of the local feature extraction module is based on the global feature, calculates the correlation matrix, and extracts the local structure, texture information, and color and intensity relationships of the input features; combining the global and local feature information is more helpful for distinguishing between different categories in the small-sample image classification task.

[0052]

[0053]

[0054] Among them, S represents the fused feature obtained by combining the global feature and the local feature of the support set, Q represents the fused feature obtained by combining the global feature and the local feature of the query set; G sRepresents the global feature of the support set output by the feature embedding network; G q Represents the global feature of the query set output by the feature embedding network; L s Represents the local graph feature of the support set output by the feature embedding network; L q Represents the local feature of the query set output by the feature embedding network.

[0055] Specific implementation plan two: A local feature extraction system for small-sample bearing surface defects of the present invention. This system has program modules corresponding to the above steps and executes the steps in the above-mentioned local feature extraction method for small-sample bearing surface defects when running.

[0056] Other combinations and connection relationships in this implementation plan are the same as those in the first specific implementation plan.

[0057] Specific implementation plan three: A computer-readable storage medium of the present invention. The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the local feature extraction method for small-sample bearing surface defects when called by a processor.

[0058] Other combinations and connection relationships in this implementation plan are the same as those in the first specific implementation plan.

[0059] Simulation experiment

[0060] The method of the present invention is improved on the basis of the framework structure of the prototype network. The prototype network mainly includes two parts: a feature embedding network and a metric function. Among them, the feature embedding network is a commonly used four-layer convolutional layer, and the Euclidean distance is selected as the metric function.

[0061] First, train and test on the benchmark network (Base); second, introduce a local feature extraction module and a similar feature attention module on the basis of the benchmark network respectively to form Base+LFE and Base+SFA; finally, add the above two modules to the benchmark network at the same time to form the final method of the present invention, Base+LFE+SFA.

[0062] Table 1 Simulation experiment of the method of the present invention on bearing surface defect data

[0063]

[0064] By observing the simulation experiment results in Table 1, it can be found that on the self-made bearing defect dataset, under the experimental setting of 5N 5-shot, compared with the classification accuracy of the baseline network, after introducing the local feature extraction module, the classification accuracy is improved by 1.82%; after introducing the similar feature attention module, the classification accuracy is improved by 6.71%; after adding both modules to the baseline network, the classification accuracy is improved by 8.60%. The simulation experiment proves that the method for classifying small-sample bearing surface defects designed in the present invention is effective.

[0065] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art of the present invention can make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will all fall within the protection scope of the present invention.

Claims

1. A method for extracting local features of small-sample bearing surface defects, characterized in that, Including the following steps: S100. Map the image data at the input end into the same feature space through a feature embedding network, including passing the preprocessed input-end image through the feature embedding network to obtain the global feature representations of the input support set and query set in the feature space; the image data is a bearing surface defect image dataset. S200. On the basis of extracting the input data features by using the feature embedding module, design a local feature extraction module to further extract the local features of the samples. Specifically including, S210. After preprocessing the support set and the query set through data preprocessing, they are sent into the feature embedding module, and the global feature representation matrices of the support set and the query set of the input image data are where C represents the number of global feature channels, and H and W are the height and width of the global features respectively; S220. Design a local feature extraction module to process the class prototypes and the global features of the query set obtained in step S210 to obtain the local features of the support set and the query set, which are used to enhance the feature information of the input data; including, S221. Design a local feature extraction module to enhance the feature information of the input data, including that the local feature extraction module processes the global features of the obtained support set and query set, and extracts local features through a sliding window on each channel; set the size of the sliding window to M×N, slide it sequentially on the global feature, and each pixel point in the spatial dimension obtains a local block of size M×N around it. Therefore, there are C local blocks of the same size M×N on the same channel, and the local feature block obtained by one pixel point is The local features extracted for each pixel point on all channels together form a neighborhood feature matrix where C represents the number of global feature channels, H and W represent the height and width of the global feature respectively, and M and N are the width and height of the sliding window respectively; S222. Process the global feature G. After dimension elevation, its size is to make its dimension consistent with that of the neighborhood feature matrix D; S223. Perform Hadamard product calculation on each pixel point in the upsampled global feature G and the neighborhood feature matrix D composed of local feature blocks around each pixel point to obtain a feature correlation matrix R. The calculation process of a certain pixel point is shown in formula (1), and the calculation formulas of the global feature G and the domain feature matrix D are shown in formula (2): R(x) = G(x) ⊙ D(x) (1) R = G ⊙ D (2) Among them, G(x) ∈ G, with a size of 1*1, where x represents a certain pixel point in the global feature G, and x ∈ [1, H] × [1, W]; D(x) ∈ D, with a size of M×N, representing the local feature block around the pixel point x; the dot product represents the Hadamard product, and R(x) ∈ R, with a size of M×N, representing the correlation between this pixel point and its surrounding features; the Hadamard products of the pixel point G and the neighborhood feature matrix D in all dimensions together form the final correlation matrix R, and S224. Design a four-layer convolutional neural network to extract features from the correlation matrix R to obtain the local features of the support set and the query set. S300. Combine the global and local information to obtain a fused feature, which helps to distinguish between different categories in the small-sample image classification task.

2. The local feature extraction method for small-sample bearing surface defects according to claim 1, characterized in that: In step S300, including, combining the global and local information to obtain a fused feature, as shown in formula (3) and formula (4); Among them, S represents the fused feature obtained by combining the global feature and the local feature of the support set, and Q represents the fused feature obtained by combining the global feature and the local feature of the query set; G s represents the global feature of the support set output by the feature embedding network; G q represents the global feature of the query set output by the feature embedding network; L s represents the local graph feature of the support set output by the feature embedding network; L q represents the local feature of the query set output by the feature embedding network.

3. A method for extracting local features of small-sample bearing surface defects according to claim 1, characterized in that: The bearing surface defect image dataset is the publicly available dataset mini-Imagenet, and the dataset preprocessing is to uniformly resize the input data size to 84*84.

4. A method for extracting local features of small-sample bearing surface defects according to claim 3, characterized in that: The bearing surface defect image dataset includes bearing images with grooves, red rust, scratches, indentations, qualified, mill scale, and pitting.

5. A method for extracting local features of small-sample bearing surface defects according to claim 1, characterized in that: The feature embedding network is a Conv64 structure, including 4 convolutional blocks; each convolutional block includes an activation function layer, a batch normalization layer, and a convolutional layer.

6. A local feature extraction system for small-sample bearing surface defects, characterized in that: This system has program modules corresponding to the steps of any one of the above claims 1-5, and when running, executes the steps in the above method for extracting local features of small-sample bearing surface defects.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the method for extracting local features of small-sample bearing surface defects according to any one of claims 1-5 when called by a processor.