A divertor target plate defect detection method, device, equipment and storage medium

CN118365645BActive Publication Date: 2025-02-14HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410791188.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2025-02-14
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

In the detection of defects of filter target plates in the prior art, there are problems such as large model size, low detection accuracy, slow computing speed, and easy errors or misjudgments in complex environments.

Method used

The improved YOLOv5 model is adopted, and the model's feature extraction and fusion capabilities are improved by introducing a bidirectional feature pyramid network and a ResNet residual network, and data preprocessing is performed through gamma transformation to optimize the robustness of the model.

Benefits of technology

It realizes lightweight detection of target plate surface defects, improves detection accuracy and efficiency, and solves the problems of low accuracy of small target defect detection and misjudgment in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365645B_ABST
    Figure CN118365645B_ABST
Patent Text Reader

Abstract

The present invention provides a divertor target plate defect detection method, device, equipment, computer product and storage medium, which obtains target plate surface defect data by acquiring a target plate surface image to be tested and inputting the target plate surface image to be tested into a pre-trained target plate defect detection model. The present application is based on the YOLOv5 algorithm and improves its model framework structure to obtain a target plate defect detection model, introduces a ResNet residual network in the defect feature extraction stage, and realizes multi-scale feature fusion of defects through bidirectional feature pyramid network learning weights. The present invention can be run in a real-time detection environment, realizes the lightweight of the detection model, and solves the problems of large size and slow computing speed of the existing detection model; at the same time, it improves the defect detection accuracy, solves the problem of low accuracy of small target defect detection of the existing model and the problem of errors or misjudgments in complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of nuclear fusion component manufacturing, and in particular to a divertor target plate defect detection method, device, equipment, computer product and storage medium. Background Art

[0002] EAST is China's fully superconducting tokamak magnetic confinement nuclear fusion experimental device in service. It is the tokamak device that can maintain high-temperature plasma operation for the longest time in the world. The divertor is an important component of the EAST device, mainly composed of inner and outer target plates, DOME and supporting structure, and the surface material of the target plate is tungsten attached to copper. Since the target plate is in contact with high-temperature plasma in a strong magnetic environment, it is easy to ablate and crack, affecting the operation of the experiment. Therefore, the detection of divertor target plate defects is of great significance to the maintenance of the EAST experimental device.

[0003] At present, in most cases, defect detection on the target plate surface is done manually, which is inefficient and the detection results are subjective, and it is easy to miss detection. In recent years, the target detection algorithm based on convolutional neural network has been successfully applied in the field of industrial inspection. It can realize defect detection on the target plate surface to a certain extent, but the current detection model has the shortcomings of large model volume, low detection accuracy and slow defect recognition speed. Summary of the invention

[0004] The present invention provides a divertor target plate defect detection method, device, equipment, computer product and storage medium. Through the improved YOLOv5 model, lightweight target plate surface defect detection is achieved, while the accuracy and efficiency of defect detection are improved.

[0005] In a first aspect, the present invention provides a divertor target plate defect detection method, comprising:

[0006] Acquire the surface image of the target plate to be tested;

[0007] The target plate surface image to be tested is input into a pre-trained target plate defect detection model to obtain target plate surface defect data, wherein the target plate defect detection model is a YOLOv5 model including a bidirectional feature pyramid network.

[0008] Furthermore, the pre-training process of the target plate defect detection model includes:

[0009] Acquire training samples, wherein the training samples include a training set, a validation set, and a test set;

[0010] Inputting the training set into a target plate defect detection model to be trained, wherein the target plate defect detection model includes a ResNet residual network;

[0011] Extracting features from the training set using the ResNet residual network to obtain sample defect features;

[0012] Inputting the sample defect features into the bidirectional feature pyramid network for feature fusion to obtain model training weights;

[0013] The model training weight is evaluated by the validation set to obtain an optimal model training weight, wherein the optimal model training weight indicates that the target plate defect detection model under the weight has the highest accuracy rate for detecting target plate surface defects;

[0014] The model training process is ended, and the target plate defect detection model corresponding to the optimal model training weight is confirmed as the final target plate defect detection model.

[0015] Furthermore, the obtaining of training samples includes:

[0016] Acquire surface defect datasets by capturing images of the divertor target surface

[0017] Performing image enhancement on the surface defect dataset by using a gamma transform method, and annotating images in the surface defect dataset to obtain the training samples;

[0018] The training samples are divided to obtain the training set, the validation set and the test set, wherein the data ratio of the training set, the validation set and the test set is 7:2:1.

[0019] Furthermore, the evaluating the model training weights by using the validation set to obtain the optimal model training weights includes:

[0020] The model training weights are evaluated according to precision, recall and F1 index, and the precision calculation formula is:

[0021]

[0022] The calculation formula of the recall rate is:

[0023]

[0024] The calculation formula of the F1 index is:

[0025]

[0026] Among them, P indicates that the defect feature is recognized, N indicates that the defect feature is not recognized, T indicates that the feature recognition is correct, and F indicates that the feature recognition is wrong.

[0027] Furthermore, the pre-training process of the target plate defect detection model includes:

[0028] The training set data is fitted by the WioU loss function, and the target plate defect detection model to be trained is iteratively trained.

[0029] In a second aspect, the present invention further provides a divertor target plate defect detection device, comprising:

[0030] The image acquisition module to be tested is used to acquire the surface image of the target plate to be tested;

[0031] The defect data acquisition module is used to input the surface image of the target plate to be tested into a pre-trained target plate defect detection model to obtain the target target plate surface defect data, wherein the target plate defect detection model is a YOLOv5 model including a bidirectional feature pyramid network.

[0032] Furthermore, the defect data acquisition module further includes a model pre-training unit, and the model pre-training unit includes:

[0033] A sample acquisition unit, used to acquire training samples, wherein the training samples include a training set, a validation set and a test set;

[0034] A data input unit, used for inputting the training set into a target plate defect detection model to be trained, wherein the target plate defect detection model includes a ResNet residual network;

[0035] A defect feature extraction unit, used to extract features from the training set through the ResNet residual network to obtain sample defect features;

[0036] A training weight acquisition unit, used for inputting the sample defect features into the bidirectional feature pyramid network for feature fusion to obtain model training weights;

[0037] An optimal parameter acquisition unit, used to evaluate the model training weight through the verification set to obtain an optimal model training weight, wherein the optimal model training weight indicates that the target plate defect detection model under the weight has the highest accuracy rate for target plate surface defect detection;

[0038] The model acquisition unit is used to end the model training process and confirm the target plate defect detection model corresponding to the optimal model training weight as the final target plate defect detection model.

[0039] In a third aspect, the present invention further provides a computer device, comprising:

[0040] at least one memory and at least one processor;

[0041] The memory is used to store one or more programs;

[0042] When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of the divertor target plate defect detection method as described in the first aspect.

[0043] In a fourth aspect, the present invention further provides a computer program product, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the steps of the divertor target plate defect detection method as described in the first aspect are implemented.

[0044] In a fifth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the divertor target plate defect detection method as described in the first aspect are implemented.

[0045] The present invention obtains the surface image of the target plate to be tested, inputs the surface image of the target plate to be tested into a pre-trained target plate defect detection model, and obtains the target plate surface defect data, wherein the target plate defect detection model is a YOLOv5 model including a bidirectional feature pyramid network. The present invention can be run in a real-time detection environment, realizes the lightweight of the detection model, and solves the problems of large volume and slow operation speed of the existing detection model; at the same time, it improves the defect detection accuracy, solves the problem of low accuracy of small target defect detection of the existing model and the problem of errors or misjudgments in complex environments.

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A flowchart of a divertor target plate defect detection method provided in an exemplary embodiment;

[0048] Figure 2 A schematic diagram of a network structure of a target plate defect detection model of a divertor target plate defect detection method provided in an exemplary embodiment;

[0049] Figure 3 A flowchart of the steps of a target plate defect detection model pre-training method for a divertor target plate defect detection method provided in an exemplary embodiment;

[0050] Figure 4 A schematic diagram of the structure of a ResNet residual network in a divertor target plate defect detection method provided in an exemplary embodiment;

[0051] Figure 5 A schematic diagram of feature fusion of a BiFPN network in a divertor target plate defect detection method provided in an exemplary embodiment;

[0052] Figure 6 The detection result of the surface defects of the divertor target plate by the target plate defect detection model constructed based on the unimproved YOLOv5 model provided in an exemplary embodiment;

[0053] Figure 7 A detection result of a divertor target plate surface defect by a divertor target plate defect detection method provided in an exemplary embodiment;

[0054] Figure 8 A schematic diagram of a module of a divertor target plate defect detection device provided in an exemplary embodiment;

[0055] Fig. 9 An internal structural diagram of a computer device provided in an exemplary embodiment;

[0056] Fig.10 FIG. 1 is a diagram of the internal structure of a computer device provided in an exemplary embodiment. DETAILED DESCRIPTION

[0057] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0058] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.

[0059] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0060] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0061] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0062] YOLOv5 is an object detection model based on the You Only Look Once (YOLO) architecture, which currently includes different versions such as YOLOv5s, YOLOv5m, YOLOv5l, YOLOv5x and YOLOv5n. YOLOv5 is widely used in scenarios such as surface detection due to its excellent performance in object detection tasks, ability to quickly and accurately detect multiple objects in images or videos, and suitability for real-time applications.

[0063] By analyzing the existing divertor target plate defect detection based on the YOLOv5 model, it is believed that the current existing model has the following defects:

[0064] (1) The existing YOLOv5 model does not fully consider the characteristics of small targets during its design, which increases the difficulty of locating and classifying small targets. Therefore, when detecting small defect targets, the detection accuracy is lower than that of large defect targets.

[0065] (2) The existing YOLOv5 model can realize many target classifications, which leads to large model size, high computational complexity, slow calculation speed, and high performance requirements for the image processor, making it difficult to achieve real-time detection at the experimental site.

[0066] (3) The existing YOLOv5 model is not very robust to scene changes such as illumination changes, occlusion, and rotation. In complex scenes, the original model may make errors or misjudgments.

[0067] Therefore, based on the background technology content and the above considerations, the embodiment of the present application provides a divertor target plate defect detection method, such as Figure 1 As shown, the method comprises the following steps:

[0068] S201: Acquire a surface image of a target plate to be tested.

[0069] Specifically, the surface image of the target plate to be tested is an image file containing the divertor target plate, which can be obtained through a device that can provide a camera function, including but not limited to: a smart phone and a tablet computer, a digital camera, a video camera, a laptop computer and a desktop computer equipped with a camera, a surveillance camera, a remote-controlled drone, etc. In the embodiment of the present application, the surface image of the target plate to be tested is collected by a CCD camera.

[0070] S202: Input the target board surface image to be tested into a pre-trained target board defect detection model to obtain target board surface defect data, wherein the target board defect detection model is a YOLOv5 model including a bidirectional feature pyramid network. The network architecture diagram of the target board defect detection model is as follows: Figure 2 shown.

[0071] In some other examples, defect detection of the divertor target plate can also be achieved through the Faster-RCNN target detection algorithm. However, since this algorithm is a two-stage target detection algorithm framework, it is more complex and computationally intensive than the YOLOv5 algorithm model under the single-stage framework described in this application, and has a slower detection speed, and cannot be applied to real-time detection scenarios.

[0072] In a preferred embodiment, Figure 3 As shown, the pre-training process of the target plate defect detection model includes:

[0073] S2021: Obtain training samples, where the training samples include a training set, a validation set, and a test set.

[0074] Specifically, a data set containing various divertor target plate defect images is labeled with corresponding defect types, and used as training samples to train the target plate defect detection model.

[0075] In a preferred embodiment, the obtaining of training samples includes:

[0076] By collecting images of the divertor target plate surface, a surface defect data set is obtained;

[0077] Performing image enhancement on the surface defect dataset by using a gamma transform method, and annotating images in the surface defect dataset to obtain the training samples;

[0078] The training samples are divided to obtain the training set, the validation set and the test set, wherein the data ratio of the training set, the validation set and the test set is 7:2:1.

[0079] Specifically, in an embodiment of the present application, surface information of a divertor target plate is collected by a CCD camera to obtain an original defect image; the original defect image is unified in image size and format, and can be cropped into a JPG image of the same length and width; then a surface defect data set including three types of divertor target plates is established, and the three types of surface defects of the divertor target plates are respectively annotated as cracks, ablation and notches to obtain an original defect image.

[0080] The original defect image is preprocessed, and the data set is further expanded by flipping, mirroring, rotating, etc., and image enhancement is achieved through gamma transformation to reduce the impact of the similarity between the defect area and the non-defect area on the detection performance. Specifically, in image processing, the contrast of the overexposed or underexposed (too dark) grayscale image is adjusted through gamma transformation, that is, through nonlinear transformation, the grayscale values ​​of the darker areas in the image are enhanced, and the grayscale values ​​of the areas with excessively large grayscale values ​​in the image are reduced. After the gamma transformation, the overall detail performance of the image will be enhanced. The embodiment of the present application adopts gamma nonlinear transformation to reduce the background noise in the defect image by adjusting the brightness and contrast of the image, thereby enhancing the robustness of the algorithm. The transformation formula is as follows:

[0081]

[0082] in, is the pixel value of the original image, is the gamma value used to adjust brightness and contrast, is a constant, is the pixel value of the transformed image.

[0083] The preprocessed image data is labeled. The current training sample includes the image file and its corresponding label file. The image file and label file are randomly divided into training set, validation set and test set in a ratio of 7:2:1. Taking a specific experimental data as an example, 1508 original defect images are collected and obtained. After the original image data is expanded, the number of training set labels is shown in the following table:

[0084]

[0085] S2022: Inputting the training set into a target plate defect detection model to be trained, wherein the target plate defect detection model includes a ResNet residual network.

[0086] Specifically, the ResNet residual network is introduced in the feature extraction stage of the model to achieve more nonlinear transformations and channel interactions. The ResNet residual network can amplify feature representation and promote information transfer between different branches, thereby enhancing the algorithm's perception of small defect targets.

[0087] S2023: Perform feature extraction on the training set through the ResNet residual network to obtain sample defect features.

[0088] Specifically, Figure 4 As shown, Figure 4 Schematic diagram of the structure of the ResNet residual network.

[0089] The process of extracting defect features by ResNet residual network is as follows: the input tensor is converted into the first tensor and the second tensor through a 1×1 convolution layer, and the first tensor is used as the input of the ResNet module. The ResNet residual network includes multiple ResNet modules, each of which first passes through a 3×3 convolution layer. Process the output of the previous layer Subset, then subset Add to convolutional layer The output of The output of each ResNet module is represented as ,but:

[0090]

[0091] The output tensor of each ResNet module It is connected with the second tensor in sequence, and then all the connected tensors are connected again into a larger feature tensor. The feature tensor is processed by a 1×1 convolution layer to obtain the final output tensor, which is the sample defect feature.

[0092] Compared with the traditional neural network model that uses CSPDarknet for feature extraction, the embodiment of the present application uses the ResNet residual network for feature extraction, which realizes more nonlinear transformations and channel interactions, making it easier for the model to capture the correlation between different features and improve the accuracy of defect feature recognition.

[0093] S2024: Input the sample defect features into the bidirectional feature pyramid network for feature fusion to obtain model training weights.

[0094] Specifically, BiFPN (Bidirectional Feature Pyramid Network), a bidirectional feature pyramid network, is an efficient multi-scale feature fusion network that is optimized on the basis of the traditional feature pyramid network (FPN). BiFPN allows information between features of different scales to flow and fuse more effectively by establishing bidirectional connections between top-down and bottom-up paths; at the same time, it optimizes cross-scale connections by removing nodes with only one input edge, adding additional edges between input and output nodes at the same level, and treating each bidirectional path as a feature network layer and repeating it multiple times; BiFPN also introduces learnable weights to determine the importance of different input features, thereby improving the effect of feature fusion.

[0095] In the implementation of this application, the bidirectional feature pyramid BiFPN network structure is used to replace the PANet network structure in the original model, such as Figure 5 As shown, Figure 5 The top-down transmission path conveys the semantic information of high-level elements, and the bottom-up transmission path conveys the location information of low-level elements.

[0096] by Figure 5 Taking feature P3 in as an example, the fusion mechanism of fast normalization achieved by BiFPN network is explained. The specific feature fusion calculation formula is:

[0097]

[0098]

[0099]

[0100] in, is the weight. are input features, are the parameters that need to be learned. is the hidden layer variable value of feature P3, The calculated output of feature P3 is, .

[0101] By improving the Neck network through the BiFPN network, not only the deep features and shallow features are integrated across scales, the information transmission between feature maps of different network levels is enhanced, but also the problem of image feature information loss caused by the change of feature map resolution is effectively improved. The improved Neck network can integrate more position and detail information, allowing the network to better focus on the area where small targets are located.

[0102] S2025: Evaluate the model training weights through the validation set to obtain optimal model training weights, wherein the optimal model training weights indicate that the target plate defect detection model under the weights has the highest accuracy in detecting target plate surface defects.

[0103] In a preferred embodiment, the model training weight is evaluated according to precision, recall and F1 index, and the precision calculation formula is:

[0104]

[0105] The calculation formula of the recall rate is:

[0106]

[0107] The calculation formula of the F1 index is:

[0108]

[0109] Among them, P indicates that the defect feature is recognized, N indicates that the defect feature is not recognized, T indicates that the feature recognition is correct, and F indicates that the feature recognition is wrong.

[0110] S2026: End the model training process, and confirm the target plate defect detection model corresponding to the optimal model training weight as the final target plate defect detection model.

[0111] After obtaining the optimal model training weights, the final target plate defect detection model can also be tested through the test set to verify the performance of the target plate defect detection model.

[0112] In a preferred embodiment, the CioU loss function in the original YOLOv5 model is replaced with the WioU loss function, and the training set data is fitted by the WioU loss function to iteratively train the target plate defect detection model to be trained. The WioU loss function is based on a dynamic non-monotonic mechanism and designs a more reasonable gradient gain allocation. This allocation strategy reduces the large gradients or harmful gradients that appear in extreme samples. The WioU loss calculation pays more attention to samples of ordinary quality, thereby improving the generalization ability and overall performance of the network model.

[0113] The following will illustrate the difference between the target plate defect detection model constructed based on the improved YOLOv5 model proposed in the embodiment of the present application and the target plate defect detection model constructed based on the unimproved YOLOv5 model through a comparison of specific experimental data.

[0114] like Figure 6 and Figure 7 As shown, Figure 6The detection results of the divertor target plate surface defects based on the target plate defect detection model constructed based on the unimproved YOLOv5 model. Figure 7 The target plate defect detection model constructed based on the improved YOLOv5 model is used to detect the surface defects of the divertor target plate. By comparison, it is found that the target plate defect detection model described in the embodiment of the present application has been greatly improved in detection accuracy, small target and crack detection. Specifically, the confidence of the first defect notch is increased from 0.83 to 0.95; the confidence of the second defect ablation is increased from 0.56 to 0.97; the third defect crack cannot be detected by the original model, and the detection confidence of the improved model is 0.98; and for the notch detection of small targets, the original model failed to detect it, and the detection confidence of the improved model is 0.83. In summary, the improved model can identify defects that the original YOLOv5 model cannot identify, and the recognition confidence of the defects that can be identified is significantly improved compared with the original model.

[0115] The embodiment of the present application provides a divertor target plate defect detection method, which obtains target plate surface defect data by acquiring a target plate surface image to be tested, inputting the target plate surface image to be tested into a pre-trained target plate defect detection model. Furthermore, the present application is based on the YOLOv5 algorithm and improves its model framework structure to obtain a target plate defect detection model, which introduces gamma transform to pre-process the data before model training, and introduces ResNet residual network to achieve more nonlinear transformations and channel interactions in the defect feature extraction stage to enhance the model's perception of target defects. In addition, the present application also replaces the original path aggregation network (PANet) with a bidirectional feature pyramid network (BiFPN), and realizes multi-scale feature fusion of defects by learning weights. The divertor target plate defect detection method described in the present application can be run in a real-time detection environment, realizes the lightweight of the detection model, and solves the problem of large size and slow computing speed of the existing detection model; at the same time, it improves the defect detection accuracy, solves the problem of low accuracy of small target defect detection in the existing model, and the problem of errors or misjudgments in complex environments.

[0116] The present application also provides a divertor target plate defect detection device 300, such as Figure 8 As shown, including:

[0117] The image acquisition module 301 is used to acquire the surface image of the target plate to be tested;

[0118] The defect data acquisition module 302 is used to input the surface image of the target board to be tested into a pre-trained target board defect detection model to obtain the target board surface defect data, wherein the target board defect detection model is a YOLOv5 model including a bidirectional feature pyramid network.

[0119] In an exemplary example, the defect data acquisition module 302 further includes a model pre-training unit, and the model pre-training unit includes:

[0120] A sample acquisition unit, used to acquire training samples, wherein the training samples include a training set, a validation set and a test set;

[0121] A data input unit, used for inputting the training set into a target plate defect detection model to be trained, wherein the target plate defect detection model includes a ResNet residual network;

[0122] A defect feature extraction unit, used to extract features from the training set through the ResNet residual network to obtain sample defect features;

[0123] A training weight acquisition unit, used for inputting the sample defect features into the bidirectional feature pyramid network for feature fusion to obtain model training weights;

[0124] An optimal parameter acquisition unit, used to evaluate the model training weight through the verification set to obtain an optimal model training weight, wherein the optimal model training weight indicates that the target plate defect detection model under the weight has the highest accuracy rate for target plate surface defect detection;

[0125] The model acquisition unit is used to end the model training process and confirm the target plate defect detection model corresponding to the optimal model training weight as the final target plate defect detection model.

[0126] It should be noted that a divertor target plate defect detection device and a divertor target plate defect detection method are both derived from the same inventive concept. For the relevant explanation of a divertor target plate defect detection device, reference can be made to the embodiment of a divertor target plate defect detection method, which will not be repeated here.

[0127] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the divertor target plate defect detection method described in any one of the above embodiments is implemented.

[0128] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a divertor target plate defect detection method is implemented.

[0129] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a divertor target plate defect detection method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0130] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the divertor target plate defect detection method described in any one of the above embodiments is implemented.

[0131] The present invention may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0132] It should be understood that the embodiments of the present application are not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the embodiments of the present application is limited only by the appended claims.

[0133] The above-mentioned embodiments only express several implementation methods of the embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the embodiments of the present application, and these all belong to the protection scope of the embodiments of the present application.

Claims

1. A divertor target plate defect detection method, characterized in that: The steps include: Acquire the surface image of the target plate to be tested; Inputting the target plate surface image to be tested into a pre-trained target plate defect detection model to obtain target plate surface defect data, wherein the target plate defect detection model is a YOLOv5 model including a bidirectional feature pyramid network; The pre-training process of the target plate defect detection model includes: Acquire training samples, wherein the training samples include a training set, a validation set, and a test set; Inputting the training set into a target plate defect detection model to be trained, wherein the target plate defect detection model includes a ResNet residual network; The training set is feature extracted through the ResNet residual network to obtain sample defect features. The specific steps are: converting the input tensor into a first tensor and a second tensor through a 1×1 convolution layer, and using the first tensor as the input of the ResNet module. The ResNet residual network includes multiple ResNet modules, wherein each ResNet module first passes through a 3×3 convolution layer K i Process the output X of the previous layer i (i∈2,...,s) subset, and then subset X i (i∈3,...,s) is added to the output of the convolutional layer and fed into K i The output of each ResNet module is represented as y i ,but: The output tensor y of each ResNet module i Connect with the second tensor in sequence, and then connect all the connected tensors again into a larger feature tensor, and obtain the final output tensor after processing the feature tensor through a 1×1 convolution layer; Inputting the sample defect features into the bidirectional feature pyramid network for feature fusion to obtain model training weights; The model training weight is evaluated by the validation set to obtain an optimal model training weight, wherein the optimal model training weight indicates that the target plate defect detection model under the weight has the highest accuracy rate for detecting target plate surface defects; End the model training process, and confirm the target plate defect detection model corresponding to the optimal model training weight as the final target plate defect detection model; The obtaining of training samples comprises: By collecting images of the divertor target plate surface, a surface defect data set is obtained; Performing image enhancement on the surface defect dataset by using a gamma transform method, and annotating images in the surface defect dataset to obtain the training samples; Dividing the training sample to obtain the training set, the validation set and the test set, wherein the data ratio of the training set, the validation set and the test set is 7:2:1; The step of evaluating the model training weights by using the validation set to obtain the optimal model training weights includes: The model training weights are evaluated according to precision, recall and F1 index, and the precision calculation formula is: The calculation formula of the recall rate is: The calculation formula of the F1 index is: Among them, P indicates that the defect feature is recognized, N indicates that the defect feature is not recognized, T indicates that the feature is recognized correctly, and F indicates that the feature is recognized incorrectly; The pre-training process of the target plate defect detection model includes: The training set data is fitted by the WioU loss function, and the target plate defect detection model to be trained is iteratively trained.

2. A divertor target plate defect detection device applied to the defect detection method according to claim 1, characterized in that: include: The image acquisition module to be tested is used to acquire the surface image of the target plate to be tested; The defect data acquisition module is used to input the surface image of the target plate to be tested into a pre-trained target plate defect detection model to obtain the target target plate surface defect data, wherein the target plate defect detection model is a YOLOv5 model including a bidirectional feature pyramid network.

3. A divertor target plate defect detection device according to claim 2, characterized in that: The defect data acquisition module further includes a model pre-training unit, and the model pre-training unit includes: A sample acquisition unit, used to acquire training samples, wherein the training samples include a training set, a validation set and a test set; A data input unit, used for inputting the training set into a target plate defect detection model to be trained, wherein the target plate defect detection model includes a ResNet residual network; A defect feature extraction unit, used to extract features from the training set through the ResNet residual network to obtain sample defect features; A training weight acquisition unit, used for inputting the sample defect features into the bidirectional feature pyramid network for feature fusion to obtain model training weights; An optimal parameter acquisition unit, used to evaluate the model training weight through the verification set to obtain an optimal model training weight, wherein the optimal model training weight indicates that the target plate defect detection model under the weight has the highest accuracy rate for target plate surface defect detection; The model acquisition unit is used to end the model training process and confirm the target plate defect detection model corresponding to the optimal model training weight as the final target plate defect detection model.

4. A computer device, characterized in that: include: at least one memory and at least one processor; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of the divertor target plate defect detection method according to claim 1.

5. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the divertor target plate defect detection method according to claim 1 are implemented.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the divertor target plate defect detection method according to claim 1 are implemented.

Citation Information

Patent Citations

  • Dynamic target identification method based on multi-modal information fusion

    CN116310676A

  • Electronic component defect detection method based on improved YOLOv5 model

    CN118172318A