Industrial cable defect image data processing method

Through the improved VGG16 network and ECANet channel attention mechanism, combined with the hollow convolution and pooled convolution enhancement module, the problems of low efficiency and insufficient accuracy of traditional cable defect detection are solved, and more efficient and accurate industrial cable defect detection are achieved. , suitable for defect detection of various materials or equipment.

CN119205668AActive Publication Date: 2024-12-27JINAN SHENLAN ELECTRONIC TECH CO LTD

Patent Information

Application Number
CN202411257230.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-27
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

Traditional industrial cable defect detection relies on manual visual inspection, which is inefficient and easy to miss, making it difficult to ensure the accuracy and safety of the detection, especially in preventing fires and electric shock accidents.

Method used

A method for processing image data of industrial cable defects is proposed. Through the improved VGG16 network and ECANet channel attention mechanism, combined with hollow convolution, the accuracy of classification and segmentation is improved, and the model is enhanced through pooled convolution enhancement module and decoder enhancement model Capture of spatial and contextual information, reducing the risk of parameter quantity and overfitting.

Benefits of technology

Significantly improves the accuracy and positioning performance of industrial cable defect detection, reduces model complexity and overfitting risks, achieves more efficient detection and identification, is suitable for defect detection of industrial cables, and can be generalized to other materials or equipment Defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205668A_ABST
    Figure CN119205668A_ABST
Patent Text Reader

Abstract

The invention provides an industrial cable defect image processing method, and relates to the field of image enhancement. The industrial cable defect image detection process provided by the invention comprises the following steps: collecting clear image data of a defective cable in different states, constructing a convolution pooling enhancement module, gradually reducing the scale of a feature map through average pooling and a channel attention mechanism, calculating the attention degree of the importance weight enhancement model of each channel to a region with higher information amount; an industrial cable defect classification module is constructed, after feature extraction is carried out, a prediction value is obtained through a full-connection neural network and a Softmax function, and cable defects are classified; constructing a decoder, and expanding a receptive field through double interpolation up-sampling and cavity convolution; according to the industrial cable defect position segmentation module provided by the invention, corresponding pixel values of the encoder and the decoder are added and fused, detail information in the encoder is transmitted to the decoder, and finally, a Sigmoid activation function is used for outputting a segmented image, so that an industrial cable defect image is effectively processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image enhancement, and in particular relates to an industrial cable defect image data processing method. Background Art

[0002] Industrial cables refer to cables used to transmit power and signals during industrial production processes. Such cables are widely used in power, communications, manufacturing and other industries. Industrial cables may have various defects during long-term use, such as moisture, aging, breakage and cracking. These problems will not only affect the normal operation of the cables, but may also lead to safety accidents.

[0003] The traditional cable defect detection method relies on manual visual inspection, which is inefficient and prone to omissions. Through automated processing, the detection efficiency can be significantly improved, labor costs can be reduced, and the accuracy of detection can be improved. It can also provide real-time data support for maintenance personnel, help ensure industrial safety, and formulate more reasonable maintenance plans.

[0004] By classifying and segmenting high-definition cable defect images, it is helpful for staff to take targeted and correct maintenance measures, conduct comprehensive analysis, and effectively prevent safety accidents such as fire and electric shock caused by cables, thereby ensuring personnel safety and the stability of equipment operation. Summary of the invention

[0005] The present invention provides an industrial cable defect image data processing method, aiming to propose an industrial cable defect classification module. The improved VGG16 network helps the model to better retain spatial information through the average pooling layer and the ECANet channel attention mechanism module, pay more attention to important features, improve the accuracy of classification and segmentation, reduce the number of parameters, reduce the complexity of the model, and reduce the risk of overfitting; in the industrial cable defect location module, the hollow convolution is used to expand the receptive field, capture a wider range of context information, and improve the positioning and recognition performance of the model in industrial cable defect detection.

[0006] The present invention aims to propose an industrial cable defect classification module and provide a method for processing cable defect image data, comprising the following steps: S1. Obtain industrial cable defect image data, select Logitech C920 high-definition camera to shoot defective cables under stable light source, and collect cable image data sets in four states: damp, aging, damaged, and cracked; S2. Preprocess the image data set, including cropping all images to a size of 224×224×3 with the defect location as the center, and normalizing the images, dividing all pixel values ​​in the images by 255 and adjusting them to the range of [0,1]; S3, build a pooling enhanced convolution module, including a 2×2 average pooling window, a 1×1 convolution operation, a Sigmoid activation function, and a multiplication operation; S4. Build an industrial cable defect classification module, including the VGG16 convolutional neural network with the maximum pooling layer removed, and add a pooling enhancement module after each convolution layer, including 3×3 convolution, pooling enhancement convolution module and Softmax activation function; S5. Construct an industrial cable defect location segmentation module, including an encoder and a decoder. The encoder is an industrial cable defect classification module with the Softmax activation function removed. The decoder includes upsampling operation, hole convolution operation, feature fusion operation and 1×1 convolution. S6. Use the industrial cable defect detection algorithm to train the industrial cable defect image dataset. The overall algorithm includes input, industrial cable defect classification module, industrial cable defect position segmentation module and output. The industrial cable defect segmentation module includes an improved VGG16 network and decoder. After training, the industrial cable defect detection algorithm is obtained. S7. Optimize the industrial cable defect detection algorithm, use an independent test set to evaluate the model performance, and optimize the model based on the evaluation results; S8. Use the industrial cable defect detection algorithm to detect optical cable defects, obtain a single detection image, and input it into the industrial cable defect detection algorithm to obtain output results, which are divided into four states: moisture, aging, damage, and crack damage; S9, the four states of moisture, aging, damage, and cracking are continuously learned and updated. Industrial optical cables change with external forces, environment, construction, and material quality. New cable defect data and images are continuously collected, and the model is retrained to adapt to new cable defect types.

[0007] Preferably, in step S4, for the industrial cable defect classification module, the input image is F∈R C×H×W , where C, H, W are the number of channels, height and width of the input image respectively; in order to make the model extract shallow features of the image, two convolutional layers with a convolution kernel size of 3×3 are first used to process the image: Z = Conv(F), where Conv(·) represents the convolution operation; then the feature Z is passed through the pooling convolution enhancement module PCEM to reduce the size of the feature map and make the model focus on important features. The pooling convolution enhancement module PCEM includes two parts. One is the average pooling operation on the input feature Z: Z′ = avgpool(Z); the other is the lightweight attention mechanism ECANet to operate on the feature Z′: Where H and W are the number of channels, height and width of the input image, respectively. Enter the one-dimensional convolution to adjust the weights between channels: w = Conv1D (z; k, r), where k is the convolution kernel size and r is the channel ratio. Then W enters the Sigmoid function to scale the weight value to [0, 1]: S = a (w), and then the feature vector is recalibrated: Where F is the recalibrated feature map, Indicates element-wise multiplication; in order to further smooth the feature map, the feature F′ enters the average pooling layer: Where k is the size of the convolution kernel; after the first convolution layer and the pooling convolution enhancement module PCEM, F″ is obtained. After several such operations, the feature vector F is finally output. F enters two fully connected layers in succession to integrate all the previous features, converting high-dimensional features into low-dimensional feature representations to obtain the feature vector O: O = fc (F); finally, it enters the Softmax activation function to map the features to the category to obtain the classification result: O′ = Softmax (O).

[0008] Preferably, the average pooling operation and the lightweight channel attention mechanism ECANet are combined to replace the maximum pooling layer in VGG16. The channel attention mechanism is introduced to enhance the quality of feature representation, while reducing the number of model parameters, improving computational efficiency and the generalization ability of the model.

[0009] Preferably, in step S5, for the decoder part, the input feature is F″′, and bilinear interpolation is used for upsampling: W out =W in × scale_factor, H out =H in ×Scale_factor, where W out and H out Represents the width and height of the output feature map, W in and H in Represents the width and height of the input feature map, Scale_factor represents the upsampling scale factor, bilinear interpolation uses the pixel value in the nearest neighborhood to estimate the pixel value at the new position, and the feature / map size becomes larger after bilinear interpolation, the width and height will increase, but the number of channels remains unchanged; then the feature enters the dilated convolution: Among them, K represents the convolution kernel, S represents the step size, P represents the number of padding, and R represents the dilation rate. After the dilated convolution operation, the feature map expands the receptive field without increasing the size of the feature map; after 5 upsampling and dilated convolution changes, the feature map is finally restored to its original size.

[0010] Preferably, using a combination of bilinear interpolation upsampling and dilated convolution as a decoder can effectively enhance the spatial resolution and contextual information of the feature map, thereby improving the model's ability to capture details. Bilinear interpolation helps to restore the resolution of the feature map, while dilated convolution can expand the receptive field and capture more contextual information. This combination ensures the accuracy of the output while maintaining computational efficiency, which is helpful for segmentation tasks.

[0011] Preferably, in step s6, for the industrial cable defect location segmentation module, the feature map output by each upsampling and hole convolution is added pixel by pixel to the corresponding scale feature map in the encoder: i (x, y) = D i (x,y)+E i (x, y) where (x, y) represents the spatial coordinate position of the image, D i (x, y) and E i (x, y) represent the feature map D i and E i The vector value at position (x, y), F i (x, y) represents the vector value of the fused feature map at the same position. By fusing the intermediate feature map of the encoder with the feature map of the decoder, the model's learning of detail information can be enhanced, and finally the feature vector F5(x, y) is obtained, and the segmented image is output through the Sigmoid activation function.

[0012] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention proposes classification and segmentation processing of industrial cable defect images, wherein the original VGG16 backbone network is improved in the classification task, and the maximum pooling layer is replaced by a convolutional pooling enhancement module, which includes average pooling and a lightweight channel attention mechanism ECAnet, and calculates the channel importance weights in the feature map, which not only reduces the model parameters, but also enhances the focus on key features and improves the classification efficiency; in the segmentation task, the decoder combines bilinear interpolation upsampling and dilated convolution to effectively restore the feature map resolution and expand the receptive field, thereby improving the classification and segmentation performance of industrial cable defect images. The present invention is not only suitable for the detection of industrial cable defect images, but can also be extended to other materials or equipment that require defect image detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 The present invention provides an industrial cable defect image data processing flow chart.

[0014] Figure 2 This is the structure diagram of the pooling convolution enhancement module PCEM provided by the present invention.

[0015] Figure 3This is a structural diagram of industrial cable defect image classification provided by the present invention.

[0016] Figure 4 It is a structural diagram of the decoder provided by the present invention.

[0017] Figure 5 This is a structural diagram of the position segmentation of industrial cable defect images provided by the present invention. Specific implementation methods

[0018] The present invention aims to propose a method for processing industrial cable defect image data, proposes a pooled convolution enhancement module, embeds the average pooling layer and the lightweight channel attention mechanism ECANet into the VGG16 network, so that the algorithm pays more attention to the important features of the image in the feature extraction part, and effectively improves the classification accuracy; the decoder part composed of upsampling, hole convolution and feature fusion expands the receptive field and captures a wider range of context information. The decoder part gradually restores the image details and finally generates the probability distribution of each pixel, thereby realizing the accurate positioning of the industrial cable defect position. The technical solution in the embodiment of the present invention will be clearly and completely described below, which specifically includes the following steps: Figure 1 shown.

[0019] S1. Obtain images of industrial cable defects. Use a Logitech C920 high-definition camera to shoot images of cable defects in different states of moisture, aging, damage and cracking in a high humidity environment under stable light conditions. The images are clear and can fully display the characteristics of each defect. There are 1,000 images of cable defects in each state, for a total of 4,000 images.

[0020] S2. Preprocess the image data set, including uniformly cropping all images to a size of 224×224×3 with the defect location as the center, and normalizing the images, dividing all pixel values ​​in the images by 255 and adjusting them to the range of [0, 1].

[0021] S3. Construct a pooled convolution enhancement module PCEM, including two 2×2 average pooling windows, one 1×1 convolution operation, one Sigmoid activation function and one multiplication operation.

[0022] S4. Construct an industrial cable defect classification module, including a VGG16 convolutional neural network with the maximum pooling layer removed, and add a pooling enhancement module after each convolutional layer, with a total of 13 convolutional layers, 5 pooling enhancement convolution modules and 1 Softmax activation function operation.

[0023] Furthermore, an industrial cable defect classification module is constructed, and its structure is as follows: Figure 3 As shown, the input image is F∈R C×H×W, where C = 3, H = 224, W = 224, which are the number of channels, height and width of the input image respectively; the image is processed using a convolutional neural network: Z = Conv(F), where Conv(·) is a convolutional neural network with a convolution kernel size of 3×3 and a padding size of 1. The feature after two convolutions is represented as Z, with a size of 64×224×224; the feature Z is passed through a pooling convolution enhancement module PCEM, whose structure is as follows Figure 2 As shown in the figure, first, the input feature Z is operated by average pooling: Z′=avgpool(Z), the window of average pooling is 2×2, the step size is 2, and the feature size after the average pooling operation becomes 64×112×112; then the lightweight attention mechanism ECANet operates on the feature Z′: Where H = 112, W = 112, we get the feature representation z∈R C (C = 64), the feature size is 64 × 112 × 112; enter the one-dimensional convolution to adjust the weight between channels: w = ConV1D (z; k, r), set the convolution kernel k to 9 × 9, the channel ratio r to 8, and the output dimension Then W enters the Sigmoid function for operation: S = σ(w) output dimension Recalibrate the feature vector: Where F is the recalibrated feature map, Represents element-wise multiplication; output dimension Feature F′ enters the average pooling operation and sets the pooling window size to 2×2: Where k = 2, the output feature dimension is: (C=64,H′=W′=112); after several times of convolutional layer and pooling convolution enhancement module PCEM operations, the feature vector F″′ is finally output, and the feature size is 512×7×7; F″′ continuously enters two fully connected layers to obtain the feature vector O: O=fc(F″′), the feature vector is [0,4]; finally it enters the Softmax activation function to obtain the classification result: O′=Softmax(O).

[0024] S5. Construct the decoder, which includes 5 upsampling operations, 5 dilated convolution operations, 5 feature fusion operations, and 1 Sigmoid activation function operation.

[0025] Further, a decoder module is constructed, whose structure is as follows Figure 4 As shown, the input feature is F″′, the feature size is 512×7×7, and bilinear interpolation is used for upsampling: W out =W in × scale_factor, H out =H in×scale _ factor, where scale_factor = 2, W out =14,H out =14,W in =7,H in =7,W out and H out Represents the width and height of the output feature map, W in and H in Represents the width and height of the input feature map, scale_factor represents the upsampling scale factor, and the feature map size becomes 512×14×14 after bilinear interpolation; then the feature enters the dilated convolution: Among them, K represents the convolution kernel of size 3×3, S represents the step size, which is 1, P represents the number of padding, which is 1, and R represents the dilation rate, which is 2. After the dilated convolution operation, the size of the feature map becomes 512×14×14. After 5 upsampling and dilated convolution changes, 5 feature maps [D1, D2, D3, D4, D5] are obtained. The final output feature map D5 is 224×224 in size.

[0026] S6. Construct an industrial cable defect location segmentation module, including an encoder and a decoder. The encoder is an industrial cable defect classification module with the Softmax activation function removed. The decoder includes 5 upsampling operations, 5 hole convolution operations, 5 feature fusion operations, and 1 1×1 convolution operation.

[0027] Furthermore, an industrial cable defect location segmentation module is constructed, and its structure is as follows: Figure 5 As shown in Figure 2, the feature map output by each upsampling and dilated convolution is added pixel by pixel to the corresponding scale feature map in the encoder: F i (x, y) = D i (x,y)+E i (x, y) where (x, y) represents the spatial coordinate position of the image, i = 1, 2, 3, 4, 5, D i (x, y) and E i (x, y) represent the feature map D i and E i The vector value at position (x, y), F i (x, y) represents the vector value of the fused feature map at the same position. F1(x, y) is further fused with D2(x, y) and E2(x, y) to finally obtain the feature vector F5(x, y). The segmented image is output through the Sigmoid activation function.

[0028] S7. Use the industrial cable defect detection algorithm to train and detect the industrial cable defect image data set. The overall algorithm includes input, industrial cable defect classification module, industrial cable defect position segmentation module and output. The industrial cable defect segmentation module includes an encoder and a decoder. After training, the industrial cable defect detection algorithm is obtained.

[0029] Furthermore, this method uses Python3.8 language, PyTorch framework in the CUDA11 environment, and is trained on the NVIDIA RTX 3090 GPU. There are 1,000 images of each class in the dataset, and the training set and test set are divided into 4:1. Stochastic gradient descent SGD is selected as the optimizer during training, and the weight decay is set to 0.0001, the learning rate is 0.001, the momentum is set to 0.9, the training rounds are 200, and the learning rate decay strategy is adopted. After every 50 training rounds, the learning rate is reduced to 0.1 times the original.

[0030] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.

Claims

1. A method for processing industrial cable defect image data, characterized in that: The following steps are involved: S1. Create an industrial cable defect image dataset. The camera acquires cable images with different defect types, including cable defect images in four states: damp, aging, damaged, and cracked. The cable defect images are annotated, including the location and type of the defect. S2, preprocessing the industrial cable defect image dataset, including cropping and normalizing the images in the dataset; S3. Construct a convolutional pooling enhancement module, including an average pooling layer and a lightweight channel attention mechanism ECANet; S4. Build an industrial cable defect classification module, which includes the original VGG16 model with the maximum pooling layer removed and the pooling enhanced convolution module; S5. Construct the decoder, including upsampling, hole convolution, skip connection and output. S6. Construct an industrial cable defect location segmentation module. The module structure is based on the encoder-decoder architecture. The encoder part is an industrial cable defect classification module that removes the fully connected layer and the Softmax activation function. The decoder includes upsampling, hole convolution, skip connection and output. S7. Use the industrial cable defect detection algorithm to train the industrial cable defect image dataset. The overall algorithm includes input, industrial cable defect classification module, industrial cable defect position segmentation module and output. After the training is completed, the industrial cable defect detection algorithm is obtained. S8. Optimize the industrial cable defect detection algorithm, use an independent test set to evaluate the model performance, and optimize the model based on the evaluation results; S9. Use the industrial cable defect detection algorithm to detect optical cable defects, obtain a single detection image, and input it into the industrial cable defect detection algorithm to obtain output results, which are divided into four states: moisture, aging, damage, and crack damage; S10, moisture, aging, breakage, and cracking are four states that are continuously learned and updated. Industrial optical cables change with external forces, environment, construction, and material quality. New cable defect data and images are continuously collected, and the model is retrained to adapt to new cable defect types.

2. The method for processing industrial cable defect image data according to claim 1, characterized in that: In the step S1, a Logitech C920 high-definition camera is used to shoot cable defect images in different states, such as moisture in a high humidity environment, accelerated aging of insulating materials due to heat generated by long-term overload operation, obvious damage and crack damage, under stable light conditions. The image has high definition and can fully display the characteristics of each defect. The number of samples collected in each state is sufficient and uniform, ensuring that the distribution of each category in the data set is balanced, which helps to improve the generalization ability of the model. In addition, the image annotation software LabelImg is used to draw a bounding box to mark the defective area, and each bounding box is assigned a corresponding "moisture", "aging", "damage" or "crack damage" category label to accurately identify the location and type of industrial cable defects.

3. The method for processing industrial cable defect image data according to claim 2, characterized in that: In step S2, the images in the data set are preprocessed. First, they are uniformly cropped to a size of 224×224×3. Then, the cable defect images are normalized. All pixel values ​​in the RGB images are divided by 255 and adjusted to the range of [0,1]. This helps the network converge more quickly to improve the model stability. The preprocessing ensures that all images are of the same size and the pixel values ​​are properly normalized, which helps to improve the efficiency and effect of subsequent image processing and model training.

4. The method for processing industrial cable defect image data according to claim 3, characterized in that: In step S3, the original image first passes through the convolution layer to obtain a feature map, and the feature map then counts all values ​​of each region into the final output value through the pooling enhanced convolution module. The pooling enhanced convolution module includes an average pooling layer and a lightweight channel attention module. First, the feature map enters the average pooling layer operation Z′=avgpool(Z); the feature map calculated by average pooling enters the lightweight channel attention module, and firstly performs a global average pooling operation for the feature map of each channel to obtain the statistical information z of each channel: Where H, W are the number of channels, height and width of the input image respectively; the obtained vector is then convolved through a one-dimensional convolution layer to model the correlation between channels: W = Conv1D(z; k, r), where w is the result of a one-dimensional convolution with a kernel size of k and a stride size of r; the Sigmoid activation function is then used to map the obtained weight vector to [0, 1]: s = σ(w), and finally the obtained weight is multiplied by the original feature map to re-weight the importance of each channel: F is the recalibrated feature map, o represents element-wise multiplication, and in order to further smooth the feature map, feature F′ enters the average pooling layer: Where k is the convolution kernel size.

5. The method for processing industrial cable defect image data according to claim 4, characterized in that: In the step S4, after being processed by five convolutional layers and pooling enhancement modules, the output feature vector F″ is subjected to the Softmax function to obtain the final classification probability distribution O′: O′=Softmax(0), where O is the feature vector obtained by the feature vector F″ after two full connection layers. Through the above steps, the improved VGG16 network can effectively extract the key features of industrial cable defects, and the Softmax function is responsible for converting these features into classification probabilities, thereby realizing effective classification of cable defects.

6. The method for processing industrial cable defect image data according to claim 5, characterized in that: In step S5, bilinear interpolation is first used for upsampling, W out =W in × scale_factor, H out =H in × scale_factor, where W out and H out Represents the width and height of the output feature map, W in and H in Represents the width and height of the input feature map, scale_factor represents the upsampling scale factor; after upsampling, adding a hole convolution to restore image details: Among them, K represents the convolution kernel, S represents the step size, P represents the number of padding, and R represents the void ratio. A void convolution is inserted between adjacent elements of the convolution kernel to expand the receptive field, thereby capturing a wider range of contextual information.

7. The method for processing industrial cable defect image data according to claim 6, characterized in that: In step S6, the feature vector E obtained by the encoder i (x, y), the feature map corresponding to the encoder part and the feature vector D of the decoder part i (x, y) is fused by adding the corresponding pixels: F i (x, y) = D i (x,y)+E i (x, y); finally, after feature restoration by the decoder, the feature vector is converted into the probability distribution of each pixel in the image as the segmentation target and the background using the Sigmoid activation function. The greater the probability, the greater the confidence that the pixel belongs to the segmentation target.

8. The method for processing industrial cable defect image data according to claim 7, characterized in that: In step S7, the training set and test set of each category in the industrial cable defect image dataset are divided into a ratio of 4:

1. The SGD optimizer is used for training, the initial learning rate is set to 0.001, and the number of training rounds is 200. Accuracy, precision, recall and F1 score are used as evaluation indicators. The accuracy is the ratio of correctly predicted samples to the total number of samples, the precision is the ratio of samples predicted by the model to actually be positive examples, and the recall is the ratio of all samples that are actually positive examples that are correctly identified by the model. The F1 score is the harmonic mean of the precision and recall.

Citation Information

Patent Citations

  • Industrial product defect detection method based on deep learning

    CN110570396A

  • Surface defect detection method based on multi-scale convolution and trilinear global attention

    CN112465790A

  • Defect detection method based on joint optimization and mixed attention feature fusion

    CN115294038A

  • Industrial product surface defect detection method and device based on weak supervision

    CN116721071A

  • Product defect detection method, device and system

    US20210374940A1

Cited By

  • Textile defect type identification method

    CN119399187A

  • Defect detection method and system in cable production

    CN119693368A

  • Insulated cable appearance detection method and system based on machine vision

    CN121121317A

  • Sample enhancement and lightweight deep learning model construction method and system in distribution line defect identification

    CN121788484A