A circular bushing defect detection method and system based on visual neural network

Through an automated inspection method based on visual neural network, using image segmentation and defect detection network, combined with Transformer encoder and ResNet50 network, a channel attention mechanism is introduced to solve the problem of low efficiency and accuracy of circular bushing detection, and achieve high efficiency , accurate automated detection.

CN118379296BActive Publication Date: 2024-09-27YANTAI DONGZE AUTO PARTS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410831239.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-27
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

In the existing technology, the defect detection efficiency and accuracy of circular bushings are low, and relying on manual visual inspection is inefficient and inaccurate, and is greatly affected by human factors.

Method used

An automated detection method based on visual neural network is adopted. By constructing an image segmentation network and a defect detection network, the Transformer encoder and ResNet50 network are used to extract features, and a channel attention mechanism is introduced to realize automated defect detection of circular bushings.

Benefits of technology

It improves detection accuracy and efficiency, reduces labor costs, enables continuous automated detection of batch products, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379296B
    Figure CN118379296B
Patent Text Reader

Abstract

The present invention relates to the field of computer vision technology, and in particular to a circular bushing defect detection method and system based on a visual neural network. The method comprises: obtaining a training image data set and preprocessing the image data set; building an image segmentation network based on the acquired image data set, including using linear projection to segment the image into non-overlapping blocks; using an encoder to extract the attention relationship of the image features after segmentation, and classifying the output of the image segmentation network through a linear classifier; building a defect detection network according to the output classification of the image segmentation network, introducing a channel attention mechanism for each stage in the defect detection network, and feeding back all attention information to the original feature map; using the defect detection network to output the detection results, the present invention can help the network highlight important target information in the image by adding a channel attention mechanism, and improve the network's perception of the target part.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a circular bushing defect detection method and system based on visual neural network. Background Art

[0002] In the existing technology, with the rapid development of computer vision and deep learning technology, the defect detection method based on visual neural network has gradually become a research hotspot. This method uses the neural network model to automatically process and analyze the image, which can effectively improve the accuracy and stability of defect detection. In addition, the bushing is a key component widely used in bearings, valves, engines and other components. It has the functions of reducing wear and maintaining sealing, and is an important part to ensure the normal operation of equipment and extend its service life. With the development of industrial production and technological progress, the demand for bushings is increasing. However, in the current bushing production process, due to the tolerance of the operating machinery or the operator's minor mistakes, it may cause the bushing to have defects such as chamfers, cracks at the closure, and surface depressions. More obvious defects will be manually eliminated during the production of the corresponding steps, but some less obvious defects will still enter the subsequent process. Currently, only manual inspection can be relied upon as the last inspection procedure to ensure product quality. However, manual inspection of defects can only inspect a single bushing at a time and the efficiency is slow. Traditional circular bushing defect detection usually relies on manual visual inspection. This method has the disadvantage of manual subjective judgment, which is not only inefficient, but also easily affected by human factors, resulting in inaccuracy and instability in defect detection. At this stage, a circular bushing defect detection method and system based on visual neural network is needed. Summary of the invention

[0003] In order to solve the problem of low efficiency and accuracy of circular bushing defect detection, the present invention provides a circular bushing defect detection method and system based on visual neural network, which improves the circular bushing defect detection efficiency by constructing an automated circular bushing defect detection process.

[0004] In the first aspect, the present invention provides a circular bushing defect detection method based on a visual neural network, which adopts the following technical solution:

[0005] A circular bushing defect detection method based on visual neural network, comprising:

[0006] Obtain a training image dataset and preprocess the image dataset;

[0007] Building an image segmentation network based on the acquired image dataset, including segmenting the image into non-overlapping blocks using linear projection;

[0008] The Transformer encoder is used to extract the attention relationship of the segmented image features, and the output of the image segmentation network is classified by a linear classifier;

[0009] The defect detection network is built according to the output classification of the image segmentation network, including building the ResNet50 network backbone and building a network structure composed of multiple residual blocks to extract features at different levels;

[0010] A channel attention mechanism is introduced to each stage of the defect detection network, and all attention information is fed back to the original feature map;

[0011] The defect detection network is used to output the detection results.

[0012] Furthermore, the method obtains a training image data set and preprocesses the image data set, including obtaining a position image of the circular bushing and obtaining position images of different types of defects on the circular bushing, generating a Gaussian noise image of the same size as the sampled image in the image data set, and superimposing the generated Gaussian noise image with the corresponding image, and mirror-flipping all the sampled images after the superposition is completed.

[0013] Furthermore, the image segmentation network is constructed based on the acquired image data set, including: Perform linear projection segmentation into non-overlapping blocks and label each block. The output is obtained by linear projection segmentation:

[0014]

[0015] in is the embedding dimension, class label As the entire image is represented, is the height of the input image, is the width of the input image, is the number of channels.

[0016] Furthermore, the method of extracting the feature attention relationship of the segmented image by using the Transformer encoder includes taking the segmented image block as the input of the Transformer encoder, generating an attention matrix by using a multi-head attention module, obtaining the query q, key k and value v through three embedding functions, and extracting features from the attention matrix to generate a feature map according to a multi-layer perceptron with a linear activation function. The formula for generating the attention matrix is:

[0017]

[0018] Among them, among them, Expressed as The attention matrix of the layer, is denoted as the embedding dimension, q is denoted as the query vector, k is denoted as the key vector, and v is denoted as the value vector.

[0019] Furthermore, the output of the image segmentation network is classified by a linear classifier, including passing the output of the last layer of the segmentation network into a linear layer, converting the high-dimensional features of the segmentation network output into the same dimension as the number of categories through the linear layer, multiplying the output features with a weight matrix and adding a bias to obtain a classification result matrix, and performing probability distribution processing on the classification result matrix using a softmax function to obtain a probability distribution corresponding to each category at each pixel position, selecting the category with the highest probability as the classification result of the pixel, and classifying pixels with the same classification into the same segmentation area.

[0020] Furthermore, the defect detection network is built according to the output classification of the image segmentation network, including building a ResNet50 network backbone and a network structure consisting of multiple stages, wherein the first stage uses a 7×7 convolution layer with a step size of 2 to enhance the feature dimension, and performs pooling operations through a 3×3 maximum pooling layer, and the other stages are composed of two convolution modules Conv_1 and Conv_2, wherein the Conv_1 reduces the feature map through a 1×1 convolution layer with a step size of s, extracts features using a 3×3 convolution layer, and finally enhances the feature dimension using a 1×1 convolution layer, wherein the Conv_2 reduces the feature dimension through a 1×1 convolution layer, then extracts features using a 3×3 convolution layer, and restores the feature dimension through a 1×1 convolution layer.

[0021] Furthermore, the channel attention mechanism is introduced into each stage of the defect detection network, including compressing the output feature map of the defect detection network from the high direction and the wide direction respectively, obtaining the compression matrix of the feature values ​​in the high direction and the wide direction, fusing the compression matrix in the high direction and the wide direction and extracting the position information using a 1×1 convolution layer, separating the fused compression matrix into two independent tensors, and using the other two The convolution layer changes the number of channels to C, and finally feeds back all attention information to the original feature map. The compression matrix fusion formula in the height direction and width direction is:

[0022]

[0023] in, Represented as the ReLU activation function, Expressed as a weight matrix, Represented as a high-order compression matrix, Represented as a compression matrix in the width direction.

[0024] In a second aspect, a circular bushing defect detection system based on a visual neural network comprises:

[0025] The data acquisition module is configured to: acquire a training image data set and preprocess the image data set;

[0026] The segmentation network module is configured to: construct an image segmentation network based on the acquired image data set, including segmenting the image into non-overlapping blocks using linear projection;

[0027] The transformation module is configured to: extract the feature attention relationship of the segmented image using the Transformer encoder and classify the output of the image segmentation network through a linear classifier;

[0028] The defect detection module is configured to: build a defect detection network according to the output classification of the image segmentation network, including building a ResNet50 network backbone and building a network structure composed of multiple residual blocks for extracting features at different levels;

[0029] The attention mechanism module is configured to: introduce a channel attention mechanism to each stage in the defect detection network and feed back all attention information to the original feature map;

[0030] The output module is configured to output the detection result using the defect detection network.

[0031] In a third aspect, the present invention provides a computer-readable storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, for example, a circular bushing defect detection method based on a visual neural network.

[0032] In a fourth aspect, the present invention provides a terminal device including a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded and executed by the processor to implement the circular bushing defect detection method based on a visual neural network.

[0033] In summary, the present invention has the following beneficial technical effects:

[0034] 1. The present invention can help the network highlight important target information in the image by adding a channel attention mechanism. Through the learned attention weights, the network can automatically select the feature channels that are most useful for the target detection task and give them higher weights, which helps to improve the network's perception of the target part, making the network pay more attention to the features that contribute more to target detection, thereby improving detection accuracy.

[0035] 2. The present invention uses convolutional neural networks and attention mechanisms to perform image segmentation and defect detection on batches of bushing products, greatly improving the detection efficiency of bushing products while ensuring accuracy, and uses defect detection networks to achieve automated defect detection without manual intervention. This can improve detection efficiency, reduce labor costs, and enable continuous defect detection on large-scale production lines. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is an overall flow chart of a circular bushing defect detection method based on a visual neural network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0038] Example 1

[0039] Reference Figure 1 , a circular bushing defect detection method based on a visual neural network in this embodiment includes:

[0040] Obtain a training image dataset and preprocess the image dataset;

[0041] Building an image segmentation network based on the acquired image dataset, including segmenting the image into non-overlapping blocks using linear projection;

[0042] The Transformer encoder is used to extract the attention relationship of the segmented image features, and the output of the image segmentation network is classified by a linear classifier;

[0043] The defect detection network is built according to the output classification of the image segmentation network, including building the ResNet50 network backbone and building a network structure composed of multiple residual blocks to extract features at different levels;

[0044] A channel attention mechanism is introduced to each stage of the defect detection network, and all attention information is fed back to the original feature map;

[0045] The defect detection network is used to output the detection results.

[0046] Specifically, a circular bushing defect detection method based on a visual neural network in this embodiment includes the following steps:

[0047] S1, obtaining a training image dataset and preprocessing the image dataset;

[0048] The training dataset was constructed. For the image segmentation dataset, the locations where circular bushings are prone to defects were photographed and sampled. 100 images were sampled for each location and labeled accordingly. For the defect detection dataset, 100 images were sampled for each type of defect that appeared on the circular bushing and labeled accordingly. For all sampled images, noise that conforms to the Gaussian distribution was added for data enhancement, including adjusting the required noise intensity by adjusting the standard deviation of the noise. A larger standard deviation will produce stronger noise. For each sampled image, a random number generator was used to generate a random number matrix of the same size as the image from a Gaussian distribution with a mean of 0 and a standard deviation of σ to obtain a Gaussian noise image of the same size as the image. The pixel values ​​of the Gaussian noise image were added to the pixel values ​​of the image at the corresponding position by element-by-element addition to complete data enhancement, and all sampled images were mirrored to enhance the generalization ability of the network.

[0049] S2. Building an image segmentation network based on the acquired image dataset, including segmenting the image into non-overlapping blocks using linear projection;

[0050] Image segmentation network construction, for the input image Use linear projection to split into non-overlapping blocks, label each block to indicate whether they belong to the target category such as defects, etc., and obtain the output by linear projection segmentation:

[0051]

[0052] in is the embedding dimension, class label As the entire image is represented, is the height of the input image, is the width of the input image, is the number of channels.

[0053] S3, use the Transformer encoder to extract the attention relationship of the segmented image features, and classify the output of the image segmentation network through a linear classifier;

[0054] The Transformer encoder is used to extract the attention relationship of the segmented image features. The encoder consists of L layers, each of which consists of a multi-head attention module (MSA) and two multi-layer perceptrons (MLP) with linear activation functions. The MSA is used to generate the attention matrix. For the input features of the current layer, three embedding functions are used to obtain the query ,key ,value ,Attention Matrix Obtained by the following formula:

[0055]

[0056] in, It is The attention matrix of the layer, is the embedding dimension, q represents the query vector, k represents the key vector, and v represents the value vector. For the multi-head attention mechanism, the current layer outputs features Obtained by the following formula:

[0057]

[0058] in, Representative Layer The attention matrix of each head, is a learnable weight matrix used to restore the dimension, As the Layer Input .

[0059] After passing through the L-layer encoder, the final output feature is obtained , the output features A linear layer is passed in, and the high-dimensional features output by the segmentation network are converted into the same dimension as the number of categories through the linear layer. The output features are multiplied by the weight matrix and the bias is added to obtain the classification result matrix. The classification result matrix is ​​processed by probability distribution using the softmax function to obtain the probability distribution of each pixel position corresponding to each category. The category with the highest probability is selected as the classification result of the pixel, and pixels with the same classification are classified into the same segmentation area.

[0060] The hyperparameters of the circular bushing image segmentation network implementation are: The input dimension of the data is , linear projection dimension , embedding dimension , the number of multi-head attention , Number of layers , the input batch size is 16, the Adma optimizer is used for parameter optimization, and the learning rate is , and use the weight decay strategy, the decay amount is .

[0061] S4. Build a defect detection network based on the output classification of the image segmentation network, including building a ResNet50 network backbone and a network structure composed of multiple residual blocks to extract features at different levels;

[0062] Defect detection network is built. The network backbone is composed of ResNet50. The network structure consists of 5 stages. The first stage uses , the convolution with a stride of 2 increases the feature dimension to 64, using , the maximum pooling layer with a step size of 2 performs pooling operation, and finally reduces the size of the feature map ; The remaining four stages consist of two convolutional modules Conv_1 and Conv_2. Conv_1 first passes through a , a convolutional layer with a step size of s, with different step sizes s at different stages, and shrinks the input feature map, and then passes through a The convolutional layer performs feature extraction and finally passes through a The convolution layer increases the dimension by 4 times to obtain the feature output, and the residual connection is used , a convolutional layer with a step size of s and increases the dimension by 4 times to ensure that it is the same as the output dimension and size, and adds the residual to the feature output to obtain the next layer input. Conv_2 first passes through a Convolutional layer, the dimension is reduced by 4 times, and then used The convolutional layer extracts features and finally uses The convolution layer restores the feature dimension, and the input is directly added to the output as the residual to obtain the input of the next layer. In addition, each convolution layer uses batch normalization and Relu activation function. The second stage first passes through the Conv_1 layer with s=1, and then passes through two Conv_2 layers; the third, fourth, and fifth stages all first pass through the Conv_1 layer with s=2, but the number of Conv_2 layers is 3, 5, and 2 respectively. Finally, the Softmax function is used to obtain the binary classification result.

[0063] The image segmentation network is responsible for segmenting the input image into different areas, including defect areas. In this way, the defect detection network can focus on in-depth analysis and detection of these defect areas to improve the accuracy and efficiency of detection. The output of the image segmentation network is used as the input of the defect detection network. Through the collaborative work of the two networks, the defects in the circular bushing image can be accurately located and accurately determined.

[0064] S5. Introduce a channel attention mechanism for each stage in the defect detection network and feed back all attention information to the original feature map;

[0065] A novel channel attention mechanism is added in each stage. Human vision tends to first perceive information that helps understand the image content and ignore unimportant information. In the target detection network, introducing the attention mechanism into feature extraction can effectively improve the network's ability to collect target information so as to obtain higher weights for the target part. After any convolution transformation U, the entire feature map is compressed to a single feature dimension, which is expressed as:

[0066]

[0067] in, and Represents the length and width of the input feature map, represents a single feature dimension, and U represents the feature dimension. Compressed to a single feature dimension In order to utilize the feature information aggregated by the squeezing operation, the fully connected layer is used to reduce its dimension by r times, and then restored to C by the fully connected layer after passing through the nonlinear function. Finally, the Sigmoid function is used to expand it to the original shape and add it to the original input to obtain the attention between channels. This incentive method is expressed as:

[0068]

[0069] in, is the Sigmoid function, and There are two weight matrices, is the Relu function. We have improved the current SE attention module and proposed a channel attention module CSE that adds position information. After any convolution transformation U, the original feature map is compressed in the height direction and width direction respectively. This method is expressed as:

[0070]

[0071]

[0072] Among them, H and W are the height and width of the input feature map. In order to capture the location information in the feature, the two compressed matrices are deformed and fused. The convolutional layer extracts the position information, which is expressed as:

[0073]

[0074] in, is the ReLU activation function, the weight matrix ,r is the reduction ratio of the control block size to reduce the computational overhead, Represented as a high-order compression matrix, is represented as a compression matrix in the width direction. Separate into two independent tensors and . Using the other two The convolution layer changes the number of channels to C. The entire improved channel attention module consists of a dual stream of SE attention mechanism and position attention mechanism. Finally, all attention information is fed back to the original feature map, and a new feature map with added attention is obtained through convolution operation for the next layer of training.

[0075] S6. Output the detection results using the defect detection network;

[0076] First, each batch A total of 40 round bushings are transported to the inspection area by a conveyor belt. The camera above takes pictures. The controller controls 4 different shooting angles to ensure that all parts of the bushing are photographed. The captured images are transmitted to the server. The images first pass through the image segmentation network, and the effective inspection area will be further transmitted to the defect detection network. Once the defective image is detected, the inspection area will release the bushing where the image is located, and the defective bushing will be transported to the defective area via the conveyor belt. The qualified bushings will continue to flow backwards.

[0077] Example 2

[0078] The difference between this embodiment and Embodiment 1 is that this embodiment provides a circular bushing defect detection system based on a visual neural network.

[0079] The data acquisition module is configured to: acquire a training image data set and preprocess the image data set;

[0080] The segmentation network module is configured to: construct an image segmentation network based on the acquired image data set, including segmenting the image into non-overlapping blocks using linear projection;

[0081] The transformation module is configured to: extract the feature attention relationship of the segmented image using the Transformer encoder and classify the output of the image segmentation network through a linear classifier;

[0082] The defect detection module is configured to: build a defect detection network according to the output classification of the image segmentation network, including building a ResNet50 network backbone and building a network structure composed of multiple residual blocks for extracting features at different levels;

[0083] The attention mechanism module is configured to: introduce a channel attention mechanism to each stage in the defect detection network and feed back all attention information to the original feature map;

[0084] The output module is configured to output the detection result using the defect detection network.

[0085] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, for example, a circular bushing defect detection method based on a visual neural network.

[0086] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded and executed by the processor to implement a circular bushing defect detection method based on a visual neural network.

[0087] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A circular bushing defect detection method based on visual neural network, characterized in that: include: Obtain a training image dataset and preprocess the image dataset; The image segmentation network is constructed based on the acquired image dataset, including using linear projection to divide the image into non-overlapping blocks and Perform linear projection segmentation into non-overlapping blocks and label each block. The output is obtained by linear projection segmentation: in, is the embedding dimension, class label As the entire image is represented, is the height of the input image, is the width of the input image, is the number of channels; The Transformer encoder is used to extract the attention relationship of the segmented image features, and the output of the image segmentation network is classified by a linear classifier; The defect detection network is built according to the output classification of the image segmentation network, including building the ResNet50 network backbone and building a network structure composed of multiple residual blocks to extract features at different levels; A channel attention mechanism is introduced to each stage in the defect detection network, including introducing the attention mechanism into feature extraction to obtain higher weights for the target part. After any convolution transformation U, the entire feature map is compressed to a single feature dimension, which is expressed as: in, and represents the length and width of the input feature map, Represents a single feature dimension, U represents the feature dimension, and the original feature map is squeezed by this operation Compressed to a single feature dimension , use the fully connected layer to first reduce its dimension by r times, then use the fully connected layer to restore it to C after passing the nonlinear function, and finally use the Sigmoid function to expand it to the original shape and add it to the original input to obtain the attention between channels. This incentive method is expressed as: in, is the Sigmoid function, and There are two weight matrices, The ReLU function compresses the output feature map of the defect detection network from the height direction and the width direction respectively to obtain the compression matrix of the feature values ​​in the height direction and the width direction. The compression matrix in the height direction and the width direction are fused and the position information is extracted using a 1×1 convolution layer. The fused compression matrix is ​​separated into two independent tensors and the other two are used to extract the position information. The convolution layer changes the number of channels to C, and finally feeds back all attention information to the original feature map. The compression matrix fusion formula in the height direction and width direction is: in, Represented as the ReLU activation function, Expressed as a weight matrix, Represented as a high-order compression matrix, It is represented as a compressed matrix in the width direction, and all attention information is fed back to the original feature map; The defect detection network is used to output the detection results.

2. A circular bushing defect detection method based on visual neural network according to claim 1, characterized in that: The method obtains a training image data set and preprocesses the image data set, including obtaining a position image of the circular bushing and obtaining position images of different types of defects on the circular bushing, generating a Gaussian noise image of the same size as the sampled image in the image data set, and superimposing the generated Gaussian noise image with the corresponding image, and mirror-flipping all the sampled images after the superposition is completed.

3. The circular bushing defect detection method based on visual neural network according to claim 2 is characterized in that: The method of extracting the feature attention relationship of the segmented image by using the Transformer encoder includes taking the segmented image block as the input of the Transformer encoder, generating an attention matrix by using a multi-head attention module, obtaining the query q, key k and value v through three embedding functions, and extracting the feature information from the attention matrix according to a multi-layer perceptron with a linear activation function. The formula for generating the attention matrix is: in, Expressed as The attention matrix of the layer, is denoted as the embedding dimension, q is denoted as the query vector, k is denoted as the key vector, and v is denoted as the value vector.

4. The circular bushing defect detection method based on visual neural network according to claim 3 is characterized in that: The output of the image segmentation network is classified by a linear classifier, including passing the output of the last layer of the segmentation network into a linear layer, converting the high-dimensional features of the segmentation network output into the same dimension as the number of categories through the linear layer, multiplying the output features with a weight matrix and adding a bias to obtain a classification result matrix, and performing probability distribution processing on the classification result matrix using a softmax function to obtain a probability distribution corresponding to each category at each pixel position, selecting the category with the highest probability as the classification result of the pixel, and classifying pixels with the same classification into the same segmentation area.

5. The circular bushing defect detection method based on visual neural network according to claim 4 is characterized in that: The defect detection network is built according to the output classification of the image segmentation network, including building a ResNet50 network backbone and a network structure consisting of multiple stages, wherein the first stage uses a 7×7 convolution layer with a step size of 2 to enhance the feature dimension, and performs pooling operations through a 3×3 maximum pooling layer. The other stages are composed of two convolution modules Conv_1 and Conv_2. The Conv_1 reduces the feature map through a 1×1 convolution layer with a step size of s, uses a 3×3 convolution layer for feature extraction, and finally uses a 1×1 convolution layer to enhance the feature dimension. The Conv_2 reduces the feature dimension through a 1×1 convolution layer, then uses a 3×3 convolution layer to extract features, and restores the feature dimension through a 1×1 convolution layer.

6. A circular bushing defect detection system based on visual neural network, executing the method as claimed in claim 1, characterized in that: include: The data acquisition module is configured to: acquire a training image data set and preprocess the image data set; The segmentation network module is configured to: construct an image segmentation network based on the acquired image data set, including segmenting the image into non-overlapping blocks using linear projection; The transformation module is configured to: extract the feature attention relationship of the segmented image using the Transformer encoder and classify the output of the image segmentation network through a linear classifier; The defect detection module is configured to: build a defect detection network according to the output classification of the image segmentation network, including building a ResNet50 network backbone and building a network structure composed of multiple residual blocks for extracting features at different levels; The attention mechanism module is configured to: introduce a channel attention mechanism to each stage in the defect detection network and feed back all attention information to the original feature map; The output module is configured to output the detection result using the defect detection network.

7. A computer-readable storage medium storing a plurality of instructions, characterized in that: The instructions are suitable for being loaded by a processor of a terminal device and executing a circular bushing defect detection method based on a visual neural network as described in any one of claims 1 to 5.

8. A terminal device, comprising a processor and a computer-readable storage medium, wherein the processor is used to implement each instruction; and the computer-readable storage medium is used to store multiple instructions, characterized in that: The instructions are suitable for being loaded by a processor and executing a circular bushing defect detection method based on a visual neural network as described in any one of claims 1-5.