A fast target detection method for forging defects based on neural network

Through the forging defect detection method based on CNN convolutional neural network, the feature extraction and training is used for thermal imager data, the problem of lack of real-time online monitoring during forging is solved, and the rapid identification and classification of forging defects of metal alloys is achieved, improving the Production efficiency and product quality.

CN114897817BActive Publication Date: 2024-11-26KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210497366.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2024-11-26
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

During the forging process, it is difficult for the existing technology to realize instant online monitoring and rapid identification of forging defects, resulting in high production costs, long cycles, and lack of automated detection methods.

Method used

Using a fast object detection method based on CNN convolutional neural network, the temperature image of the forging system is recorded through the thermal imager, data processing and feature extraction are carried out, training database is established and iterative training is carried out to achieve surface cracks, scratches and inclusion defects rapid detection.

Benefits of technology

It realizes the rapid identification and classification of defects in metal alloy forging, optimizes material composition and forging process, improves work efficiency, reduces production losses, and supports real-time visual decision-making and product quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114897817B_ABST
    Figure CN114897817B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for rapid target detection of forging defects based on a neural network. By introducing a convolutional neural network (CNN) and a deep learning method, feature extraction is performed on thermal imaging data of defects such as surface cracks, scratches and inclusions that appear in the forging of metal alloys, so that the defects that appear in the forging process are changed from image form to mathematical matrix form, and the CNN diagnostic model is expanded to better analyze the local defect area in the image to support the real-time visual decision-making process. The present invention uses a CNN neural network to analyze and determine various defects that appear in the forging process to achieve rapid target detection. Compared with traditional detection methods such as flaw detection to judge defects, the method of the present invention achieves the purpose of scientifically controlling product quality in actual production, and can also achieve the goal of optimizing material composition and forging process, improving work efficiency, and reducing production losses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of recognition, classification and target detection of metal alloy forging defects, and in particular to a neural network-based rapid target detection method for forging defects. Background Art

[0002] Forging is a processing method that uses a forging machine to apply pressure to a metal alloy billet, causing it to plastically deform and produce forgings with defined mechanical properties, shapes, and sizes. Forging eliminates defects such as as-cast porosity that occur during the metal smelting process and optimizes the microstructure. However, surface defects such as cracks, scratches, and inclusions that appear during the forging process can seriously affect the material's performance and cause potential failures such as deformation and fracture of the workpiece.

[0003] At present, the generation and confirmation of forging defects in the actual domestic production application process are mainly judged by various post-production detection methods such as flaw detection. For mass production and forging processes, the cost is high, the cycle is long, and the automation is backward. There is a lack of real-time online monitoring research on the factors causing surface defects. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for rapid target detection of forging defects based on a neural network, which can solve one or more of the above technical problems.

[0005] In order to achieve the above object, the technical solution proposed by the present invention is as follows:

[0006] A neural network-based rapid target detection method for forging defects specifically comprises the following steps:

[0007] (1) The workpieces in the forging system are numbered from workpiece 1 to workpiece N; the number of forgings for each workpiece is set to a1...a N , the holding time of each workpiece is b1...b N .

[0008] (2) Establish a CNN convolutional neural network training database.

[0009] 2.1 Randomly execute T times of forging system work. Each time the forging system has different forging times and holding time, the forging times are The holding time is

[0010] 2.2 Use thermal imager to record the temperature image of each forging system X1...X T , process the image.

[0011] 2.21 Perform fusion filtering and denoising on the temperature image to improve image quality.

[0012] 2.22 Establish a coordinate system with the center of the temperature image as the coordinate origin, perform position correction on the temperature image, and eliminate the problem of angle tilt or distortion of the temperature image.

[0013] 2.23 Perform HOG segmentation on the processed temperature image to extract image features. The size and direction of the gradient can be calculated by the pixel value in the temperature image. The gradient size is calculated according to Labeled as g1...g T , the gradient direction follows Labeled as θ1...θ T ; Among them, g x is the pixel value in the x direction in the temperature image coordinate system, g y The pixel value in the y direction.

[0014] 2.3 According to the work of each forging system, the corresponding forging times Holding time Temperature image gradient size g1...g T , gradient direction θ1...θ T Statistics are used to form a database of thermal imaging images of forgings.

[0015] 2.4 Based on the temperature gradient direction and size distribution effect of the temperature image, the training data is selected from the forging thermal imaging database in step 2.3 to form a training database and a test database. The training data database includes the corresponding forging times. Holding time Temperature image gradient size g1...g T , gradient direction θ1...θ T ;The database contains the real defect type corresponding to each temperature image.

[0016] (3) Train the CNN convolutional neural network.

[0017] 3.1 Use CNN convolutional neural network to train the temperature image gradient size g1...g in the database in step 2.4 T With the gradient direction θ1...θ T Perform gradient feature extraction to generate the training data and corresponding labels required for deep learning.

[0018] 3.2 Set the loss function 'Loss' about the correlation between the temperature image gradient size, gradient direction, forging times, and holding time, and iteratively train the CNN convolutional neural network in step 3.1 under the condition that the loss function 'Loss' reaches the minimum to obtain the weights and biases of the CNN; to obtain the CNN convolutional neural network, use the test database, input the optimized CNN neural network model, until the difference between the output value of the neural network model and the true value satisfies the set loss function 'Loss' and reaches the minimum as a condition, and obtain the trained neural network model.

[0019] (4) Through the CNN convolutional neural network and the temperature images collected by the thermal imager, batches of workpieces can be inspected in real time to achieve the purpose of rapid classification.

[0020] Further: The loss function in step 3.2 of the present invention is: Loss = ||A*CNN(G)-B-CNN(θ)|| 2 ,in G=[g1...g T ]、θ=[θ1...θ T ], CNN is a convolutional neural network.

[0021] The technical effects of the present invention are:

[0022] This method uses a CNN neural network to extract features from thermal imaging data of surface cracks, scratches, and inclusion defects found during metal alloy forging, converting them into a mathematical matrix. This allows for better analysis of localized defect areas within the image, supporting real-time visual decision-making. Compared to traditional defect detection methods such as flaw detection, this method offers greater flexibility in real-time implementation in actual production. It achieves scientific control of product quality, optimizes material composition and forging processes, improves efficiency, and reduces production losses. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings in the specification, which constitute a part of this application, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0024] Figure 1 It is a schematic diagram of the overall structure of the present invention;

[0025] Figure 2 It is a flow chart of the working method of the present invention;

[0026] Figure 3 It is a flow chart of the workflow of the present invention. DETAILED DESCRIPTION

[0027] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The exemplary embodiments and descriptions are only used to explain the present invention but are not intended to limit the present invention.

[0028] Example 1

[0029] A fast target detection method for forging defects based on neural network, such as Figures 2-3 As shown, the specific steps include:

[0030] (1) The workpieces in the forging system are numbered from workpiece 1 to workpiece N; the number of forgings for each workpiece is set to a1...a N , the holding time of each workpiece is b1...b N .

[0031] (2) Establish a CNN convolutional neural network training database.

[0032] 2.1 Randomly execute T times of forging system work. Each time the forging system works according to different forging times and holding time, the forging times are The holding time is

[0033] 2.2 Use thermal imager to record the temperature image of each forging system working X1...X T , process the image.

[0034] 2.21 Perform fusion filtering and denoising on the temperature image to improve image quality.

[0035] 2.22 Perform position correction on the temperature image to remove image tilt or distortion.

[0036] 2.23 Perform HOG segmentation on the processed temperature image to extract the temperature image features. The size and direction of the gradient can be calculated by the pixel value in the temperature image. The gradient size is calculated according to Labeled as g1...g T , the gradient direction follows Labeled as θ1...θ T .

[0037] 2.3 According to each forging system work, the corresponding forging times Holding time Temperature image gradient size g1...g T , gradient direction θ1...θ T Statistics are used to form a database of thermal imaging images of forgings.

[0038] 2.4 Based on the temperature gradient direction and size distribution effect of the temperature image, training data are selected from the forging thermal imaging database in step (23) to form a training database. The training data database includes the corresponding forging times. Holding time Temperature image gradient size g1...g T , gradient direction θ1...θ T ;The database contains the real defect type corresponding to each temperature image.

[0039] (3) Training the CNN convolutional neural network

[0040] 3.1 Use CNN convolutional neural network to train the temperature image gradient size g1...g in the database in step 2.4 T With the gradient direction θ1...θ T Perform gradient feature extraction to generate the training data and corresponding labels required for deep learning.

[0041] In this embodiment: the gradient feature extraction uses the VGGNet network as the backbone network for feature extraction, the training algorithm is the Stochastic Gradient Descent method, and the optimizer selects the Adam algorithm. The specific steps are: preprocessing the size of the temperature image to 224×224 pixels, the Layer1 convolution layer consists of 64 3×3 convolution kernels, adopts BN batch normalization processing, and the activation function is 'relu'; the Layer2 convolution layer consists of 64 3×3 convolution kernels, adopts BN batch normalization processing, the activation function is 'relu', and the maximum pooling with a step size of 2 is adopted; the Layer3 convolution layer consists of 128 3×3 convolution kernels, adopts BN batch normalization processing, the activation function is 'relu', and the maximum pooling with a step size of 2 is adopted; the Layer4 convolution layer consists of 128 3×3 convolution kernels, adopts BN batch normalization processing, the activation function is 'relu', and the maximum pooling with a step size of 2 is adopted; the Layer5 convolution layer consists of 2 The convolution layer consists of 56 3×3 convolution kernels, using BN batch standardization, and the activation function is 'relu'; the convolution layer of Layer6 consists of 256 3×3 convolution kernels, using BN batch standardization, and the activation function is 'relu'; the convolution layer of Layer7 consists of 512 3×3 convolution kernels, using BN batch standardization, the activation function is 'relu', and the maximum pooling with a stride of 2 is used; the convolution layer of Layer8 consists of 512 3×3 convolution kernels, using BN batch standardization, and the activation function is 'relu'; the convolution layer of Layer9 consists of 512 1×1 convolution kernels, using BN batch standardization, and the activation function is 'relu'; the fully connected layer of Layer10 consists of 512 neurons, and the activation function is 'relu'.

[0042] 3.2 Set the loss function 'Loss' about the correlation between the temperature image gradient size, gradient direction, forging times, and holding time, and iteratively train the CNN convolutional neural network in step 3.1 under the condition that the loss function 'Loss' reaches the minimum to obtain the weights and biases of the CNN; to obtain the CNN convolutional neural network, use the test database, input the optimized CNN neural network model, until the difference between the output value of the neural network model and the true value satisfies the set loss function 'Loss' and reaches the minimum as a condition, and obtain the trained neural network model.

[0043] The loss function described in step 3.2 is: Loss = ||A*CNN(G)-B-CNN(θ)|| 2 ,in

[0044] G=[g1...g T ]、θ=[θ1...θT ], CNN is a convolutional neural network.

[0045] (4) Through the CNN convolutional neural network and the temperature images collected by the thermal imager, batches of workpieces can be inspected in real time to achieve the purpose of rapid classification.

[0046] Specific implementation process:

[0047] This detection technology was used to test bainite-martensite ductile iron grinding balls, the composition of which is shown in Table 1. The principle is as follows Figure 1 As shown, the specific steps include:

[0048] Table 1

[0049] element Si Mn Cr Ti V Nb W Ingredient content 0.277 0.513 3.046 0.284 0.357 0.124 0.126

[0050] (1) The cast iron rod with a diameter of 100 mm of the above composition is pre-processed and divided into cylindrical forging blanks with a length of 200 mm.

[0051] (2) The material is sent to the forging machine through the input mechanism and repeatedly hammered into a spherical shape in the forging die. At the same time, an infrared thermal imager is used for real-time detection in the forging gap, and the surface temperature image data is immediately transmitted to the data processor. The trained CNN convolutional neural network is used for analysis. When thin strips of abnormal temperature areas appear, they are marked as cracks, and flake or granular areas are marked as scratches and inclusions. The above process is completed in the forging interval. Identification and recognition are completed, and the material is sent to the waiting area for remelting through the output mechanism 2.

[0052] (3) The temperature data collected by the thermal imager during the forging process did not find the above defects in the CNN convolutional neural network, and was marked as a qualified finished product. It was transferred to the next process treatment area through the output mechanism 1 for processing.

[0053] (4) Applications have confirmed that the CNN convolutional neural network has the ability to quickly identify targets and detect marks after iterative training of the temperature feature database. After this process, there are only 3 defective products among every 1,000 marked good products, and all products marked as defective have defects. This eliminates the process of conducting separate quality inspections on products after traditional forging and pressing, while ensuring the product yield rate.

[0054] CNN convolutional neural network has the ability of self-learning. As the number of applications gradually increases, the speed and accuracy will be further improved.

[0055] In this embodiment, a CNN neural network is used to extract features from thermal imaging data of surface cracks, scratches, inclusion defects, etc. that appear during metal alloy forging and convert them into a mathematical matrix form. This is used to better analyze local defect areas in the image, thereby supporting real-time visual decision-making processes and achieving the goal of rapid detection and classification of forged workpieces.

[0056] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A method for rapid target detection of forging defects based on neural network, characterized in that: The specific steps include: (1) The workpieces in the forging system are numbered from workpiece 1 to workpiece N; the number of forging times for each workpiece is set to a1...a N , the insulation time of each workpiece is b1...b N ; (2) Establish a CNN convolutional neural network training database; 2.1 Randomly execute T times of forging system work. Each time the forging system works according to different forging times and holding time, the number of forging times is The holding time is 2.2 Use thermal imager to record the temperature image of each forging system operation X1...X T , process the image; 2.21 Perform fusion filtering and denoising on the temperature image to improve image quality; 2.22 Establish a coordinate system with the center of the temperature image as the origin, perform position correction on the temperature image, and remove the problem of angle tilt or distortion of the temperature image; 2.23 Perform HOG segmentation on the processed temperature image to extract the temperature image features. The size and direction of the gradient are calculated by the pixel values ​​in the temperature image. The gradient size is calculated according to Labeled as g1...g T , the gradient direction follows The labels are θ1...θ T ;in, In g x is the pixel value in the x direction in the temperature image coordinate system, g y is the pixel value in the y direction; 2.3 According to each forging system work, the corresponding forging times Insulation time Temperature image gradient size g1...g T , gradient direction θ1...θ T Statistics form a database of thermal imaging images of forgings; 2.4 Based on the temperature gradient direction and size distribution effect of the temperature image, the training data is selected from the forging thermal imaging image database in step 2.3 to form a training database and a test database. The training data database includes the corresponding forging times. Insulation time Temperature image gradient size g1...g T , gradient direction θ1...θ T ;The database contains the real defect type corresponding to each temperature image; (3) Training the CNN convolutional neural network 3.1 Use CNN convolutional neural network to train the temperature image gradient size g1...g in the database in step 2.4 T With the gradient direction θ1...θ T Perform gradient feature extraction to generate training data and corresponding labels required for deep learning; 3.2 Set the loss function 'Loss' about the correlation between the temperature image gradient size, gradient direction, forging times, and holding time, and iteratively train the CNN convolutional neural network in step 3.1 under the condition that the loss function 'Loss' reaches the minimum to obtain the weight and bias of the CNN; to obtain the CNN convolutional neural network, use the test database, input the optimized CNN neural network model, until the difference between the output value of the neural network model and the true value satisfies the set loss function 'Loss' to reach the minimum, and obtain the trained neural network model; (4) Through the CNN convolutional neural network and the temperature images collected by the thermal imager, batches of workpieces can be inspected in real time to achieve the purpose of rapid classification.

2. The neural network-based forging defect rapid target detection method according to claim 1, characterized in that: Train the CNN convolutional neural network; The training algorithm is stochastic gradient descent and the optimizer is Adam algorithm.

3. The neural network-based forging defect rapid target detection method according to claim 1, characterized in that: The loss function 'Loss' in step 3.2 is: Loss = ||A*CNN(G)-B-CNN(θ)|| 2 ,in G=[g1...g T ]、θ=[θ1...θ T ], CNN is a convolutional neural network.