Magnesium alloy rolled plate edge crack identification method based on codec and cross-layer fusion

Through a deep convolutional neural network based on the codec and cross-layer fusion, the DeepCrack network is constructed, which solves the problems of low efficiency and low accuracy of edge crack detection of rolled plates of magnesium alloy sheets, and achieves efficient and accurate edge crack recognition. Meet the testing needs of industrial production.

CN118918387APending Publication Date: 2024-11-08TAIYUAN UNIVERSITY OF SCIENCE AND TECHNOLOGY

Patent Information

Application Number
CN202411137872.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing magnesium alloy plate rolling edge crack detection methods are inefficient and inconsistent, making it difficult to obtain sufficient training data sets, effectively feature extraction is difficult, and it is difficult to meet the detection speed requirements of industrial production.

Method used

Deep convolutional neural network based on codec and cross-layer fusion is adopted to build a DeepCrack network through the combination of SegNet and Unet, using weighted cross-entropy loss function and data enhancement technology, combining early stop and learning rate attenuation strategies to improve the generalization of the model and identification accuracy.

Benefits of technology

It significantly improves the recognition accuracy and detection efficiency of edge cracks of magnesium alloy rolled plates, reduces manual detection workload, enhances the model's ability to capture features of different scales, solves the problem of category imbalance, avoids overfitting, and improves Adaptability to different crack morphology and lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention discloses a magnesium alloy rolled plate edge crack identification method based on codec and cross-layer fusion, and relates to the field of magnesium alloy surface intelligent detection. The method comprises the following specific steps: 1) under the illumination intensity of 250-600lux, shooting and cutting an image of an edge part of a magnesium alloy rolling plate, and generating an edge crack sub-image with 512 * 512 pixels; 2) classifying the edge crack sub-images and establishing an image library; 3) marking an edge crack data set in detail; 4) constructing a DeepCrack convolutional neural network by using cross-layer fusion of a SegNet infrastructure and Unet, and extracting image features; and 5) inputting a to-be-detected image, automatically identifying the edge crack and generating an identification graph. Through the multi-scale loss function and the optimization algorithm, the crack identification accuracy and efficiency are improved, and the production automation level is enhanced. In practical application, the identification accuracy of the magnesium alloy rolling plate edge crack can be remarkably improved, the working efficiency is improved, and the automation level in production is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent detection of magnesium alloy surfaces, and in particular relates to a method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion. Background Art

[0002] Magnesium alloy sheets are widely used in modern industry, especially in aerospace and automobile manufacturing, due to their light weight and high strength. However, during the rolling process, magnesium alloy sheets are prone to edge crack defects, which can seriously affect the forming quality of the material and the performance of the final product. Traditional edge crack detection methods mainly rely on manual visual inspection, which is not only inefficient but also easily affected by subjective judgment, resulting in limited accuracy and consistency of the detection results.

[0003] With the rapid development of computer vision and deep learning technology, especially the superior performance of convolutional neural networks (CNN) in image recognition tasks, automated defect detection methods have become a hot topic of research. Automated methods can provide faster and more consistent detection results, which helps to improve production efficiency and product quality. However, existing automated detection methods still face some challenges when applied to the identification of edge cracks in magnesium alloy rolled plates. These challenges include but are not limited to: the difficulty of obtaining sufficient quantity and quality of training data sets, effective feature extraction to accurately identify different types of edge cracks, and meeting the strict requirements for detection speed in industrial production. Summary of the invention

[0004] In order to overcome the challenges raised in the background technology, the present invention proposes a method for edge crack recognition of magnesium alloy rolled plate based on codec and cross-layer fusion. The method utilizes the powerful feature extraction capability of deep convolutional neural network and combines the innovative cross-layer fusion method to improve the accuracy and efficiency of recognition.

[0005] The present invention is a method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion, which specifically comprises the following steps: Step 1: Collect images of determined light intensity and various types of edge cracks of magnesium alloy rolled plates; first, the image acquisition is carried out under stable lighting conditions using LED fluorescent lamps; then, the magnesium alloy rolled plate is placed in a stable position to ensure that the edge of the rolled plate is straight; finally, the image of the edge of the magnesium alloy rolled plate is taken; Step 2: Classify the edge crack sub-images according to the morphological characteristics and sizes of the edge cracks, convert the image format into lossless compressed PNG format, and establish an edge crack image library of magnesium alloy rolled plates; Step 3: Detailed annotation of the edge cracks of the image, including the type, starting point and end point of the edge crack, to form an edge crack dataset; Step 4: Use SegNet as the basic network architecture and combine it with Unet's cross-layer fusion to build a DeepCrack convolutional neural network to extract image features. The construction and training of the DeepCrack convolutional neural network specifically includes the following steps: (1) Data preprocessing: Normalize the image features in the dataset, scale each pixel value of the image to the range of [0, 1], use the normalized features as the input of the network, and use the corresponding edge crack labels as the output; (2) Network configuration: A DeepCrack network with 13 convolutional layers is constructed. Each convolutional layer is followed by a batch normalization layer and a ReLU activation layer. The upsampling layer corresponds to the pooling layer one by one. The cross-layer fusion fuses the feature maps of the encoder and decoder through skip connections. (3) Loss function: Define the binary weighted cross entropy loss function as the loss function used in this model. The calculation formula is as follows: , Where: represents the true label of the i-th sample (0 for non-crack and 1 for crack), represents the probability that the i-th sample is predicted to be 1, Is the category The weight is usually used to deal with the problem of class imbalance; (4) Optimization algorithm selection: Use Adam or SGD optimization algorithm to update the weights and biases of the network and minimize the loss function; (5) Model training: The DeepCrack network was trained using a magnesium alloy rolled plate edge crack image library, with a network cycle of 300 to 400 times and a batch size of 1 to 10; (6) Model evaluation: Use accuracy, recall, and F1 score to evaluate the performance of the trained DeepCrack network; (7) Hyperparameter adjustment: Based on the model evaluation results, the network hyperparameters, namely the learning rate decay policy, are adjusted. The initial learning rate is set in the range of 0.0001 to 0.1, and the learning rate decay is set in the range of 0.01 to 0.1 until the network cycle ends or the optimal model is found. Step 5: Based on the DeepCrack network established in step 4, the edge image of the magnesium alloy rolled plate to be tested is input, and various edge cracks including longitudinal cracks, transverse cracks, fish scale cracks and delamination cracks are automatically identified and screened out to generate an edge crack identification map.

[0006] In addition, an early stopping strategy is implemented. When the performance indicators on the validation set do not show significant improvement within 10 consecutive training cycles, further training is stopped to avoid overfitting. Data augmentation techniques, including image rotation, scaling, cropping, and color transformation, are used to improve the model's generalization ability to different crack morphologies and lighting conditions.

[0007] Compared with the existing magnesium alloy plate rolled plate edge crack detection method, the above technical scheme can achieve the following beneficial effects: the method of the present invention can significantly improve the recognition accuracy and detection efficiency of magnesium alloy rolled plate edge cracks, reduce the workload of manual detection, and improve the automation level of detection. Through cross-layer fusion and multi-scale loss functions, it is ensured that the model can extract features from different scales and enhance the ability to capture crack details. At the same time, the application of weighted cross entropy loss function effectively solves the category imbalance problem and improves the model's recognition ability for minority cracks. In addition, by implementing early stopping strategy and learning rate decay strategy, overfitting is avoided and the generalization ability of the model is enhanced. The application of data enhancement technology further improves the adaptability of the model to different crack morphologies and lighting conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 It is a flow chart of a method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion; Figure 2 The input crack diagram and DeepCrack prediction result diagram of AZ31 and ZA21 magnesium alloy rolled plates; Figure 3 This is a schematic diagram of DeepCrack's network structure and feature fusion. DETAILED DESCRIPTION

[0009] The present invention provides a method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion. The embodiments described below are only part of the embodiments of the present process method and should not be interpreted as limiting the scope of the present process method.

[0010] Example 1 Take AZ31 magnesium alloy rolled plate with a specification of 200mm*100mm*5mm as an example.

[0011] Step 1: Take images of the edge of AZ31 magnesium alloy rolled plate in the light intensity range of 300 to 500 lux, then perform data enhancement and cleaning, and finally crop out a 512×512 pixel edge crack sub-image to establish an initial edge crack image library; Step 2: Classify the edge crack sub-images according to the morphological characteristics and sizes of the edge cracks, convert the image format into lossless compressed PNG format, and establish an edge crack image library of magnesium alloy rolled plates; Step 3: Detailed annotation of the edge cracks of the image, including the type, starting point and end point of the edge crack, to form an edge crack dataset; Step 4: SegNet is used as the basic network architecture, and combined with the cross-layer fusion method of Unet, DeepCrack convolutional neural network is constructed to extract image features. At this time, there is a corresponding training process for AZ31 magnesium alloy rolled plate. Table 1 shows the hyperparameter settings during training, among which the positive sample weight should be explained, which refers to the weight of the crack. Since the model occupies a large amount of video memory, the batch size is set to 4. Through a single training and selecting the optimal weight file, multiple rounds of training are performed until the network performance reaches the optimal level, and high-accuracy recognition of edge cracks of AZ31 magnesium alloy rolled plate is achieved; Table 1 Hyperparameter settings Learning Rate Cycle times Weight decay Learning rate decay Positive sample weight Batch size 0.0003 350 0.0001 0.05 75 4 Step 5: Based on the DeepCrack network established in step 4, the edge image of the AZ31 magnesium alloy rolled plate to be tested is input to automatically identify and screen out various edge cracks including longitudinal cracks, transverse cracks, fish-scale cracks and delamination cracks, and generate an edge crack identification map.

[0012] Example 2 A ZA21 magnesium alloy rolled plate with a specification of 200 mm*100 mm*5 mm is used as an example.

[0013] Step 1: Take images of the edge of ZA21 magnesium alloy rolled plate in the light intensity range of 350 to 550 lux, then perform data enhancement and cleaning, and finally crop out a 512×512 pixel edge crack sub-image to establish an initial edge crack image library; Step 2: Classify the edge crack sub-images according to the morphological characteristics and sizes of the edge cracks, convert the image format into lossless compressed PNG format, and establish an edge crack image library of magnesium alloy rolled plates; Step 3: Detailed annotation of the edge cracks of the image, including the type, starting point and end point of the edge crack, to form an edge crack dataset; Step 4: SegNet is used as the basic network architecture, and combined with the cross-layer fusion method of Unet, DeepCrack convolutional neural network is constructed to extract image features. At this time, there is a corresponding training process for ZA21 magnesium alloy rolled plate. Table 2 shows the hyperparameter settings during training, among which the positive sample weight should be explained, which refers to the weight of the crack. Since the model occupies a large amount of video memory, the batch size is set to 2. Through a single training and selecting the optimal weight file, multiple rounds of training are performed until the network performance reaches the optimal level, and high-accuracy recognition of edge cracks of ZA21 magnesium alloy rolled plate is achieved; Table 2 Hyperparameter settings Learning Rate Cycle times Weight decay Learning rate decay Positive sample weight Batch size 0.0004 300 0.0005 0.1 60 2 Step 5: Based on the DeepCrack network established in step 4, the edge image of the ZA21 magnesium alloy rolled plate to be tested is input, and various edge cracks including longitudinal cracks, transverse cracks, fish-scale cracks and delamination cracks are automatically identified and screened out to generate an edge crack identification map.

[0014] Through the above implementation, the present invention can effectively identify edge cracks of AZ31 and ZA21 magnesium alloy rolled plates, improve the accuracy and efficiency of detection, and meet the strict requirements of detection speed and accuracy in industrial production. By using the multi-layer feature fusion and optimization training strategy of DeepCrack network, the present method can realize efficient and reliable edge crack detection in practical applications.

Claims

1. A method for edge crack identification of magnesium alloy rolled plate based on codec and cross-layer fusion, It is characterized in that The following steps are involved: Step 1: Take images of the edge of the magnesium alloy rolled plate in the light intensity range of 250 to 600 lux, then perform data enhancement and cleaning, and finally crop out a 512×512 pixel edge crack sub-image to establish an initial edge crack image library; Step 2: Classify the edge crack sub-images according to the morphological characteristics and sizes of the edge cracks, convert the image format into lossless compressed PNG format, and establish an edge crack image library of magnesium alloy rolled plates; Step 3: Detailed annotation of the edge cracks of the image, including the type, starting point and end point of the edge crack, to form an edge crack dataset; Step 4: Use SegNet as the basic network architecture and combine it with Unet’s cross-layer fusion to build a DeepCrack convolutional neural network to extract image features; Step 5: Based on the DeepCrack network established in step 4, the edge image of the magnesium alloy rolled plate to be tested is input, and various edge cracks including longitudinal cracks, transverse cracks, fish scale cracks and delamination cracks are automatically identified and screened out to generate an edge crack identification map.

2. According to claim 1, the method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion, It is characterized in that The process of establishing the initial edge crack library in step 1 is as follows: first, image acquisition is performed under stable lighting conditions using LED fluorescent lamps; then, the magnesium alloy rolled plate is placed in a stable position to ensure that the edge of the rolled plate is straight; finally, an image of the edge of the magnesium alloy rolled plate is captured.

3. According to claim 1, the method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion, It is characterized in that The encoder part of the DeepCrack convolutional neural network in step 4 is composed of a stack of multiple convolutional layers and pooling layers, where each convolutional layer is followed by a batch normalization layer and a ReLU activation layer; The decoder part consists of upsampling layers and convolutional layers. For each pooling layer in the encoder, the decoder uses the corresponding upsampling layer to gradually restore the spatial resolution of the features. Cross-layer fusion is achieved through skip connections, which directly connect the feature maps in the encoder to the corresponding layers in the decoder; The network output layer uses a 1×1 convolution kernel to convert the number of channels of the feature map into the number of categories, and uses the softmax activation function to perform multi-category probability estimation.

4. According to claim 1, the method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion, It is characterized in that The DeepCrack convolutional neural network in step 4 extracts image features. Specifically, the encoder of the DeepCrack network extracts features based on the convolution layer of the VGG16 network. After the feature maps of each scale are fused, an independent 1×1 convolution layer is used to compress the channels of the feature maps to half of the original. The fused feature maps are processed by 3×3 convolution kernels for dimensionality reduction. The size of the output feature map is calculated according to the formula, which is as follows: Where: F is the convolution kernel size, P is the padding size, and S is the step size.

5. According to claim 1, the method for identifying edge cracks in magnesium alloy rolled plates based on codec and cross-layer fusion, It is characterized in that The establishment and training process of the DeepCrack network model in step 5 includes the following steps: (1) Data preprocessing: Normalize the image features in the dataset, scale each pixel value of the image to the range of [0, 1], use the normalized features as the input of the network, and use the corresponding edge crack labels as the output; (2) Network configuration: A DeepCrack network with 13 convolutional layers is constructed. Each convolutional layer is followed by a batch normalization layer and a ReLU activation layer. The upsampling layer corresponds to the pooling layer one by one. The cross-layer fusion fuses the feature maps of the encoder and decoder through skip connections. (3) Loss function: Define the binary weighted cross entropy loss function as the loss function used in this model. The calculation formula is as follows: Where: y i represents the true label of the i-th sample (0 for non-crack and 1 for crack), y i represents the probability that the i-th sample is predicted to be 1, Is of category y i The weight is usually used to deal with the problem of class imbalance; (4) Optimization algorithm selection: Use Adam or SGD optimization algorithm to update the network weights and biases to minimize the loss function; (5) Model training: The DeepCrack network was trained using the edge crack image library of magnesium alloy rolled plates, with a network cycle of 300 to 400 times and a batch size of 1 to 10; (6) Model evaluation: Use accuracy, recall, and F1 score to evaluate the performance of the trained DeepCrack network; (7) Hyperparameter adjustment: Based on the model evaluation results, the network hyperparameters, namely the learning rate decay policy, are adjusted. The initial learning rate is set in the range of 0.0001 to 0.1, and the learning rate decay is set in the range of 0.01 to 0.1 until the network cycle ends or the optimal model is found.

Citation Information

Patent Citations

  • Stereoscopic vision on-line detection method for surface crack of stretched aluminum alloy plate

    CN102565072A

  • Detecting method of steel plate surface defects based on convolutional neural network

    CN108154504A

  • FPN-based steel surface defect detection method

    CN112053357A

  • Diagnosis apparatus and method of strip breakage in cold rolling

    KR1020130070181A

Cited By

  • Aluminum ball defect monitoring method based on visual detection

    CN122714472A