Twelve-lead electrocardiogram generation system and method for rare diseases
Patent Information
- Application Number
- CN202311783953.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-12-22
AI Technical Summary
[0008]然而,GAN网络需要成对训练数据,但在现实心电数据中我们只有罕见病的数据,和常见病的数据,而他们往往不能一一对应
[0029] The above technical solution has the following advantages or beneficial effects: using DiscoGAN generative adversarial network to generate 12-lead electrocardiograms of rare diseases, the corresponding training samples do not need to be one-to-one, which effectively solves the problem of difficulty in obtaining 12-lead electrocardiograms of rare diseases, and no target domain label needs to be annotated during training, which is suitable for unsupervised domain transformation.
Smart Images

Figure CN117814806B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and in particular to a system and method for generating a 12-lead electrocardiogram for a rare disease. Background Technology
[0002] Electrocardiography (ECG) is a very common diagnostic method used to detect a variety of cardiovascular diseases. With the rise of artificial intelligence and deep learning, computers have taken on some automated diagnostic tasks. However, many ECG abnormalities and arrhythmias are very rare compared to normal sinus rhythm or other cardiovascular diseases, such as long QT syndrome, short QT syndrome, Wolff-Parkinson-White syndrome, anomalous coronary arteries, and hypertrophic cardiomyopathy. The prevalence of these conditions ranges from 1 in 2,000 to 1 in 1 million. Due to the limited amount of data, automated diagnosis often cannot determine the cause from the ECG alone, so advanced cardiac imaging, electrophysiological studies, genetic testing, or biopsies are usually required, making the diagnostic process very complex.
[0003] Currently, most rare heart-related conditions are either overlooked or under-studied by computer scientists. Several techniques commonly used in research on rare conditions include:
[0004] Resampling: For example, the Synthetic Minority Oversampling Technique (SMOTE) is a popular synthetic oversampling method that aims to generate synthetic samples based on randomly selected K nearest neighbors, but the created synthetic instances may not be true representations of the training set.
[0005] The Adaptive Synthetic Sampling (ADASYN) method uses a weighted distribution based on the learning difficulty of different minority classes to adaptively generate synthetic data samples. However, synthetic data generation is achieved through duplication or linear interpolation, which cannot generate new atypical examples. This can confuse the decision boundary of the classifier and thus fail to improve overall performance.
[0006] Enhanced resampling: Enhancement techniques such as translation, cropping, filling, rotation, and horizontal flipping introduce minor modifications, but in medical data, enhancement techniques are limited to making slight modifications to images because they adhere to strict standards.
[0007] Compared to all the traditional methods mentioned above, Generative Adversarial Neural Networks (GANs) aim to learn the underlying real data distribution from limited available data (minority and majority classes) and then use the learned distribution to generate synthetic data. GANs leverage neural networks to learn a function that approximates the real distribution as closely as possible. Some researchers use generative models such as GANs or VAEs to synthesize rare ECG examples, or employ semi-supervised learning: leveraging the abundant unlabeled ECG data in generative models to improve the detection of rare arrhythmias.
[0008] However, GAN networks require paired training data, but in real-world ECG data, we only have data on rare diseases and data on common diseases, and they often cannot be matched one-to-one. Summary of the Invention
[0009] To address the problems existing in the prior art, this invention provides a 12-lead electrocardiogram generation system for rare diseases, comprising:
[0010] The sample acquisition module is used to acquire several real general 12-lead electrocardiograms and several real rare disease 12-lead electrocardiograms as training samples.
[0011] The model building module is used to construct the DiscoGAN generative adversarial network. The DiscoGAN generative adversarial network includes a first generator, a second generator, a first discriminator, and a second discriminator. The input of the first discriminator includes the real rare disease 12-lead electrocardiogram and the rare disease 12-lead electrocardiogram generated by the first generator based on the real general 12-lead electrocardiogram. The input of the second discriminator includes the real general 12-lead electrocardiogram and the general 12-lead electrocardiogram generated by the second generator based on the generated rare disease 12-lead electrocardiogram.
[0012] The model training module is connected to the sample acquisition module and the model construction module respectively, and is used to iteratively train the DiscoGAN generative adversarial network based on the training samples and the constructed joint loss function until the joint loss function meets the preset conditions.
[0013] An electrocardiogram (ECG) generation module, connected to the model training module, is used to generate the required 12-lead ECG for rare diseases based on the first generator in the trained DiscoGAN generative adversarial network, in order to enhance the samples for rare disease identification.
[0014] Preferably, the joint loss function is the sum of the first loss function, the second loss function, the third loss function, and the fourth loss function;
[0015] Wherein, the first loss function is used to characterize the difference between the real general 12-lead ECG and the generated general 12-lead ECG, the second loss function is used to characterize the difference between the generated rare disease 12-lead ECG and the regenerated rare disease 12-lead ECG obtained by the first generator based on the generated general 12-lead ECG, the third loss function is the loss function of the first discriminator, and the fourth loss function is the loss function of the second discriminator.
[0016] Preferably, the first generator and the second generator employ a recurrent neural network, a convolutional neural network, a gated recurrent unit network, or a long short-term memory network.
[0017] Preferably, the network structures of the first discriminator and the second discriminator each include a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an activation function layer connected in sequence.
[0018] Preferably, in the training samples, the number of real general 12-lead electrocardiograms is greater than the number of real rare disease 12-lead electrocardiograms.
[0019] This invention also provides a method for generating a 12-lead electrocardiogram (ECG) for a rare disease, applied to the aforementioned 12-lead ECG generation system. The 12-lead ECG generation method includes:
[0020] Step S1: The 12-lead electrocardiogram generation system acquires several real general 12-lead electrocardiograms and several real rare disease 12-lead electrocardiograms as training samples.
[0021] Step S2: The 12-lead ECG generation system constructs a DiscoGAN generative adversarial network. The DiscoGAN generative adversarial network includes a first generator, a second generator, a first discriminator, and a second discriminator. The input to the first discriminator includes the real rare disease 12-lead ECG and the rare disease 12-lead ECG generated by the first generator based on the real general 12-lead ECG. The input to the second discriminator includes the real general 12-lead ECG and the general 12-lead ECG generated by the second generator based on the generated rare disease 12-lead ECG.
[0022] Step S3: The twelve-lead electrocardiogram generation system iteratively trains the DiscoGAN generative adversarial network based on the training samples and the constructed joint loss function until the joint loss function meets the preset conditions.
[0023] Step S4: The twelve-lead electrocardiogram generation system generates the required rare disease twelve-lead electrocardiograms based on the first generator in the trained DiscoGAN generative adversarial network, in order to enhance the samples for rare disease identification.
[0024] Preferably, the joint loss function is the sum of the first loss function, the second loss function, the third loss function, and the fourth loss function;
[0025] Wherein, the first loss function is used to characterize the difference between the real general 12-lead ECG and the generated general 12-lead ECG, the second loss function is used to characterize the difference between the generated rare disease 12-lead ECG and the regenerated rare disease 12-lead ECG obtained by the first generator based on the generated general 12-lead ECG, the third loss function is the loss function of the first discriminator, and the fourth loss function is the loss function of the second discriminator.
[0026] Preferably, the first generator and the second generator employ a recurrent neural network, a convolutional neural network, a gated recurrent unit network, or a long short-term memory network.
[0027] Preferably, the network structures of the first discriminator and the second discriminator each include a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an activation function layer connected in sequence.
[0028] Preferably, in the training samples, the number of real general 12-lead electrocardiograms is greater than the number of real rare disease 12-lead electrocardiograms.
[0029] The above technical solution has the following advantages or beneficial effects: using DiscoGAN generative adversarial network to generate 12-lead electrocardiograms of rare diseases, the corresponding training samples do not need to be one-to-one, which effectively solves the problem of difficulty in obtaining 12-lead electrocardiograms of rare diseases, and no target domain label needs to be annotated during training, which is suitable for unsupervised domain transformation. Attached Figure Description
[0030] Figure 1 A schematic diagram of the structure of a twelve-lead electrocardiogram generation system for a rare disease, as described in a preferred embodiment of the present invention;
[0031] Figure 2 A schematic diagram of the network structure of the DiscoGAN generative adversarial network is shown in a preferred embodiment of the present invention.
[0032] Figure 3 In a preferred embodiment of the present invention, the network structure block diagram of the first discriminator and the second discriminator is shown.
[0033] Figure 4 A schematic diagram of the network structure of the first discriminator and the second discriminator in a preferred embodiment of the present invention;
[0034] Figure 5 This is a flowchart illustrating a method for generating a 12-lead electrocardiogram for a rare disease, as described in a preferred embodiment of the present invention. Detailed Implementation
[0035] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment; other embodiments that conform to the spirit of the present invention may also fall within the scope of the present invention.
[0036] In a preferred embodiment of the present invention, based on the aforementioned problems existing in the prior art, a twelve-lead electrocardiogram generation system for rare diseases is provided, such as... Figure 1 and Figure 2 As shown, it includes:
[0037] Sample acquisition module 1 is used to acquire several real general 12-lead electrocardiograms and several real rare disease 12-lead electrocardiograms as training samples.
[0038] Model building module 2 is used to construct the DiscoGAN generative adversarial network. The DiscoGAN generative adversarial network includes a first generator G(X->Y), a second generator G(Y->X), a first discriminator D(Y), and a second discriminator D(X). The input of the first discriminator D(Y) includes a real rare disease 12-lead electrocardiogram and a rare disease 12-lead electrocardiogram generated by the first generator G(X->Y) based on the real general 12-lead electrocardiogram. The input of the second discriminator D(X) includes a real general 12-lead electrocardiogram and a general 12-lead electrocardiogram generated by the second generator G(Y->X) based on the generated rare disease 12-lead electrocardiogram.
[0039] Model training module 3 is connected to sample acquisition module 1 and model building module 2 respectively. It is used to iteratively train the DiscoGAN generative adversarial network based on training samples and the constructed joint loss function until the joint loss function meets the preset conditions.
[0040] The ECG generation module 4 is connected to the model training module 3. It is used to generate the required 12-lead ECG for rare diseases based on the first generator G(X->Y) in the trained DiscoGAN generative adversarial network, so as to enhance the samples for rare disease identification.
[0041] Specifically, existing GAN networks typically include a generator and a discriminator. Noise signals are input into the generator, and the synthesized ECG signal is then compared to a real ECG signal in the discriminator. If the signal is valid or resembles a real signal, it is marked as true (1); otherwise, it is marked as false (0). By training both the generator and discriminator simultaneously, the generator can produce more realistic ECGs, and the discriminator can more accurately determine whether an ECG is realistic, resulting in a realistic ECG generator. However, in 12-lead ECGs of rare diseases, the ECG itself is not significantly different from 12-lead ECGs of other diseases. If only noise signals are used as input to the generator in a GAN network, it is often impossible to generate ECGs with rare disease characteristics. Furthermore, GAN network training requires paired training data, and currently, obtaining ECGs for rare diseases is difficult, and the amount of data is insufficient to meet the training requirements.
[0042] To address the aforementioned technical issues, this embodiment employs the DiscoGAN generative adversarial network, which converges faster and is more stable than traditional GAN networks. Its specific network structure is as follows: Figure 2 As shown, it can be seen that it contains two loops. For the sake of simplicity, let's assume that the domain where the general 12-lead ECG is located is the X domain, and the domain where the rare disease 12-lead ECG is located is the Y domain. Here, the general 12-lead ECG is the 12-lead ECG collected from patients with common diseases. Common diseases are defined in relation to rare diseases.
[0043] Specifically, in the first loop, a real 12-lead electrocardiogram is first input into the first generator G(X->Y) to generate a rare disease 12-lead electrocardiogram. Then, the generated rare disease 12-lead electrocardiogram and the real rare disease 12-lead electrocardiogram in the training sample are simultaneously input into the first discriminator D(Y) to determine whether the generated rare disease 12-lead electrocardiogram really belongs to a rare disease.
[0044] Furthermore, since the real general 12-lead ECG and the real rare disease 12-lead ECG are not a one-to-one match, in this loop we also need to synthesize the generated rare disease 12-lead ECG into a generated general 12-lead ECG through the second generator G(Y->X), and at the same time compare the real general 12-lead ECG with the generated general 12-lead ECG to make them as similar as possible.
[0045] To ensure that the first generator G(X->Y) and the second generator G(Y->X) work more effectively and to establish the correlation between them, a second loop is set up. In this loop, a rare disease 12-lead electrocardiogram generated by the first generator G(X->Y) in the first loop is first input into the second generator G(Y->X) in the second loop to generate a general 12-lead electrocardiogram. Then, the generated general 12-lead electrocardiogram and the real general 12-lead electrocardiogram can be simultaneously input into the second discriminator D(X) to determine whether the generated general 12-lead electrocardiogram really belongs to a common disease.
[0046] Similarly, in this second loop, the generated general 12-lead ECG needs to be synthesized again by the first generator G(X->Y) to create a regenerated rare disease 12-lead ECG. At the same time, the generated rare disease 12-lead ECG is compared with the regenerated rare disease 12-lead ECG to make them as similar as possible.
[0047] It can be seen that the first discriminator D(Y) ensures that the rare disease 12-lead ECG generated by the first generator G(X->Y) is indeed similar to the target rare disease 12-lead ECG, while the second discriminator D(X) ensures that the 12-lead ECG generated by the second generator G(Y->X) is not the rare disease 12-lead ECG.
[0048] By constructing a joint function to simultaneously train the first generator G(X->Y), the second generator G(Y->X), the first discriminator D(Y), and the second discriminator D(X), the final first generator G(X->Y) can be used to generate more realistic 12-lead electrocardiograms for rare diseases, thereby enhancing the samples for rare disease identification, effectively solving the technical problem of the difficulty in obtaining 12-lead electrocardiograms for rare diseases, and providing strong data support for the automatic diagnosis of rare diseases.
[0049] In a preferred embodiment of the present invention, the joint loss function is the sum of the first loss function, the second loss function, the third loss function, and the fourth loss function;
[0050] The first loss function is used to characterize the difference between the real general 12-lead ECG and the generated general 12-lead ECG. The second loss function is used to characterize the difference between the generated rare disease 12-lead ECG and the regenerated rare disease 12-lead ECG obtained by the first generator based on the generated general 12-lead ECG. The third loss function is the loss function of the first discriminator D(Y), and the fourth loss function is the loss function of the second discriminator D(X).
[0051] Specifically, in this embodiment, the above first loss function and the second loss function are cycle consistency loss functions. Based on the cycle consistency loss function, the mapping between the distribution of real and generated 12-lead electrocardiograms can be forced to be one-to-one, preventing mode collapse during training, and at the same time helping to stabilize the training of the DiscoGAN generative adversarial network, making it less susceptible to problems such as gradient vanishing, and also helping to retain important morphological and rhythm attributes of 12-lead electrocardiograms during cross-domain conversion. Meanwhile, the bidirectional mapping allows style transfer between normal sinus rhythm and arrhythmia 12-lead electrocardiograms.
[0052] In a preferred embodiment of the present invention, the first generator G(X->Y) and the second generator G(Y->X) adopt a recurrent neural network, a convolutional neural network, a gated recurrent unit network, or a long short-term memory network.
[0053] In a preferred embodiment of the present invention, as Figure 3 shown, the network structures of the first discriminator D(Y) and the second discriminator D(X) each comprise a first convolutional layer C1, a first pooling layer P1, a second convolutional layer C2, a second pooling layer P2, a fully connected layer FC and an activation function layer softmax that are connected in sequence.
[0054] Specifically, in this embodiment, as Figure 4 shown, the small dashed boxes in the input, the first convolutional layer C1 and the second convolutional layer C2 in the figure are used to represent a moving window. Preferably, the 12-lead electrocardiograms input to the first discriminator D(Y) and the second discriminator D(X) are not input in the form of images, but in the form of time-series electrocardiogram data points, therefore, only one-dimensional convolution is involved, which simplifies the network structure of the first discriminator D(Y) and the second discriminator D(X).
[0055] More specifically, the 12-lead electrocardiogram can be firstly layered into a plurality of segments to form an input. Assuming that the input time series comprises T electrocardiogram data points, which are x1, x2, …, xT respectively, wherein each electrocardiogram data point is represented by a d-dimensional vector. Taking d=1 as an example, setting the filter size of the corresponding convolutional layer to h*1, setting the stride to k*1 (k<h), and setting the number of filters to M, then the output size from the first convolutional layer C1 is M*[(T-h) / k+1]*1.
[0056] The moving window is:
[0057]
[0058] Wherein, the symbol represents superimposing a plurality of vectors together, and the values of l and r are determined by the following formula:
[0059]
[0060] in,
[0061] 1≤k*i+1≤T-h+1; h≤k*i-k+h≤T, (i∈[1,(Th) / k+1])
[0062] The returned convolutional sequence c = [c1, c2, ..., ci, ...] of each convolutional layer ci can be represented as: ci = f(w*xl:r + b)
[0063] in, is the shared weight matrix, and f represents the nonlinear activation function.
[0064] The window size of the first pooling layer P1 and the second pooling layer P2 is a*1, and the stride is b*1. For the returned pooling result sequence p = [p1, p2, ..., pj...], the output of each pooling layer pj is: pj = max(cbj+1-b, cbj+2-b, ..., cbj+ab).
[0065] After performing a pairwise operation on convolution and pooling, a fully connected (FC) layer is added, which connects to the softmax activation function layer. The output of this softmax layer is a heat vector, where the two elements represent the probabilities of the input being true or false. The expression for the softmax activation function layer is as follows:
[0066]
[0067] Preferably, the filter size of the first convolutional layer C1 is 120*1, the number of filters is 10, and the stride size is 5*1. The output size of the first convolutional layer C1 is calculated as follows:
[0068]
[0069] Where (W,H) represents the input size (1*320*1), F and S represent the filter size and stride, respectively, and P is the zero padding amount, which is set to 0. Then the output size of the first convolutional layer C1 is 10*601*1.
[0070] The size of each window in the first pooling layer P1 is 46*1, and the size of the step size is 3*1. The output size of the first pooling layer P1 is calculated using the following formula:
[0071]
[0072] Where (W, H) represents the input size (10*601*1), and F and S represent the size and stride of each window, respectively, the output size of the first pooling layer P1 is 10*186*1. The calculation principle of the parameters of the second convolutional layer C2 and the second pooling layer P2 is the same as that of the first convolutional layer C1 and the first pooling layer P1. It should be emphasized that the number of kernel filters in the second convolutional layer C2 is preferably 5. Using paired convolutional pooling operations, a fully connected layer with an output size of 5*10*1 and containing 25 neurons is finally obtained and connected to the second pooling layer P2. The last layer is a softmax output layer, which outputs the judgment result of the discriminator.
[0073] In a preferred embodiment of the present invention, the number of real general 12-lead electrocardiograms in the training samples is greater than the number of real rare disease 12-lead electrocardiograms.
[0074] This invention also provides a method for generating a 12-lead electrocardiogram (ECG) for rare diseases, applied to the aforementioned 12-lead ECG generation system, such as... Figure 5 As shown, the methods for generating a 12-lead electrocardiogram include:
[0075] Step S1: The 12-lead ECG generation system acquires several real general 12-lead ECGs and several real rare disease 12-lead ECGs as training samples.
[0076] Step S2: The 12-lead ECG generation system constructs a DiscoGAN generative adversarial network. The DiscoGAN generative adversarial network includes a first generator, a second generator, a first discriminator, and a second discriminator. The input to the first discriminator includes a real rare disease 12-lead ECG and a rare disease 12-lead ECG generated by the first generator based on the real general 12-lead ECG. The input to the second discriminator includes a real general 12-lead ECG and a general 12-lead ECG generated by the second generator based on the generated rare disease 12-lead ECG.
[0077] Step S3: The twelve-lead electrocardiogram generation system iteratively trains the DiscoGAN generative adversarial network based on the training samples and the constructed joint loss function until the joint loss function meets the preset conditions.
[0078] Step S4: The 12-lead ECG generation system generates the required rare disease 12-lead ECGs based on the first generator in the trained DiscoGAN generative adversarial network to enhance the samples for rare disease identification.
[0079] In a preferred embodiment of the present invention, the joint loss function is the sum of the first loss function, the second loss function, the third loss function, and the fourth loss function;
[0080] The first loss function is used to characterize the difference between the real general 12-lead ECG and the generated general 12-lead ECG. The second loss function is used to characterize the difference between the generated rare disease 12-lead ECG and the regenerated rare disease 12-lead ECG obtained by the first generator based on the generated general 12-lead ECG. The third loss function is the loss function of the first discriminator, and the fourth loss function is the loss function of the second discriminator.
[0081] In a preferred embodiment of the present invention, the first generator and the second generator employ a recurrent neural network, or a convolutional neural network, or a gated recurrent unit network, or a long short-term memory network.
[0082] In a preferred embodiment of the present invention, the network structures of the first discriminator and the second discriminator both include a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an activation function layer connected in sequence.
[0083] In a preferred embodiment of the present invention, the number of real general 12-lead electrocardiograms in the training samples is greater than the number of real rare disease 12-lead electrocardiograms.
[0084] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made using the content of this specification and illustrations should be included within the protection scope of the present invention.
Claims
1. A 12-lead electrocardiogram generation system for a rare disease, characterized in that, include: The sample acquisition module is used to acquire several real general 12-lead electrocardiograms and several real rare disease 12-lead electrocardiograms as training samples. The model building module is used to construct the DiscoGAN generative adversarial network. The DiscoGAN generative adversarial network includes a first generator, a second generator, a first discriminator, and a second discriminator. The input of the first discriminator includes the real rare disease 12-lead electrocardiogram and the rare disease 12-lead electrocardiogram generated by the first generator based on the real general 12-lead electrocardiogram. The input of the second discriminator includes the real general 12-lead electrocardiogram and the general 12-lead electrocardiogram generated by the second generator based on the generated rare disease 12-lead electrocardiogram. The model training module is connected to the sample acquisition module and the model construction module respectively, and is used to iteratively train the DiscoGAN generative adversarial network based on the training samples and the constructed joint loss function until the joint loss function meets the preset conditions. An electrocardiogram (ECG) generation module, connected to the model training module, is used to generate the required 12-lead ECG for rare diseases based on the first generator in the trained DiscoGAN generative adversarial network, in order to enhance the samples for rare disease identification.
2. The twelve-lead electrocardiogram generation system according to claim 1, characterized in that, The joint loss function is the sum of the first loss function, the second loss function, the third loss function, and the fourth loss function; Wherein, the first loss function is used to characterize the difference between the real general 12-lead ECG and the generated general 12-lead ECG, the second loss function is used to characterize the difference between the generated rare disease 12-lead ECG and the regenerated rare disease 12-lead ECG obtained by the first generator based on the generated general 12-lead ECG, the third loss function is the loss function of the first discriminator, and the fourth loss function is the loss function of the second discriminator.
3. The twelve-lead electrocardiogram generation system according to claim 1, characterized in that, The first generator and the second generator employ recurrent neural networks or convolutional neural networks.
4. The twelve-lead electrocardiogram generation system according to claim 1, characterized in that, The first generator and the second generator employ gated recurrent unit networks or long short-term memory networks.
5. The twelve-lead electrocardiogram generation system according to claim 1, characterized in that, The network structures of both the first discriminator and the second discriminator include a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an activation function layer connected in sequence.
6. The twelve-lead electrocardiogram generation system according to claim 1, characterized in that, In the training samples, the number of real general 12-lead electrocardiograms is greater than the number of real rare disease 12-lead electrocardiograms.
7. A method for generating a 12-lead electrocardiogram for a rare disease, characterized in that, The twelve-lead electrocardiogram (ECG) generation system as described in any one of claims 1-6, wherein the twelve-lead ECG generation method comprises: Step S1: The 12-lead electrocardiogram generation system acquires several real general 12-lead electrocardiograms and several real rare disease 12-lead electrocardiograms as training samples. Step S2: The 12-lead ECG generation system constructs a DiscoGAN generative adversarial network. The DiscoGAN generative adversarial network includes a first generator, a second generator, a first discriminator, and a second discriminator. The input to the first discriminator includes the real rare disease 12-lead ECG and the rare disease 12-lead ECG generated by the first generator based on the real general 12-lead ECG. The input to the second discriminator includes the real general 12-lead ECG and the general 12-lead ECG generated by the second generator based on the generated rare disease 12-lead ECG. Step S3: The twelve-lead electrocardiogram generation system iteratively trains the DiscoGAN generative adversarial network based on the training samples and the constructed joint loss function until the joint loss function meets the preset conditions. Step S4: The twelve-lead electrocardiogram generation system generates the required rare disease twelve-lead electrocardiograms based on the first generator in the trained DiscoGAN generative adversarial network, in order to enhance the samples for rare disease identification.
8. The method for generating a twelve-lead electrocardiogram according to claim 7, characterized in that, The joint loss function is the sum of the first loss function, the second loss function, the third loss function, and the fourth loss function; Wherein, the first loss function is used to characterize the difference between the real general 12-lead ECG and the generated general 12-lead ECG, the second loss function is used to characterize the difference between the generated rare disease 12-lead ECG and the regenerated rare disease 12-lead ECG obtained by the first generator based on the generated general 12-lead ECG, the third loss function is the loss function of the first discriminator, and the fourth loss function is the loss function of the second discriminator.
9. The method for generating a twelve-lead electrocardiogram according to claim 7, characterized in that, The first generator and the second generator employ recurrent neural networks or convolutional neural networks.
10. The method for generating a twelve-lead electrocardiogram according to claim 7, characterized in that, The first generator and the second generator employ gated recurrent unit networks or long short-term memory networks.
11. The method for generating a twelve-lead electrocardiogram according to claim 7, characterized in that, The network structures of both the first discriminator and the second discriminator include a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an activation function layer connected in sequence.
12. The method for generating a twelve-lead electrocardiogram according to claim 7, characterized in that, In the training samples, the number of real general 12-lead electrocardiograms is greater than the number of real rare disease 12-lead electrocardiograms.
Citation Information
Patent Citations
A picture synthesis method based on a generative adversarial network
CN109447906A
Retina image generation system and method based on generative adversarial network
CN113850804A