Ray film non-destructive testing classification method and system based on neural memory differentiation
By introducing the neural memory differential module into the ResNet34 network, the problem of low accuracy of CNN convolutional network in the multi-classification of ray film defects is solved, and higher recognition accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411799528.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The existing CNN convolutional neural network has low recognition accuracy in multi-classification of ray film defects, making it difficult to effectively improve the nonlinear classification capabilities of the network.
Neural memory differential (nmODE) module is introduced into the backbone network, especially the ResNet34 network structure, and feature remapping is performed through ordinary differential equations to enhance the nonlinear expression ability of the model.
The recognition accuracy of ray film defects is significantly improved, the model accuracy is improved by 1.57%, and overfitting problems are avoided, showing higher accuracy and robustness.
Smart Images

Figure CN119622475B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence, and relates to a method and system for non-destructive testing and classification of radiographic films based on neural memory differentiation. Background Art
[0002] As a connection method, welding technology has developed rapidly in modern industry and has been widely used in many fields, such as construction, vehicles, aerospace, railways, petrochemicals, and mechanical and electrical industries, due to its characteristics of precision, reliability, and low cost. During the welding process, the weld metal rapidly cools from a high-temperature liquid state to a normal-temperature solid state, which will lead to non-uniform internal structure. At the same time, due to factors such as groove oil contamination, welding consumable mixing, welding environmental conditions, and welding technology, welding defects will inevitably occur during the welding process. Therefore, it is crucial to inspect the quality of the weld to ensure the reliability and safety of the structure.
[0003] For the detection of surface defects of welds, the traditional detection method is for inspectors to visually observe with the naked eye, which requires inspectors to have sufficient experience for judgment, and the detection results are easily affected by the subjectivity of the inspectors. For the detection of internal defects of welds, most are using weld defect detection technologies such as X-rays or ultrasonic waves, by irradiating the weld area with X-rays and detecting the weld with ultrasonic waves. When using the human eye to detect surface defects of welds, the human eye is extremely prone to fatigue and is easily interfered by factors such as the on-site environment, which can easily cause a series of problems such as misdetection and missed detection.
[0004] In recent years, with the rapid development of artificial intelligence technology, artificial intelligence technology has been widely applied in all walks of life. Of course, in order to accurately determine the quality of welds, there are already related technologies that use models such as convolutional neural networks (CNNs) to intelligently detect weld defects. The convolutional neural network (CNN) directly learns features from data samples and has the characteristic of "end-to-end". The input is a defect image, and the output is the classification result of the defect, so as to realize the identification of weld defects. Hou W et al. designed a deep neural network model for automatic detection of welds on the entire RT film image. Experiments have proved that it can effectively identify defects, that is, realize the judgment of defective and non-defective; Fan Ding et al. performed 4-classification on the RT film image by improving the image processing algorithm and activation function. Experiments have proved that it can shorten the network training time and improve the recognition accuracy; Dalila Say et al. augmented the RT film defect data set and constructed a CNN model, which has a good performance in the 6-classification task of RT films.
[0005] The invention patent application with the application number 202110965549.4 discloses an X-ray weld defect detection method based on a convolutional neural network, which includes the following contents: establishing a weld image data set containing different types of weld defects, and labeling all weld pictures in the data set with weld labels; establishing an AF-RCNN model, and the AF-RCNN model includes a backbone network module, a region generation module, and a target classification and position regression module; the backbone network module adopts a residual network (ResNet) and a feature pyramid network (FPN) structure, and an efficient convolutional attention module is introduced between the residual network (ResNet) and the feature pyramid network (FPN) to enhance the network's learning ability for non-obvious defects and small target features. At the same time, the CIOU loss function is introduced to enhance the positioning ability of the bounding box; using the established data set to train the AF-RCNN model for the classification and positioning of weld defects.
[0006] Most of the above-mentioned weld defect detection technologies based on artificial intelligence are multi-classification models based on the CNN convolutional neural network. The CNN convolutional neural network is essentially a high-order non-linear multi-classifier. The recognition and classification accuracy of the traditional CNN convolutional network is relatively low. How to improve the automatic recognition accuracy of the multi-classification problem of the CNN convolutional network and enhance the non-linearity of the network is the key to the design of the network model. Summary of the Invention
[0007] The purpose of the present invention is to provide a ray film non-destructive testing classification method and system based on neural memory differentiation to solve the problem of low multi-classification automatic recognition accuracy of the existing CNN convolutional network for ray film defects.
[0008] The present invention specifically adopts the following technical solutions to achieve the above purpose:
[0009] A ray film non-destructive testing classification method based on neural memory differentiation includes the following steps:
[0010] Step S1, data set preparation;
[0011] Obtain X-ray film samples of component welds, and label the X-ray film samples to obtain label data;
[0012] Step S2, construct a defect classification model;
[0013] Construct a defect classification model, and the defect classification model includes a backbone network, an nmODE module, and a fully connected layer;
[0014] The ordinary differential equation adopted by the nmODE module is:
[0015] ;
[0016] ;
[0017] Among them, represents the input, represents the status value of the model, represents the learnable function, and both represent learnable parameters;
[0018] Step S3, training the defect classification model;
[0019] Use the X-ray film samples and label data obtained in Step S1 to train the defect classification model constructed in Step S2;
[0020] Step S4, real-time defect classification;
[0021] Obtain the weld X-ray film to be classified and input it into the defect classification model trained in Step S3, and the defect classification model outputs the weld defect type.
[0022] Furthermore, the backbone network is ResNet18, ResNet34, ResNet50 or ResNet101.
[0023] Furthermore, the backbone network is ResNet34. The ResNet34 network structure includes an initial 7×7 convolutional layer and a 3×3 max pooling layer at the front end of the network, several residual blocks in the middle of the network, and a global average pooling layer and a fully connected layer at the end of the network.
[0024] Furthermore, the residual block consists of two 3×3 convolutional layers, a batch normalization layer and a ReLU activation function. The input of the residual block is connected to the output of the residual block through a skip connection.
[0025] Furthermore, in Step S3, when training the defect classification model, the loss function uses the cross-entropy loss function, specifically:
[0026] ;
[0027] Among them, represents the th sample, represents the th type of defect, represents the total number of samples, represents the total number of defect classification categories, represents the th sample being the true probability of the th type of defect, represents the th sample being the predicted probability of the th type of defect.
[0028] A ray film non-destructive testing classification system based on neural memory differential equations, comprising:
[0029] A dataset preparation module, configured to obtain X-ray film samples of component welds and label the X-ray film samples to obtain labeled data;
[0030] A defect classification model construction module, configured to construct a defect classification model, where the defect classification model includes a backbone network, an nmODE module, and a fully connected layer;
[0031] The ordinary differential equation adopted by the nmODE module is:
[0032] ;
[0033] ;
[0034] Wherein, represents the input, represents the state value of the model, represents a learnable function, and both represent learnable parameters;
[0035] A defect classification model training module, configured to train the defect classification model constructed by the defect classification model construction module by using the X-ray film samples and labeled data obtained in the dataset preparation module;
[0036] A defect real-time classification module, configured to obtain an X-ray film of a weld to be classified and input it into the defect classification model trained by the defect classification model training module, and the defect classification model outputs the type of weld defect.
[0037] The beneficial effects of the present invention are as follows:
[0038] 1. In the present invention, by introducing an nmODE module with excellent capabilities in processing complex and non-linear features on the basis of the backbone network, the nmODE module can capture complex dynamic behaviors, can significantly enhance its expression ability in dealing with non-linear systems, and finally improve the recognition accuracy of the model for ray film defects, effectively solving the problem of low multi-class automatic recognition accuracy of ray film defects by existing CNN convolutional networks.
[0039] 2. In the present invention, by introducing an nmODE module on the basis of ResNet34, the classification accuracy of the model is increased by 1.57%, further improving the performance of the model; experimental results show that the non-linear modeling ability of the nmODE module enhances the performance of the model in dealing with complex features without increasing complexity.
[0040] 3. In the present invention, compared with ResNet50 and ResNet101, ResNet34 shows higher accuracy and better robustness, indicating that in specific tasks, an appropriate number of network layers can effectively avoid the overfitting problem.
[0041] 4. In the present invention, the defect classification model of the present application has higher performance than the other three typical residual networks, and has high practical application value. Future research can further optimize the model structure and explore its application potential in other industrial defect detection fields. Description of the Drawings
[0042] Figure 1 is a schematic flow chart of the present invention;
[0043] Figure 2 is a schematic structural diagram of the defect classification model in the present invention;
[0044] Figure 3 is a schematic structural diagram of the nmODE module in the present invention;
[0045] Figure 4 is a schematic diagram of the residual block in the present invention;
[0046] Figure 5 is a schematic diagram of some X-ray film negative sample images in the present invention. Detailed Embodiments
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention.
[0048] Therefore, based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0049] Embodiment 1
[0050] This embodiment provides a method for non-destructive testing and classification of X-ray films based on neural memory differentiation, which is used to identify the defects of X-ray films taken of component welds and obtain the types of weld defects. As Figure 1 shown, the defect identification method specifically includes the following steps:
[0051] Step S1, data set preparation;
[0052] Obtain X-ray film negative samples of component welds and label the X-ray film negative samples to obtain label data.
[0053] Take X-ray films of the welds of the shooting components (of course, the film images can also be cropped to intercept the defect images as samples), a total of 1,899 pieces, as sample images, and construct a sample data set. Then, professional personnel evaluate and label the defects of the welds among them to obtain label data.
[0054] In addition, data processing can also be performed on the samples, that is, randomly flip the images horizontally and vertically to achieve data set augmentation.
[0055] When making labels, the categories of weld defects can be divided into 7 categories: crack, lack of fusion, lack of penetration, internal concavity, undercut, slag inclusion, and porosity.
[0056] Some of the above defect images are as Figure 5 shown, and the above data set is divided into a training set, a validation set, and a test set according to the ratio of 7:1:2.
[0057] Step S2, construct a defect classification model;
[0058] Construct a defect classification model, as Figure 2 shown, the defect classification model includes a backbone network, an nmODE module, and a fully connected layer.
[0059] The backbone network can select one of ResNet18, ResNet34, ResNet50, and ResNet101. Among them, the backbone network preferably selects the ResNet34 network.
[0060] The network structure of ResNet34 includes an initial 7×7 convolutional layer and a 3×3 max-pooling layer at the front end of the network, several residual blocks in the middle of the network, and a global average pooling layer and a fully connected layer at the end of the network. And the residual block is composed of two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function. The input of the residual block is connected to the output of the residual block through a skip connection. Specifically, the network structure of ResNet34 starts with a 7×7 convolutional layer, which uses a convolutional kernel with a stride of 2, and further reduces the spatial size of the feature map through a 3×3 max-pooling layer. The network contains multiple residual blocks composed of two 3×3 convolutional layers, and each convolutional layer is followed by a batch normalization layer and a ReLU activation function. ResNet34 is composed of four parts in total, each part contains a different number of residual blocks, and the number of channels is 64, 128, 256, and 512 in sequence. In the first residual block of each part, 1×1 convolution is used to adjust the number of input and output channels to ensure dimension matching in the skip connection. A skip connection mechanism is introduced in the network. After all the residual blocks, the network uses a global average pooling layer to reduce the feature map to a low-dimensional vector, and finally outputs the classification result through a fully connected layer and a Softmax layer. Convolution and pooling operations are performed on the input image, and a 3×3 convolutional kernel is used to process the extracted features, with the number of channels being 64. Then, a convolutional operation with a stride of 2 is performed on the feature map with a size of 32×32×64 to achieve downsampling, and data normalization is performed to obtain a feature map with a size of 16×16×128. After that, a convolutional operation with a stride of 1 and data normalization are performed on this feature map. Subsequently, the feature map undergoes two 3×3 convolutional operations with a stride of 2 for further downsampling to obtain a feature map with a size of 4×4×512. This feature map is fed into a series of 3×3 convolutional layers for deep feature extraction, and finally enters the global average pooling layer. After the global average pooling layer, the feature map with 512 channels enters the nmODE module for non-linear remapping.
[0061] The structure of the nmODE module is as Figure 3 shown, and when performing the mapping, the ordinary differential equation adopted is:
[0062] ;
[0063] ;
[0064] Among them, represents the input, represents the state value of the model, represents a learnable function, and both represent learnable parameters.
[0065] y(0) represents that the initial state value of the model is 0, y(t) represents the state value of the model at time t, and the final output value of the model is y(1), that is, the state value of the model at t = 1. The output state y(1) is obtained at T = 1, and this process enhances the non-linear representation ability of the model. The feature map processed by the nmODE module finally enters the fully connected layer, and the fully connected layer accurately classifies the extracted features, thus completing the RT negative film defect classification task.
[0066] In addition, the residual connection includes residual blocks. The residual block is as Figure 4 shown. The residual block includes two convolutional layers, and the input of the first convolutional layer and the output of the second convolutional layer adopt a skip connection. The residual block directly transmits information between the input and the output through the skip connection, avoiding the problem of gradient disappearance, thus making the training of the deep network more stable and efficient. The skip connection can ensure that the accuracy of the network does not decrease in subsequent learning by making the input x of the next layer approximately equal to the output H(x). When the deviation increases, the learning target changes, and the residual network no longer learns the complete output, but learns the difference between the output H(x) and the input x, that is, the residual: N(x) = H(x) - x. This structure enables the network to focus on learning more subtle feature changes while maintaining the stability and accuracy of the overall network. By introducing the skip connection, the residual block can directly transmit gradient information at each layer, thus avoiding the problem of gradient disappearance or explosion in the deep network. This mechanism not only makes the training of the deep network more stable and efficient, but also allows the model to maintain or improve the classification performance while increasing the network depth.
[0067] Step S3, training the defect classification model;
[0068] Use the X-ray negative film samples and label data obtained in step S1 to train the defect classification model constructed in step S2.
[0069] When training the defect classification model, use the Adam optimizer, learning rate λ = 0.0001, batch size batch_size = 8, and number of epochs epoch = 200.
[0070] When training the defect classification model, the loss function uses the cross-entropy loss function, specifically:
[0071] ;
[0072] where represents the th sample, represents the th type of defect, represents the total number of samples, represents the The true probability of the class of defects for one sample, denotes the predicted probability of the class of defects for the th sample.
[0073] Step S4, real-time defect classification;
[0074] Obtain the X-ray film of the weld to be classified and input it into the defect classification model trained in step S3. The defect classification model outputs the type of weld defect.
[0075] Experimental example
[0076] Use ResNet18, ResNet34, ResNet50, and ResNet101 as the backbone networks respectively, and without introducing the nmODE module, construct four defect classification models; and use the sample data in the test set to conduct classification performance tests on the four defect classification models without introducing the nmODE module. The classification performance results are shown in Table 1:
[0077] Table 1 Classification results of four residual network defects
[0078]
[0079] It can be seen from Table 1 that for the weld defect classification task, the model depth is not completely positively correlated with the classification accuracy. The classification accuracies of ResNet101 and ResNet50 are both lower than that of ResNet34. This is because more layers and parameters lead to overfitting of the model during training, making the model too close to the distribution of the training set, thus lacking robustness and generalization ability. ResNet34 performs best in this task.
[0080] Use ResNet34 as the backbone network, introduce the nmODE module, and construct a new defect classification model; and use the sample data in the test set to conduct classification performance tests on the new defect classification model with the nmODE module introduced. The classification performance results are shown in Table 2:
[0081] Table 2 Classification results of defects before and after adding the nmODE module to the ResNet34 network
[0082]
[0083] It can be seen from Table 2 that after adding the nmODE module, the classification accuracy of the model is improved by 1.57%. This benefits from the excellent non-linear modeling ability of the nmODE module. By remapping the 4×4×512 feature map extracted by ResNet34, the nmODE module improves the classification accuracy of the model.
[0084] Example 2
[0085] This embodiment provides a ray film non-destructive testing classification system based on neural memory differentiation, which is used to identify the x-ray films taken of the welds of components and obtain the types of weld defects. The defect identification system specifically includes:
[0086] A dataset preparation module, which is used to obtain the X-ray film samples of the welds of components and label the X-ray film samples to obtain label data.
[0087] Take X-ray films of the welds of components (of course, the film images can also be cropped to intercept the defect images as samples), a total of 1,899 pieces, and use them as sample images to construct a sample dataset. Then, professionals evaluate and label the defects in the welds to obtain label data.
[0088] In addition, data processing can also be performed on the samples, that is, randomly flip the images horizontally and vertically to achieve the augmentation of the dataset.
[0089] When labeling, the categories of weld defects can be divided into 7 categories: crack, lack of fusion, lack of penetration, internal concavity, undercut, slag inclusion, and porosity.
[0090] Some of the above defect images are as Figure 5 shown, and the above dataset is divided into a training set, a validation set, and a test set according to the ratio of 7:1:2.
[0091] A defect classification model construction module, which is used to construct a defect classification model, as Figure 2 shown, the defect classification model includes a backbone network, an nmODE module, and a fully connected layer.
[0092] The backbone network is ResNet18, ResNet34, ResNet50, or ResNet101. Among them, the backbone network preferably uses the ResNet34 network.
[0093] The network structure of ResNet34 includes an initial 7×7 convolutional layer and a 3×3 max pooling layer at the front end of the network, several residual blocks in the middle of the network, and a global average pooling layer and a fully connected layer at the end of the network; and the residual block consists of two 3×3 convolutional layers, a batch normalization layer, and a ReLU activation function, and the input of the residual block is connected to the output of the residual block by means of a skip connection. Specifically: The network structure of ResNet34 starts with a 7×7 convolutional layer, which uses a convolutional kernel with a stride of 2, and further reduces the spatial size of the feature map through a 3×3 max pooling layer. The network contains multiple residual blocks composed of two 3×3 convolutional layers, and each convolutional layer is followed by a batch normalization layer and a ReLU activation function. ResNet34 is composed of four parts in total, and each part contains a different number of residual blocks, and the number of channels is 64, 128, 256, and 512 in sequence. In the first residual block of each part, 1×1 convolution is used to adjust the number of input and output channels to ensure dimension matching in the skip connection. A skip connection mechanism is introduced in the network. After all residual blocks, the network uses a global average pooling layer to reduce the feature map to a low-dimensional vector, and finally outputs the classification result through a fully connected layer and a Softmax layer. Convolution and pooling operations are performed on the input image; a 3×3 convolutional kernel is used to process the extracted features, and the number of channels is 64; then, a convolutional operation with a stride of 2 is performed on the feature map with a size of 32×32×64 to achieve downsampling, and data normalization is performed to obtain a feature map with a size of 16×16×128; then, a convolutional operation with a stride of 1 and data normalization are performed on this feature map; subsequently, the feature map is further downsampled through two 3×3 convolutional operations with a stride of 2 to obtain a feature map with a size of 4×4×512; this feature map is fed into a series of 3×3 convolutional layers for deep feature extraction, and finally enters the global average pooling layer; after the global average pooling layer, the feature map with 512 channels enters the nmODE module for non-linear remapping.
[0094] The structure of the nmODE module is as Figure 3 shown, and when performing the mapping, the ordinary differential equation adopted is:
[0095] ;
[0096] ;
[0097] Among them, represents the input, represents the state value of the model, represents the learnable function, and Both represent learnable parameters. When T = 1, the output state y(1) is obtained, and this process enhances the non-linear representation ability of the model. The feature map processed by the nmODE module finally enters the fully connected layer, and the fully connected layer accurately classifies the extracted features, thus completing the RT negative film defect classification task.
[0098] In addition, the residual connection includes residual blocks. The residual block is as Figure 4 shown. The residual block includes two convolutional layers, and the input of the first convolutional layer is connected to the output of the second convolutional layer by a skip connection. The residual block directly transmits information between the input and output through the skip connection, avoiding the problem of gradient disappearance, thus making the training of the deep network more stable and efficient. The skip connection can ensure that the accuracy of the network does not decrease in subsequent learning by making the input x of the next layer approximately equal to the output H(x). When the deviation increases, the learning objective changes, and the residual network no longer learns the complete output, but learns the difference between the output H(x) and the input x, that is, the residual: N(x)=H(x)-x. This structure enables the network to focus on learning more subtle feature changes while maintaining the stability and accuracy of the overall network. By introducing the skip connection, the residual block can directly transmit gradient information at each layer, thus avoiding the problem of gradient disappearance or explosion in the deep network. This mechanism not only makes the training of the deep network more stable and efficient, but also allows the model to maintain or improve the classification performance while increasing the network depth.
[0099] The defect classification model training module uses the X-ray negative film samples and label data obtained in the dataset preparation module to train the defect classification model constructed by the defect classification model construction module.
[0100] When training the defect classification model, the Adam optimizer, learning rate λ = 0.0001, batch size batch_size = 8, and number of epochs epoch = 200 are used.
[0101] When training the defect classification model, the loss function uses the cross-entropy loss function, specifically:
[0102] ;
[0103] where represents the th sample, represents the th type of defect, represents the total number of samples, represents the th sample being the true probability of the th type of defect, represents the th sample being the Prediction probability of type I defects.
[0104] A defect real-time classification module, which is used to obtain the X-ray film of the weld to be classified and input the defect classification model trained by the defect classification model training module, and the defect classification model outputs the type of weld defect.
[0105] Embodiment 3
[0106] A computer device includes a memory and a processor. When the computer program stored in the memory is executed by the processor, the processor is caused to execute the steps of a method for non-destructive testing and classification of X-ray films based on neural memory differentiation.
[0107] Among them, the computer device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device can perform human-computer interaction with the user through a keyboard, a mouse, a remote control, a touchpad, or a voice control device, etc.
[0108] The memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or D interface display memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory may be an internal storage unit of the computer device, such as the hard disk or memory of the computer device. In other embodiments, the memory may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Of course, the memory may also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the memory is commonly used to store the operating system installed on the computer device and various application software, such as the program code of the method for non-destructive testing and classification of X-ray films based on neural memory differentiation. In addition, the memory can also be used to temporarily store various data that have been output or will be output.
[0109] In some embodiments, the processor may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run the program code stored in the memory or process data, such as running the program code of the ray film non-destructive testing classification method based on neural memory differentiation.
[0110] Embodiment 4
[0111] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor is caused to execute the steps of the ray film non-destructive testing classification method based on neural memory differentiation.
[0112] Wherein, the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor to cause the at least one processor to execute the steps of the ray film non-destructive testing classification method based on neural memory differentiation as described above.
[0113] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the ray film non-destructive testing classification method described in the embodiments of the present application.
Claims
1. A non-destructive testing classification method for radiographic films based on neural memory differentiation, characterized in that, It includes the following steps: Step S1, data set preparation; Obtain X-ray film samples of component welds and annotate the X-ray film samples to obtain labeled data; Step S2, construct a defect classification model; Construct a defect classification model, which includes a backbone network, an nmODE module, and a fully connected layer; The ordinary differential equation adopted by the nmODE module is: ; ; Among them, represents the input, represents the state value of the model, represents the learnable function, and both represent learnable parameters; Step S3, train the defect classification model; Use the X-ray film samples and labeled data obtained in Step S1 to train the defect classification model constructed in Step S2; Step S4, real-time defect classification; Obtain the X-ray film of the weld to be classified and input it into the defect classification model trained in Step S3, and the defect classification model outputs the type of weld defect; The backbone network is ResNet34, and the network structure of ResNet34 includes a convolutional layer and a max pooling layer at the front end of the network, several residual blocks in the middle of the network, and a global average pooling layer and a fully connected layer at the end of the network; The residual block consists of a convolutional layer, a batch normalization layer, and a ReLU activation function, and the input of the residual block is connected to the output of the residual block by means of a skip connection; In Step S3, when training the defect classification model, the loss function adopts the cross-entropy loss function, specifically: ; Among them, represents the th sample, represents the th type of defect, represents the total number of samples, represents the total number of defect classifications, represents the th sample being the true probability of the th type of defect, represents the th sample being the predicted probability of the th type of defect.
2. A non-destructive testing classification system for radiographic films based on neural memory differentiation, characterized in that, It includes: A data set preparation module, which is used to obtain X-ray film samples of component welds and annotate the X-ray film samples to obtain labeled data; A defect classification model construction module, which is used to construct a defect classification model, and the defect classification model includes a backbone network, an nmODE module, and a fully connected layer; The ordinary differential equation adopted by the nmODE module is: ; ; Among them, represents the input, represents the state value of the model, represents the learnable function, and both represent learnable parameters; A defect classification model training module, which is used to train the defect classification model constructed by the defect classification model construction module with the X-ray film samples and labeled data obtained by the data set preparation module; A defect real-time classification module, which is used to obtain the X-ray film of the weld to be classified and input it into the defect classification model trained by the defect classification model training module, and the defect classification model outputs the type of weld defect; The backbone network is ResNet34, and the network structure of ResNet34 includes a convolutional layer and a max pooling layer at the front end of the network, several residual blocks in the middle of the network, and a global average pooling layer and a fully connected layer at the end of the network; The residual block consists of a convolutional layer, a batch normalization layer, and a ReLU activation function, and the input of the residual block is connected to the output of the residual block by means of a skip connection; In the defect classification model training module, when training the defect classification model, the loss function adopts the cross-entropy loss function, specifically: ; Among them, represents the th sample, represents the th type of defect, represents the total number of samples, represents the total number of defect classifications, represents the true probability that the th sample is the th type of defect, represents the predicted probability that the th sample is the th type of defect.
Citation Information
Patent Citations
A method for X-ray weld defect detection based on convolutional neural networks
CN113674247B
Industrial weld defect detection method based on multi-branch attention pyramid structure
CN113222919A
X-ray weld defect detection method based on convolutional neural network
CN113674247A