Ventricular premature beat recognition method based on improved ShuffleNetV2

Through the improved ShuffleNetV2 model, the problem of difficulty in deploying deep learning models on mobile platforms is solved, and high-precision and high-speed ventricular premature beat recognition on wearable devices is realized. By introducing ECA attention mechanism and depth separation in the model Convolutional layer and other technologies have improved the performance of the model.

CN114886437BInactive Publication Date: 2024-11-22GUANGXI NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210508517.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing deep learning models have deep layers and complex networks, which affect their deployment to wearable devices such as watches and bracelets, resulting in slow operation.

Method used

Using the improved ShuffleNetV2 model, the ventricular premature beat recognition model consisting of 2 convolutional layers, 1 maximum pooling layer, 3 basic units and 1 global average pooling layer is introduced, and a channel disassembly is introduced into the unit block. The convolution layer and ECA attention mechanism layer can be separated by layering and depth, adjust the movement step length of the convolution kernel, and reduce the calculation complexity.

Benefits of technology

It realizes high accuracy and high speed on the mobile terminal, is easy to deploy on wearable devices, and improves the performance indicators of the model through the ECA attention mechanism module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114886437B_ABST
    Figure CN114886437B_ABST
Patent Text Reader

Abstract

The present invention discloses a ventricular premature beat recognition method based on an improved ShuffleNetV2, and proposes a ventricular premature beat recognition model based on the improved ShuffleNetV2 model. The constructed ventricular premature beat recognition model is first trained using training samples, and then the predicted samples are sent to the trained ventricular premature beat recognition model to achieve the classification of the electrocardiogram to be classified. The ECA attention mechanism module learns effective channel attention by avoiding reducing the channel dimension, and captures the interaction information between different channels in an extremely lightweight manner. Through experimental comparison, it is found that the various indicators obtained by the ShuffleNetV2 model with the ECA attention mechanism module are higher than those of the ShuffleNetV2 model without the attention mechanism. The improved ShuffleNetV2 has the advantages of high precision and high speed, and is easy to be deployed in wearable devices such as watches and bracelets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of premature ventricular contraction recognition, and in particular to a premature ventricular contraction (PVC) recognition method based on improved ShuffleNetV2. Background Art

[0002] Arrhythmia is a common cardiovascular disease in clinic, and premature beats are the most common arrhythmia. By introducing computer-assisted premature beat analysis technology, doctors can carry out effective medical intervention as early as possible, which plays a very important role in the prevention and treatment of diseases. It can also solve the problem of scarce medical resources in remote mountainous areas and the inability to enjoy basic medical services to a certain extent.

[0003] For deep learning models, in addition to accuracy, computational complexity is also an important indicator that needs to be considered. If the model is too complex, its running speed may be very slow and difficult to deploy on mobile devices such as watches and bracelets. Summary of the invention

[0004] The present invention aims to solve the problem that the existing deep learning model has deep layers and complex networks, which affects the deployment of the model to a mobile platform, and provides a ventricular premature beat recognition method based on an improved ShuffleNetV2.

[0005] To solve the above problems, the present invention is achieved through the following technical solutions:

[0006] The ventricular premature beat recognition method based on the improved ShuffleNetV2 includes the following steps:

[0007] Step 1, construct a ventricular premature beat recognition model; the ventricular premature beat recognition model consists of 2 convolutional layers, 1 maximum pooling layer, 3 basic units, 1 global average pooling layer and an output layer; wherein the first basic unit consists of 1 No. 1 unit block and 1 No. 2 unit block; the second basic unit consists of 1 No. 1 unit block and 3 No. 2 unit blocks; the third basic unit consists of 1 No. 1 unit block and 1 No. 2 unit block;

[0008] The input of the first convolutional layer is used as the input of the ventricular premature beat recognition model; the output of the first convolutional layer is connected to the input of the maximum pooling layer, the output of the maximum pooling layer is connected to the input of the first No. 1 unit block, the output of the first No. 1 unit block is connected to the input of the first No. 2 unit block, the output of the first No. 2 unit block is connected to the input of the second No. 1 unit block, the output of the second No. 1 unit block is connected to the input of the second No. 2 unit block, the output of the second No. 2 unit block is connected to the input of the third No. 2 unit block, the output of the third No. 2 unit block is connected to the input of the fourth No. 2 unit block, the output of the fourth No. 2 unit block is connected to the input of the third No. 1 unit block, the input of the third No. 1 unit block is connected to the input of the fifth No. 2 unit block, the output of the fifth No. 2 unit block is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the global average pooling layer, and the output of the global average pooling layer is connected to the input of the output layer; the output of the output layer is used as the output of the ventricular premature beat recognition model;

[0009] Step 2: pre-process the labeled and classified electrocardiograms as training samples, and use the training samples to train the ventricular premature beat recognition model constructed in step 1 to obtain a trained ventricular premature beat recognition model;

[0010] Step 3: Preprocess the electrocardiogram to be classified as a prediction sample, and send the prediction sample to the ventricular premature beat recognition model trained in step 2 to classify the electrocardiogram to be classified.

[0011] In the above scheme, unit block No. 1 consists of a channel splitting layer, 2 convolutional layers, 1 depthwise separable convolutional layer, 1 ECA attention mechanism layer, 1 splicing layer and 1 channel shuffle layer; the input of the channel splitting layer is used as the input of unit block No. 1; the output of the channel splitting layer is divided into two paths: one path is directly connected to an input of the first splicing layer; the other path is connected to the input of the third convolutional layer, the output of the third convolutional layer is connected to the input of the first depthwise separable convolutional layer after batch normalization BN and Relu activation function, the output of the first depthwise separable convolutional layer is connected to the input of the first ECA attention mechanism layer after batch normalization BN, the output of the first ECA attention mechanism layer is connected to the input of the fourth convolutional layer, the output of the fourth convolutional layer is connected to another input of the first splicing layer after batch normalization BN and Relu activation function; the output of the first splicing layer is connected to the input of the first channel shuffle layer, and the output of the first channel shuffle layer is used as the output of unit block No. 1.

[0012] In the above scheme, the second unit block consists of 3 convolutional layers, 2 depth-wise separable convolutional layers, 2 ECA attention mechanism layers, 1 splicing layer and 1 channel shuffle layer; the inputs of the second depth-wise separable convolutional layer and the sixth convolutional layer are jointly used as the input of the second unit block; the output of the second depth-wise separable convolutional layer is connected to the input of the second ECA attention mechanism layer after batch normalization BN, the output of the second ECA attention mechanism layer is connected to the input of the fifth convolutional layer, and the output of the fifth convolutional layer is connected to one input of the second splicing layer after batch normalization BN and Relu activation function; the output of the sixth convolutional layer is connected to the input of the third depth-wise separable convolutional layer after batch normalization BN and Relu activation function, the output of the third depth-wise separable convolutional layer is connected to the third ECA attention mechanism layer after batch normalization BN, the output of the third ECA attention mechanism layer is connected to the input of the seventh convolutional layer, and the output of the seventh convolutional layer is connected to another input of the second splicing layer after batch normalization BN and Relu activation function; the output of the second splicing layer is connected to the input of the second channel shuffle layer, and the output of the second channel shuffle layer is used as the output of the second unit block.

[0013] In the above scheme, the moving step size of the convolution kernel of the depthwise separable convolution layer is 1.

[0014] Compared with the prior art, the present invention has the following characteristics:

[0015] 1. The improved ShuffleNetV2 has the advantages of high accuracy and high speed, and is easy to deploy in wearable devices such as watches and bracelets.

[0016] 2. The ECA attention mechanism module learns effective channel attention by avoiding reducing the channel dimension, and captures the interactive information between different channels in an extremely lightweight way. Through experimental comparison, it is found that the various indicators obtained by the ShuffleNetV2 model with the ECA attention mechanism module are higher than those of the ShuffleNetV2 model without the attention mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a structural diagram of the ventricular premature beat recognition model based on the improved ShuffleNetV2.

[0018] Figure 2 for Figure 1 Schematic diagram of the structure of Block1.

[0019] Figure 3 for Figure 1 Schematic diagram of the structure of Block2.

[0020] Figure 4 for Figure 2 Schematic diagram of the structure of the ECA attention mechanism layer. DETAILED DESCRIPTION

[0021] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific examples.

[0022] A ventricular premature beat recognition method based on improved ShuffleNetV2 includes the following steps:

[0023] Step 1: Construct a ventricular premature beat recognition model.

[0024] Considering that mobile devices usually require a small model that is both accurate and fast, the present invention conducts relevant research on the lightweight network model ShuffleNetV2, and improves ShuffleNetV2 based on the characteristics of ventricular premature beat recognition, and proposes a ventricular premature beat recognition model, such as Figure 1 As shown in the figure, it consists of 2 convolutional layers (Conv), 1 maximum pooling layer (MaxPool), 3 basic units (Stage), 1 global average pooling layer and output layer. Each basic unit consists of a unit block No. 1 (Block1) and a unit block No. 2 (Block2). The first basic unit consists of 1 unit block No. 1 and 1 unit block No. 2; the second basic unit consists of 1 unit block No. 1 and 3 unit blocks No. 2; the third basic unit consists of 1 unit block No. 1 and 1 unit block No. 2. The input of the first convolutional layer is used as the input of the ventricular premature beat recognition model. The output of the first convolutional layer is connected to the input of the maximum pooling layer, the output of the maximum pooling layer is connected to the input of the first No. 1 unit block, the output of the first No. 1 unit block is connected to the input of the first No. 2 unit block, the output of the first No. 2 unit block is connected to the input of the second No. 1 unit block, the output of the second No. 1 unit block is connected to the input of the second No. 2 unit block, the output of the second No. 2 unit block is connected to the input of the third No. 2 unit block, the output of the third No. 2 unit block is connected to the input of the fourth No. 2 unit block, the output of the fourth No. 2 unit block is connected to the input of the third No. 1 unit block, the input of the third No. 1 unit block is connected to the input of the fifth No. 2 unit block, the output of the fifth No. 2 unit block is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the global average pooling layer, and the output of the global average pooling layer is connected to the input of the output layer. The output of the output layer is used as the output of the ventricular premature beat recognition model.

[0025] See also Figure 2, the first unit block consists of a channel split layer (Channel Split), two convolutional layers (Conv), a depthwise separable convolutional layer (DWConv), an ECA attention mechanism layer, a concatenation layer (Concat) and a channel shuffle layer (channel shuffle). The input of the channel split layer is used as the input of the first unit block. The output of the channel split layer is divided into two paths: one is directly connected to one input of the first concatenation layer; the other is connected to the input of the third convolution layer. The output of the third convolution layer is connected to the input of the first depthwise separable convolution layer after batch normalization BN and Relu activation function. The output of the first depthwise separable convolution layer is connected to the input of the first ECA attention mechanism layer after batch normalization BN. The output of the first ECA attention mechanism layer is connected to the input of the fourth convolution layer. The output of the fourth convolution layer is connected to another input of the first concatenation layer after batch normalization BN and Relu activation function. The output of the first concatenation layer is connected to the input of the first channel shuffle layer, and the output of the first channel shuffle layer is used as the output of the first unit block.

[0026] See also Figure 3 , two The unit block No. 2 consists of 3 convolutional layers (Conv), 2 depthwise separable convolutional layers (DWConv), 2 ECA attention mechanism layers, 1 concatenation layer (Concat) and 1 channel shuffle layer (channel shuffle). The inputs of the second depthwise separable convolutional layer and the sixth convolutional layer are used as the input of the second unit block. The output of the second depthwise separable convolutional layer is connected to the input of the second ECA attention mechanism layer after batch normalization BN, the output of the second ECA attention mechanism layer is connected to the input of the fifth convolutional layer, and the output of the fifth convolutional layer is connected to one input of the second concatenation layer after batch normalization BN and Relu activation function. The output of the sixth convolutional layer is connected to the input of the third depthwise separable convolutional layer after batch normalization BN and Relu activation function, the output of the third depthwise separable convolutional layer is connected to the third ECA attention mechanism layer after batch normalization BN, the output of the third ECA attention mechanism layer is connected to the input of the seventh convolutional layer, and the output of the seventh convolutional layer is connected to another input of the second concatenation layer after batch normalization BN and Relu activation function. The output of the second concatenation layer is connected to the input of the second channel shuffle layer, and the output of the second channel shuffle layer is used as the output of the second unit block.

[0027] In unit block No. 1 and unit block No. 2, all convolutional layers are 1*1 convolutional layers, and all depth-wise separable convolutional layers are 1*3 depth-wise separable convolutional layers. In the original ShuffleNetV2 model, the depth-wise separable convolutional layers (DWConv) of unit block No. 1 and unit block No. 2 were downsampled, that is, the moving step length of the convolution kernel, Stride = 2. In the present invention, since DWConv requires that the horizontal and vertical moving steps of the convolution kernel are equal, that is, Stride_x is equal to strid_y, and the height of the one-dimensional signal data of the ECG number is 1; therefore, for the ventricular premature beat recognition model of the present invention, we change the moving step length Stride of the convolution kernel of unit block No. 1 and unit block No. 2 to 1, and at the same time, the 1*1 convolutional layers of unit block No. 1 and unit block No. 2 need to pass through BN and Relu, and the 1*3 depth-wise separable convolutional layers only need to pass through BN. The purpose of the channel shuffle operation is to ensure that the information of the two branches interacts. The ECA attention mechanism layer is as follows Figure 4 As shown in the figure, the input vector x of the ECA attention mechanism layer is passed through the ECA attention mechanism to obtain the weight value G of each neuron in the output input vector x, and then use the weight value e t Multiplying it with the input vector x gives the output y of the ECA attention mechanism layer.

[0028] Step 2: Preprocess the labeled and classified electrocardiograms as training samples, and use the training samples to train the ventricular premature beat recognition model constructed in step 1 to obtain a trained ventricular premature beat recognition model.

[0029] The preprocessing process of ECG mainly uses filters to remove noise such as baseline drift and power frequency interference in ECG. The classification marked in the electrocardiogram is premature beat or non-premature beat.

[0030] Step 3: Preprocess the electrocardiogram to be classified as a prediction sample, and send the prediction sample to the ventricular premature beat recognition model trained in step 2 to classify the electrocardiogram to be classified.

[0031] The preprocessing method for the ECG to be classified is the same as the preprocessing method for the ECG with the labeled classification. The output of the prediction sample after the model is the premature beat or non-premature beat class record.

[0032] The performance of the present invention is described below through a specific example:

[0033] The parameters of each layer of the ventricular premature beat recognition model of this embodiment are shown in Table 1. In Table 1, KSize represents the convolution kernel size of the convolution layer (Conv1, Conv5) and the pooling kernel size of the maximum pooling layer (MaxPool), and Stride is the moving step of the convolution kernel or the pooling kernel. Each Stage is composed of Block1 and Block2. The specific number of Blocks corresponds to the Repeat column, that is, Stage2 first passes through 1 Block1, and then passes through 1 Block2; Stage3 first passes through 1 Block1, and then passes through 3 Block2s; Stage4 first passes through 1 Block1, and then passes through 1 Block2. Output channels represents the number of output feature maps of each convolution layer or the number of output feature maps used by each Stage is Output channels / 2.

[0034] Table 1 ShuffleNetV2 model in PVC identification

[0035]

[0036] The Chinese Cardiovascular Disease Database (CCDD) was used as the basis, and the ECG records in the database were first denoised by a 0.5-40 Hz bandpass filter.

[0037] Since the premature beat classification of the present invention is a binary classification problem (premature beat or non-premature beat class), sensitivity (Se), specificity (Sp), and accuracy (Acc) can be used to measure the quality of the classification effect. The confusion matrix of the binary classification is shown in Table 1 below:

[0038] Table 1 Confusion matrix

[0039]

[0040] The definitions of each indicator are as follows:

[0041] Sensitivity (Se):

[0042] Se=TP / (TP+FN)

[0043] Specificity (Sp):

[0044] Sp=TN / (TN+FP)

[0045] Accuracy (Acc):

[0046] Acc=(TP+TN) / (TP+TN+FP+FN)

[0047] 35840 preprocessed ECG records were used as training samples, of which 3112 were premature ventricular contractions (PVCs); 141046 records (including 2148 PVC records) were used as test samples. After the improved ShuffleNetV2 model was trained using the training samples, the results obtained by the model on the 141046 test samples are shown in Table 1 below.

[0048] Table 1 PVC recognition results based on the improved ShuffleNetV2 model

[0049]

[0050] Among them, NPVC represents non-ventricular premature beat record, PVC represents ventricular premature beat record, Se represents sensitivity, Sp represents specificity, and Acc represents accuracy.

[0051] As can be seen from Table 1, the sensitivity, specificity and accuracy obtained by the improved ShuffleNetV2 model classification all reached more than 90%.

[0052] It should be noted that although the embodiments of the present invention described above are illustrative, they are not intended to limit the present invention, and therefore the present invention is not limited to the above specific embodiments. Without departing from the principles of the present invention, any other embodiments obtained by those skilled in the art under the guidance of the present invention are deemed to be within the protection of the present invention.

Claims

1. The ventricular premature beat recognition method based on the improved ShuffleNetV2 is characterized by: The steps include: Step 1, construct a ventricular premature beat recognition model; the ventricular premature beat recognition model consists of 2 convolutional layers, 1 maximum pooling layer, 3 basic units, 1 global average pooling layer and an output layer; wherein the first basic unit consists of 1 No. 1 unit block and 1 No. 2 unit block; the second basic unit consists of 1 No. 1 unit block and 3 No. 2 unit blocks; the third basic unit consists of 1 No. 1 unit block and 1 No. 2 unit block; Unit block number one consists of a channel splitting layer, two convolutional layers, one depthwise separable convolutional layer, one ECA attention mechanism layer, one splicing layer and one channel shuffle layer; the input of the channel splitting layer is used as the input of unit block number one; the output of the channel splitting layer is divided into two paths: one path is directly connected to an input of the first splicing layer; the other path is connected to the input of the third convolutional layer, the output of the third convolutional layer is connected to the input of the first depthwise separable convolutional layer after batch normalization BN and Relu activation function, the output of the first depthwise separable convolutional layer is connected to the input of the first ECA attention mechanism layer after batch normalization BN, the output of the first ECA attention mechanism layer is connected to the input of the fourth convolutional layer, the output of the fourth convolutional layer is connected to another input of the first splicing layer after batch normalization BN and Relu activation function; the output of the first splicing layer is connected to the input of the first channel shuffle layer, and the output of the first channel shuffle layer is used as the output of unit block number one; The second unit block consists of 3 convolutional layers, 2 depth-wise separable convolutional layers, 2 ECA attention mechanism layers, 1 concatenation layer and 1 channel shuffle layer; the inputs of the second depth-wise separable convolutional layer and the sixth convolutional layer are used as the inputs of the second unit block; The output of the second depth-separable convolutional layer is connected to the input of the second ECA attention mechanism layer after batch normalization BN, and the output of the second ECA attention mechanism layer is connected to the input of the fifth convolutional layer. The output of the fifth convolutional layer is connected to one input of the second splicing layer after batch normalization BN and Relu activation function; the output of the sixth convolutional layer is connected to the input of the third depth-separable convolutional layer after batch normalization BN and Relu activation function, the output of the third depth-separable convolutional layer is connected to the third ECA attention mechanism layer after batch normalization BN, the output of the third ECA attention mechanism layer is connected to the input of the seventh convolutional layer, and the output of the seventh convolutional layer is connected to another input of the second splicing layer after batch normalization BN and Relu activation function; The output of the second concatenation layer is connected to the input of the second channel shuffle layer, and the output of the second channel shuffle layer is used as the output of the second unit block; The input of the first convolutional layer is used as the input of the ventricular premature beat recognition model; the output of the first convolutional layer is connected to the input of the maximum pooling layer, the output of the maximum pooling layer is connected to the input of the first No. 1 unit block, the output of the first No. 1 unit block is connected to the input of the first No. 2 unit block, the output of the first No. 2 unit block is connected to the input of the second No. 1 unit block, the output of the second No. 1 unit block is connected to the input of the second No. 2 unit block, the output of the second No. 2 unit block is connected to the input of the third No. 2 unit block, the output of the third No. 2 unit block is connected to the input of the fourth No. 2 unit block, the output of the fourth No. 2 unit block is connected to the input of the third No. 1 unit block, the input of the third No. 1 unit block is connected to the input of the fifth No. 2 unit block, the output of the fifth No. 2 unit block is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the global average pooling layer, and the output of the global average pooling layer is connected to the input of the output layer; the output of the output layer is used as the output of the ventricular premature beat recognition model; Step 2: pre-process the labeled and classified electrocardiograms as training samples, and use the training samples to train the ventricular premature beat recognition model constructed in step 1 to obtain a trained ventricular premature beat recognition model; Step 3: Preprocess the electrocardiogram to be classified as a prediction sample, and send the prediction sample to the ventricular premature beat recognition model trained in step 2 to classify the electrocardiogram to be classified.

2. The ventricular premature beat recognition method based on improved ShuffleNetV2 according to claim 1, characterized in that: The convolution kernel of the depthwise separable convolutional layer has a moving stride of 1.