Carbon fiber material damage detection method and device based on denoising diffusion sample incremental learning
By generating fitted samples through diffusion and anti-diffusion processing, the problem of scarce and low-quality defect samples in the detection of carbon fiber composite core conductors is solved, thereby improving the accuracy and robustness of the detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-04-07
AI Technical Summary
In the detection of carbon fiber composite core conductors, the scarcity and low quality of defect samples lead to incomplete datasets and samples being subject to noise interference, thus affecting the accuracy of detection.
Fitted samples are generated by performing diffusion and dediffusion processing on real samples, which are then added to the real samples to form complete samples. These samples are then used to train the damage prediction model.
It improves the robustness of the damage prediction model and the accuracy of fault diagnosis, making up for the lack of scarce and low-quality defect samples.
Smart Images

Figure CN115982965B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a carbon fiber material damage detection method and device based on denoising diffusion sample incremental learning. BACKGROUND
[0002] Carbon fiber composite core conductor is a new type of conductor, which has the advantages of large current carrying capacity, light weight and low loss. Using carbon fiber composite core conductor can cope with the social situation of resource channel shortage and rapid growth of power load demand. Although carbon fiber composite core conductor has good tensile properties, it has poor resistance to radial compression, bending and torsion. Therefore, during construction, the conductor core may be damaged by bending and collision, and after being put into use, tightening the conductor will cause the damage to be aggravated, eventually leading to serious accidents.
[0003] The current carbon fiber composite core conductor detection uses X-ray scanning of the conductor to obtain X-ray images, constructs a data set, and performs supervised learning based on a deep learning network. However, there are two shortcomings: 1. Supervised learning requires a large number of high-quality samples, but it is not practical to obtain defect samples during the use or transportation of the conductor, and it will consume a lot of resources and time to manufacture defect samples in the laboratory, so the data set is incomplete and cannot cover all defect types and have sufficient samples for each type. 2. The sample collection process is disturbed by various factors, and most of the collected samples have noise interference, resulting in low sample quality. SUMMARY
[0004] The purpose of the present application is to provide a carbon fiber material damage detection method and device based on denoising diffusion sample incremental learning, which aims to solve the technical problems of defect sample scarcity and low defect sample quality.
[0005] In a first aspect, a carbon fiber material damage detection method based on denoising diffusion sample incremental learning is provided, comprising:
[0006] Image data of the carbon fiber composite material is collected to obtain real samples;
[0007] The real samples are subjected to diffusion processing and inverse diffusion processing to generate fitting samples;
[0008] The fitting samples are supplemented to the real samples to obtain complete samples;
[0009] The complete samples are used to train a preset damage prediction model to obtain a trained damage prediction model.
[0010] In some embodiments, the image data of the carbon fiber composite material is collected to obtain real samples, comprising:
[0011] X-ray detection is performed on the carbon fiber composite material to obtain a detection image;
[0012] The detection image is sorted into a picture set of several batches as the real sample.
[0013] In some embodiments, the real sample is subjected to diffusion processing and inverse diffusion processing to generate a fitting sample, including:
[0014] The real sample is input into a preset diffusion model to obtain a posterior distribution;
[0015] The sampling data of the posterior distribution is input into a forward diffusion process of the diffusion model to obtain noisy data;
[0016] The conditional probability of the inverse diffusion process is predicted according to the noisy data to obtain an approximate prior distribution;
[0017] The approximate prior distribution is fitted using KL divergence to obtain a prior distribution;
[0018] Gaussian sampling is performed on the prior distribution, and the inverse diffusion denoising is performed on the Gaussian sampling data, and the inverse diffusion time is adaptively adjusted to obtain the fitting sample.
[0019] In some embodiments, the sampling data of the posterior distribution is input into the forward diffusion process of the diffusion model, including:
[0020] The diffusion time and the Gaussian noise of the forward diffusion process are set;
[0021] The Gaussian noise is gradually added to the sampling data of the posterior distribution within the diffusion time, and the sampling data is mapped to a Gaussian distribution through a Markov chain to obtain the noisy data.
[0022] In some embodiments, the conditional probability of the inverse diffusion process is predicted according to the noisy data to obtain an approximate prior distribution, including:
[0023] The noisy data is input into a decoder for decoding to obtain a reconstructed sample;
[0024] The reconstructed sample is input into a prediction model, and the posterior diffusion conditional probability is predicted according to the relationship between the noisy data and the sampling data of the posterior distribution to obtain the approximate prior distribution.
[0025] In some embodiments, the approximate prior distribution is fitted using KL divergence to obtain a prior distribution, including:
[0026] The cross-entropy of the posterior distribution and the approximate prior distribution is calculated using the KL divergence reaching the minimum of the information loss and the entropy of the posterior distribution, and the prior distribution of the diffusion model is fitted according to the cross-entropy of the posterior distribution and the approximate prior distribution.
[0027] In some embodiments, the supplementing of the fitting sample into the real sample to obtain a complete sample comprises:
[0028] The real sample is divided into a training set and a test set, and the fitting sample is supplemented into the training set for augmentation.
[0029] In a second aspect, a carbon fiber material damage detection device is provided, and the device comprises:
[0030] A sampling module is configured to acquire image data of the carbon fiber composite material to obtain a real sample.
[0031] A fitting module is configured to perform diffusion processing and inverse diffusion processing on the real sample to generate a fitting sample.
[0032] An integration module is configured to supplement the fitting sample into the real sample to obtain a complete sample.
[0033] A training module is configured to train a preset damage prediction model using the complete sample to obtain a trained damage prediction model.
[0034] In a third aspect, an electronic device is provided, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the denoising diffusion sample incremental learning carbon fiber material damage detection method of the first aspect when executing the computer program.
[0035] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the denoising diffusion sample incremental learning carbon fiber material damage detection method of the first aspect when executed by a processor.
[0036] The present application has the following beneficial effects: In actual industry, image data of carbon fiber composite material is collected to obtain a real sample, diffusion processing and inverse diffusion processing are performed on the actually obtained real sample to generate a fitting sample, thereby augmenting and expanding a small amount of samples obtained in actual industry by the generated fitting sample, and a damage prediction model is trained using a small amount of real samples while being supplemented by a large number of augmented false samples in the model training stage, which makes up for the shortage of defect samples and the low quality of defect samples, improves the robustness of the model, and improves the fault diagnosis accuracy of the carbon fiber composite core conductor. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 FIG. 1 is a flowchart of a carbon fiber material damage detection method according to an embodiment of the present application.
[0038] Figure 2 FIG. 2 is a flowchart of the step S101 in FIG. 1 according to an embodiment of the present application. Figure 1
[0039] Figure 3 FIG. 3 is a flowchart of the step S102 in FIG. 1 according to an embodiment of the present application. Figure 1
[0040] Figure 4 FIG. 4 is a flowchart of the step S302 in FIG. 3 according to an embodiment of the present application. Figure 3
[0041] Figure 5 FIG. 5 is a flowchart of the step S303 in FIG. 3 according to an embodiment of the present application. Figure 3
[0042] Figure 6 FIG. 6 is a structural diagram of a carbon fiber material damage detection device according to an embodiment of the present application.
[0043] Figure 7 FIG. 7 is a hardware structural diagram of an electronic device according to an embodiment of the present application.
[0044] Figure 8 FIG. 8 is a schematic diagram of a detection image obtained by collecting a carbon fiber material.
[0045] Figure 9 FIG. 9 is a schematic diagram of fitting images in a sample.
[0046] Figure 10 FIG. 10 is a contrast diagram of defect diagnosis accuracy. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the following will further describe the present application with embodiments and drawings.
[0048] The exemplary embodiments will be described in detail herein below with reference to the drawings. When the following description refers to the drawings, same numbers in different drawings represent the same or similar elements unless otherwise indicated. The following exemplary embodiments described in the exemplary embodiments are not meant to represent all implementations consistent with the present disclosure. Rather, they are simply an example of apparatus and method consistent with some aspects of the present disclosure as detailed in the appended claims.
[0049] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0050] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the sequence in the flowchart. The terms "first", "second", etc. in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
[0052] Firstly, several terms involved in the present application are analyzed:
[0053] 1) Artificial Intelligence (AI)
[0054] Artificial intelligence is to use digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0055] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning, etc.
[0056] 2) Machine Learning (ML)
[0057] Machine learning is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory, etc. It is a specialized study of how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structure, and continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to enabling computers to have intelligence, and its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0058] In the related art, carbon fiber composite core conductor detection uses X-ray scanning of the conductor to obtain an X-ray image, constructs a data set, and performs supervised learning based on a deep learning network. However, there are two deficiencies: 1. Supervised learning requires a large number of high-quality samples, but it is not practical to obtain defect samples during the use or transportation of the conductor, and manufacturing defect samples in the laboratory will consume a large amount of resources and time, so the data set is incomplete and cannot cover all defect types and have sufficient samples for each type. 2. The sample collection process is disturbed by various factors, and most of the collected samples have noise interference, resulting in low sample quality.
[0059] Based on this, the embodiment of the application provides a carbon fiber material damage detection method and device based on denoising diffusion sample incremental learning, a device, equipment and a storage medium, which generates sufficient high-fidelity samples using a denoising diffusion probability model to augment the data set, to solve the technical problems of defect sample scarcity and low defect sample quality.
[0060] The carbon fiber material damage detection method and device based on denoising diffusion sample incremental learning provided by the embodiment of the application are described in detail as follows. First, the carbon fiber material damage detection method based on denoising diffusion sample incremental learning in the embodiment of the application is described.
[0061] The embodiment of the application can acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technology and application system of using digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0062] The basic technology of artificial intelligence generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The software technology of artificial intelligence mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0063] The carbon fiber material damage detection method provided by the embodiment of the present application relates to the field of artificial intelligence. The carbon fiber material damage detection method provided by the embodiment of the present application can be applied to a terminal, can also be applied to a server end, and can also be software running in a terminal or a server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as a separate physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and the software can be an application implementing the table information extraction method, but is not limited to the above forms.
[0064] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0065] It should be noted that in each specific embodiment of the present application, when relevant processing needs to be performed according to user information, user behavior data, user history data, and user location information, etc. related to the identity or characteristics of the user, the user's permission or consent will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards of relevant countries and regions. In addition, when the embodiment of the present application needs to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, etc. After obtaining the separate permission or separate consent of the user, the necessary user-related data for enabling the embodiment of the present application to normally operate is obtained.
[0066] Figure 1is a flowchart of a carbon fiber material damage detection method of a denoising diffusion sample incremental learning shown in the first embodiment, Figure 1 The method in the method can include but is not limited to steps S101 to S104.
[0067] In step S101, image data of the carbon fiber composite material is collected to obtain a real sample.
[0068] In step S101 of the embodiment, the carbon fiber composite material is a carbon fiber composite core conductor, which can be an image data collection of each part of the carbon fiber composite material by using an image sampling module, to obtain a plurality of local position detection images of the carbon fiber composite material, as shown in Figure 8 The image data set, i.e. the real sample, is constructed by identifying and extracting the image data with conductor structure defects from the collected image data.
[0069] In step S102, the real sample is processed by diffusion and reverse diffusion to generate a fitting sample.
[0070] Diffusion process is a process of gradually adding Gaussian noise to the original picture to become a noisy picture. By continuously adding noise to the original picture, the picture obtained after a predetermined number of times is basically a noisy picture, thereby achieving the purpose of destroying the picture.
[0071] Reverse diffusion process is a process of gradually recovering the picture from the noise. The reverse diffusion process loses information, and the picture recovered by the reverse diffusion process is similar to the original picture but different from the original picture. The picture obtained by reverse diffusion can be used as a newly generated picture.
[0072] In step S102 of the embodiment, the image data in the real sample is respectively processed by diffusion and reverse diffusion. In the diffusion process, Gaussian noise is gradually added to the image data in the real sample, and finally the image data in the real sample is converted into picture data that is basically all noise. In the reverse diffusion process, a model is learned to predict the picture data obtained by the diffusion process, thereby restoring the image data originally existing in the real sample. The image data obtained by reverse diffusion is the fitting sample.
[0073] In step S103, the fitting sample is supplemented to the real sample to obtain a complete sample.
[0074] In step S103 of this embodiment, the fitting sample is supplemented after the real sample, and the picture data of the real sample is expanded to obtain a complete sample.
[0075] In step S104, the complete sample is used to train the preset damage prediction model to obtain a trained damage prediction model.
[0076] In step S104 of this embodiment, the complete sample is divided into a training set and a test set, the preset damage prediction model is a residual neural network, the training set is selected, the training parameters of the damage prediction model are set, and the damage prediction model is trained according to the damage prediction model and the training parameters to minimize the loss function to obtain the trained damage prediction model.
[0077] Thus, the carbon fiber material damage detection method provided by the de-noising diffusion sample incremental learning of this embodiment collects images of carbon fiber composite materials in actual industry to obtain real samples, performs diffusion processing and inverse diffusion processing on the actually obtained real samples to generate fitting samples, thereby augmenting and expanding a small amount of samples obtained in actual industry through the generated fitting samples, and training a damage prediction model using a small amount of real samples while supplementing a large number of expanded false samples in the model training stage, which makes up for the shortage of defect samples and the low quality of defect samples, and improves the robustness of the model and the fault diagnosis accuracy of the carbon fiber composite core conductor.
[0078] As shown in FIG. 1, Figure 2 In one embodiment, Figure 1 Step S101 in FIG. 1 can include but is not limited to steps S201 to S202.
[0079] In step S201, X-ray detection is performed on the carbon fiber composite material to obtain a detection image.
[0080] In step S201 of this embodiment, a climbing mechanical device containing an X-ray module is used to collect image data of the carbon fiber composite material, and the local position of the carbon fiber composite material is continuously collected for image acquisition during the climbing process of the climbing mechanical device.
[0081] In step S202, the detection image is arranged into a plurality of batches of picture sets as real samples.
[0082] In step S201 of this embodiment, the 1000 detection images collected are divided and arranged into 19 batches of picture sets, and each picture set contains 100 detection images.
[0083] To increase the amount of image data for real samples, each detection image can be divided into image blocks of the same resolution, thereby increasing the amount of image data for real samples exponentially. For example, each acquired detection image can be divided into two image blocks of the same resolution, and the real sample can be composed of 2000 image blocks instead of the original 1000 detection images.
[0084] like Figure 3 As shown, in one embodiment, Figure 1 Step S102 may include, but is not limited to, steps S301 to S305.
[0085] Step S301: Input the real sample into the preset diffusion model to obtain the posterior distribution.
[0086] In step S301 of this embodiment, the real samples are divided into several batches, and the set batches of real samples are input into a preset diffusion model to obtain the posterior distribution. The real samples input into the diffusion model include image data X = {x1, x2, ..., x...} N}, where x i This represents the i-th image data in the current batch, where i = 1, 2, ..., N.
[0087] Step S302: Input the posterior distribution sampling data into the forward diffusion process of the diffusion model to obtain noisy data.
[0088] In step S302 of this embodiment, data is sampled from the posterior distribution to obtain un-noiseed sampled data, which is then input into the forward diffusion process of the diffusion model. This forward diffusion process involves a continuous-time variable, and it is assumed that the diffusion begins not at time 0, but at a certain time τ, i.e., x... τ It is the initial variable, x t The perturbation occurs at time t. The purpose of diffusion is to map the samples to a Gaussian distribution through a Markov chain, i.e.:
[0089]
[0090]
[0091] Where T is the total number of diffusion steps, and to make the diffusion process relatively simple, q(x) is defined. t |x t-1 () is a Gaussian distribution related to βt. I is the identity matrix. To obtain the distribution that diffuses from one time point to another, let α... t =1-β t , By performing parameter renormalization, we can derive: This formula allows us to calculate the diffusion rate x at any given moment.t .
[0092] Step S303, according to the condition probability of the inverse diffusion process predicted by the noisy data, an approximate prior distribution is obtained.
[0093] In step S303 of the embodiment, a model needs to be learned to approximate the condition probability, so as to run the inverse diffusion process, that is:
[0094]
[0095] p θ (x t-1 |x t )=Ν(x t-1 ;μ θ (x t ,t),∑ θ (x t ,t));
[0096] The noise of the noisy data is predicted using the learned model and the noisy data obtained by the forward diffusion process each time, so as to run the inverse diffusion process. Specifically, the noisy data obtained by the forward diffusion process and the image data before being noisy can be paired and input into the model for training, so as to train a model that can predict the image data before being noisy more accurately after inputting the noisy data obtained by the forward diffusion process. The trained model is used to predict the image data before being noisy, and the noisy data is gradually restored, so as to run the inverse diffusion process.
[0097] Step S304, the approximate prior distribution is fitted using the KL divergence, to obtain a prior distribution.
[0098] It can be understood that the KL divergence (Kullback-Leibler Divergence) is used to measure the "distance" between two probability distribution functions. In the embodiment, the KL divergence is used to measure how much information is lost between the diffusion process and the inverse diffusion process.
[0099] In step S304 of the embodiment, the approximate prior distribution is fitted using the KL divergence. The KL divergence between the approximate prior distribution and the posterior distribution can be calculated. The closer the approximate prior distribution and the posterior distribution, the smaller the value of the KL divergence, that is, the smaller the information loss. Since the logarithmic function is a convex function, the value of the KL divergence is non-negative. Therefore, when the information loss reaches the minimum, the KL divergence is equal to 0 or a certain preset value. Then, the approximate prior distribution is fitted under the condition that the posterior distribution and the KL divergence when the information loss reaches the minimum are determined. The fitting result is used as the prior distribution of the diffusion model, so that the quality of the fitting samples generated by the diffusion model is the highest.
[0100] Step S305, Gaussian sampling is performed on the prior distribution, inverse diffusion denoising is performed on the Gaussian sampling data, the inverse diffusion time is adaptively adjusted, and fitting samples are obtained.
[0101] In step S305 of this embodiment, after the prior distribution of the diffusion model is determined, Gaussian sampling is performed on the obtained prior distribution, the obtained Gaussian sampling data is input into the diffusion model for inverse diffusion denoising processing, the total number of inverse diffusion steps is set, and then denoised image data is generated, as shown in Figure 9 The fitting samples are obtained by integrating all the denoised image data.
[0102] As shown in Figure 4 In an embodiment, Figure 3 Step S302 in
[0103] Step S401, set the diffusion time and Gaussian noise of the forward diffusion process.
[0104] In step S401 of this embodiment, the total diffusion steps T are set in advance, for example, T = 1000, and as t increases, the data is closer to the random Gaussian distribution, and the value of the added Gaussian noise βt is larger.
[0105] Step S402, gradually add Gaussian noise to the sampling data of the posterior distribution within the diffusion time, map the sampling data to a Gaussian distribution through a Markov chain, and obtain noisy data.
[0106] In step S402 of this embodiment, diffusion is equivalent to mapping samples to a Gaussian distribution through a Markov chain, which can be expressed by the following formula:
[0107]
[0108]
[0109] Where T is the total diffusion step, to make the diffusion process relatively simple, q(x t x t-1 ) is a Gaussian distribution related to βt I is the unit matrix.
[0110] As t continues to increase, the original data x0 will gradually lose its characteristics, and finally when T→∞, x T tends to a Gaussian distribution independent in each direction, and visually, after adding noise to an originally perfect photo for many steps, the picture becomes almost completely noisy.
[0111] As shown in Figure 5 In an embodiment,Figure 3 Step S303 in the method can include, but is not limited to, steps S501-S502.
[0112] In step S501, the noisy data is input into the decoder for decoding to obtain a reconstructed sample.
[0113] In step S501 of the embodiment, the U-Net model is used to generate the reconstructed sample.
[0114] In step S502, the reconstructed sample is input into the prediction model to perform posterior diffusion conditional probability prediction according to the relationship between the noisy data and the sampling data of the posterior distribution, to obtain an approximate prior distribution.
[0115] In step S502 of the embodiment, a prediction model is constructed to perform posterior diffusion conditional probability prediction, and the noisy data obtained each time by the forward diffusion process and the sampling data of the posterior distribution are used to train the prediction model, so that x t Predict x t-1 , N(x t-1 ; μ θ (x t , t), ∑ θ (x t , t)), x t and t are input into the prediction model, so that the prediction model that can predict the image data before noise addition more accurately after inputting the noisy data finally obtained by the forward diffusion process is trained, and the trained prediction model is used to predict the image data before noise addition, the reconstructed sample obtained by the decoder is input into the trained prediction model, the noisy data is gradually restored, the inverse diffusion process is performed, and an approximate prior distribution is obtained.
[0116] In step S304 of some embodiments, the cross entropy of the posterior distribution and the approximate prior distribution is calculated using the KL divergence when the information loss reaches the minimum and the entropy of the posterior distribution, and the prior distribution of the diffusion model is fitted according to the cross entropy of the posterior distribution and the approximate prior distribution.
[0117] Specifically, the KL divergence between the approximate prior distribution and the posterior distribution is equal to the difference between the cross entropy of the posterior distribution and the approximate prior distribution and the information entropy of the posterior distribution. In the case where the information entropy of the posterior distribution and the KL divergence when the information loss reaches the minimum are determined, the cross entropy of the posterior distribution and the approximate prior distribution can be determined, and then the fitting result is obtained through the cross entropy of the posterior distribution and the approximate prior distribution. The fitting result is used as the prior distribution of the diffusion model.
[0118] In step S103 of some embodiments, the real samples are divided into a training set and a test set, and fitting samples are added to the training set for supplementation, and the fitting samples are supplemented to the training set for augmentation.
[0119] To verify the feasibility of the carbon fiber material damage detection method of denoising diffusion sample incremental learning, the following comparative experiments are performed:
[0120] Experiment one: The carbon fiber composite core conductor dataset has 5 categories of images. The carbon fiber composite core conductor dataset is divided into a training set and a test set, with the training set accounting for 80% of the dataset and the test set accounting for 20% of the dataset. The training set and the test set are put into a residual neural network for training to obtain the defect detection accuracy of the carbon fiber composite core conductor in experiment one.
[0121] Experiment two: In the training set of experiment one, high-fidelity samples generated by the denoising diffusion probability model are added to obtain a sufficiently rich training set. The training set and the test set are put into a residual neural network for training to obtain the defect detection accuracy of the carbon fiber composite core conductor in experiment two.
[0122] The defect diagnosis accuracy of the two models is shown in Table 1. Figure 8 As shown in Table 1, the model has a defect diagnosis accuracy of about 90% when trained only using the carbon fiber composite core conductor dataset, and the model has a defect diagnosis accuracy of more than 95% after adding high-fidelity samples. This method can significantly improve the defect diagnosis accuracy. At the same time, since the high-fidelity samples are not completely consistent with a certain defect category, they also differ from the fault, so the robustness of the model can be increased. Therefore, the present application uses the denoising diffusion probability model to expand the defect samples of the carbon fiber composite core conductor, which provides a good reference for the supplement of scarce samples, the improvement of the model, the optimization of detection accuracy, and the improvement of engineering manufacturing process.
[0123] In order to better implement the above method, the embodiment of the present application also provides a carbon fiber material damage detection device, which can be integrated in a server or a terminal or other electronic equipment.
[0124] Please refer to Figure 6 The embodiment of the present application also provides a carbon fiber material damage detection device, which can realize the carbon fiber material damage detection method of denoising diffusion sample incremental learning mentioned in the above embodiments. The device comprises:
[0125] The sampling module 601 is configured to collect image data of the carbon fiber composite material to obtain real samples.
[0126] The fitting module 602 is configured to perform diffusion processing and inverse diffusion processing on the real samples to generate fitting samples.
[0127] The integration module 603 is configured to supplement the fitting samples to the real samples to obtain complete samples.
[0128] The training module 604 is configured to train the preset damage prediction model using the complete sample, to obtain a trained damage prediction model.
[0129] The specific embodiments of the carbon fiber material damage detection device are basically the same as those of the carbon fiber material damage detection method based on denoising diffusion sample incremental learning, and will not be repeated here.
[0130] The embodiments of the present application also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the carbon fiber material damage detection method based on denoising diffusion sample incremental learning when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0131] Please refer to Figure 7 , Figure 7 The hardware structure of the electronic device of another embodiment is illustrated, which includes:
[0132] The processor 701 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0133] The memory 702 can be implemented in the form of a ROM (ReadOnly Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory). The memory 702 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 702 and are called and executed by the processor 701 to implement the carbon fiber material damage detection method based on denoising diffusion sample incremental learning of the embodiments of the present application.
[0134] The input / output interface 703 is used to realize information input and output.
[0135] The communication interface 704 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0136] The bus 705 transmits information between various components (for example, the processor 701, the memory 702, the input / output interface 703, and the communication interface 704) of the device.
[0137] The processor 701, the memory 702, the input / output interface 703, and the communication interface 704 are communicatively connected with each other through the bus 705.
[0138] The application also provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the denoising diffusion sample incremental learning method for carbon fiber material damage detection.
[0139] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0140] The denoising diffusion sample incremental learning method for carbon fiber material damage detection provided by the embodiments of the application, the device, the electronic equipment and the storage medium are used for image acquisition of the carbon fiber composite material in the actual industry to obtain real samples, diffusion processing and inverse diffusion processing are performed on the actually obtained real samples to generate fitting samples, so that the few samples obtained in the actual industry are augmented and expanded through the generated fitting samples, and the damage prediction model is trained by using the few real samples and supplemented with a large number of expanded false samples in the model training stage, which makes up for the shortage of defect samples and low quality of defect samples, and improves the robustness of the model and the fault diagnosis accuracy of the carbon fiber composite core conductor.
[0141] The embodiments described in the embodiments of the application are used to more clearly illustrate the technical solutions of the embodiments of the application, and do not constitute a limitation on the technical solutions provided by the embodiments of the application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the application are also applicable to similar technical problems.
[0142] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the application, and can include more or fewer steps than those shown in the figures, or combine certain steps or different steps.
[0143] The apparatus embodiments described above are merely exemplary, and the units described as separate units can or can not be physically separate, i.e., can be located in one place, or can be distributed over multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0144] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.
[0145] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims of the foregoing drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so
[0146] It should be understood that in this application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c, can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0147] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0148] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0149] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0150] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0151] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method for damage detection of carbon fiber materials using denoised diffusion sample incremental learning, characterized in that, include: Image data acquisition of carbon fiber composite materials to obtain real samples includes: X-ray detection of the carbon fiber composite materials to obtain detection images; segmenting the detection images into image blocks of the same resolution and organizing them into several batches of image sets as the real samples; The real samples are subjected to diffusion and inverse diffusion processing to generate fitted samples, including: inputting the real samples into a preset diffusion model to obtain a posterior distribution; inputting the sampled data of the posterior distribution into the forward diffusion process of the diffusion model to obtain noisy data; predicting the conditional probability of the inverse diffusion process based on the noisy data to obtain an approximate prior distribution; calculating the cross-entropy between the posterior distribution and the approximate prior distribution using the KL divergence when the information loss is minimized and the entropy of the posterior distribution; fitting the prior distribution of the diffusion model based on the cross-entropy between the posterior distribution and the approximate prior distribution; performing Gaussian sampling on the prior distribution and inverse diffusion denoising on the Gaussian sampled data; adaptively adjusting the inverse diffusion time to obtain the fitted samples; The step of inputting the sampled data of the posterior distribution into the forward diffusion process of the diffusion model includes: setting the diffusion time and the Gaussian noise of the forward diffusion process; gradually adding the Gaussian noise to the sampled data of the posterior distribution during the diffusion time, and mapping the sampled data to the Gaussian distribution through a Markov chain to obtain the noisy data; The step of predicting the conditional probability of the reverse diffusion process based on the noisy data to obtain an approximate prior distribution includes: inputting the noisy data into a decoder for decoding to obtain a reconstructed sample; inputting the reconstructed sample into a prediction model, and performing a posterior diffusion conditional probability prediction based on the relationship between the noisy data and the sampled data of the posterior distribution to obtain the approximate prior distribution; The process of supplementing the fitted samples into the real samples to obtain complete samples includes: dividing the real samples into a training set and a test set; adding the fitted samples to the training set for supplementation; and supplementing the fitted samples into the training set for augmentation. The complete sample is used to train the preset damage prediction model to obtain the trained damage prediction model, which includes a residual neural network.
2. A carbon fiber material damage detection device, characterized in that, The device includes: The sampling module is used to acquire image data of carbon fiber composite materials to obtain real samples, including: performing X-ray detection on the carbon fiber composite materials to obtain detection images; segmenting the detection images into image blocks of the same resolution and organizing them into several batches of image sets as the real samples; The fitting module is used to perform diffusion and reverse diffusion processing on the real samples to generate fitted samples. The module includes: inputting the real samples into a preset diffusion model to obtain a posterior distribution; inputting the sampled data of the posterior distribution into the forward diffusion process of the diffusion model to obtain noisy data; predicting the conditional probability of the reverse diffusion process based on the noisy data to obtain an approximate prior distribution; calculating the cross-entropy between the posterior distribution and the approximate prior distribution using the KL divergence when the information loss is minimized and the entropy of the posterior distribution; fitting the prior distribution of the diffusion model based on the cross-entropy between the posterior distribution and the approximate prior distribution; performing Gaussian sampling on the prior distribution and reverse diffusion denoising on the Gaussian sampled data; and adaptively adjusting the reverse diffusion time to obtain the fitted samples. The step of inputting the sampled data of the posterior distribution into the forward diffusion process of the diffusion model includes: setting the diffusion time and the Gaussian noise of the forward diffusion process; gradually adding the Gaussian noise to the sampled data of the posterior distribution during the diffusion time, and mapping the sampled data to the Gaussian distribution through a Markov chain to obtain the noisy data; The step of predicting the conditional probability of the reverse diffusion process based on the noisy data to obtain an approximate prior distribution includes: inputting the noisy data into a decoder for decoding to obtain a reconstructed sample; inputting the reconstructed sample into a prediction model, and performing a posterior diffusion conditional probability prediction based on the relationship between the noisy data and the sampled data of the posterior distribution to obtain the approximate prior distribution; An integration module is used to supplement the fitted samples into the real samples to obtain complete samples, including: dividing the real samples into a training set and a test set, adding the fitted samples to the training set for supplementation, and supplementing the fitted samples into the training set for augmentation; The training module is used to train a preset damage prediction model using the complete samples to obtain a trained damage prediction model, wherein the damage prediction model includes a residual neural network.
3. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the carbon fiber material damage detection method of claim 1, which involves denoising diffusion sample incremental learning.
4. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the carbon fiber material damage detection method of claim 1, which involves denoising and diffusion sample incremental learning.
Citation Information
Patent Citations
Carbon fiber composite material defect damage classification identification and quantitative analysis method and system
CN113012123A
Generative model training method and device, noise scale generation method and computing equipment
CN113822321A