CN110946566B - Heart beat classification method, device, equipment and storage medium based on U-Net network - Google Patents

Heart beat classification method, device, equipment and storage medium based on U-Net network Download PDF

Info

Publication number
CN110946566B
CN110946566B CN201911295639.6A CN201911295639A CN110946566B CN 110946566 B CN110946566 B CN 110946566B CN 201911295639 A CN201911295639 A CN 201911295639A CN 110946566 B CN110946566 B CN 110946566B
Authority
CN
China
Prior art keywords
layer
dimensional
classification
unit
decoding unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911295639.6A
Other languages
Chinese (zh)
Other versions
CN110946566A (en
Inventor
杨珊
王春丽
唐勋
李斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Spaceon Electronics Co Ltd
Original Assignee
Chengdu Spaceon Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Spaceon Electronics Co Ltd filed Critical Chengdu Spaceon Electronics Co Ltd
Priority to CN201911295639.6A priority Critical patent/CN110946566B/en
Publication of CN110946566A publication Critical patent/CN110946566A/en
Application granted granted Critical
Publication of CN110946566B publication Critical patent/CN110946566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Veterinary Medicine (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Pathology (AREA)
  • Cardiology (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Psychiatry (AREA)
  • Signal Processing (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention relates to the technical field of automatic electrocardiosignal detection, and discloses a heart beat classification method, device, equipment and storage medium based on a U-Net network. The invention provides a new method for realizing automatic heart beat classification by a machine learning model based on a U-Net network, namely, by designing the U-Net network model of a one-dimensional convolutional neural network, electrocardio data can be input into the U-Net model for training and cross validation to obtain an identification model of heart beat classification, and finally the identification module is applied to carry out heart beat classification on electrocardiosignals to be detected to obtain a corresponding heart beat classification result, so that various problems of manual feature extraction and traditional machine learning are relieved, the electrocardio features can be input as the model without manual design and extraction, an accurate diagnosis result is achieved, and the method can be widely applied to common arrhythmia detection and is convenient for practical application and popularization.

Description

Heart beat classification method, device, equipment and storage medium based on U-Net network
Technical Field
The invention belongs to the technical field of automatic electrocardiosignal detection, and particularly relates to a heartbeat classification method, device, equipment and storage medium based on a U-Net network.
Background
The incidence of arrhythmias increases with the aging global population, the most common types of cardiac activity being sinus normal activity, Atrial Premature Beat (APB), ventricular premature beat (PVC), Left Bundle Branch Block (LBBB) and Right Bundle Branch Block (RBBB), the remainder except the first being morphological beating elements that are characteristic and constitutive of complex arrhythmias.
At present, the medical routine of arrhythmia screening is electrocardiogram, but some arrhythmia is not easy to be perceived, and has no clinical symptoms, even the arrhythmia can be found only by long-term monitoring, and people under guardianship need to be affected to have a rest in normal life by wearing an electrocardiogram monitoring device (the wearable portable electrocardiogram detection equipment can provide automatic monitoring of human electrocardiosignals for a long time), so that patients generally cannot go to a hospital for examination if no major physical discomfort exists, and a daily monitoring and automatic detection means is needed to find arrhythmia symptoms as early as possible.
The conventional heart beat classification method combines artificial extraction features with a traditional machine learning method, but even if the method has good medical field knowledge, artificial design and extraction of the electrocardio features representing arrhythmia are not easy, and the machine learning method often has more false positive results. In recent years, deep learning has surpassed traditional machine learning techniques. Deep learning algorithms are increasingly used in healthcare to handle complex tasks. For arrhythmia detection, various deep learning models have good application prospects. Among a plurality of deep learning models, a Convolutional Neural Network (CNN) is a common electrocardio-arrhythmia classification algorithm, and has strong robustness to noise, so that the CNN can extract a useful prediction factor even if data is noisy, and the characteristic is fully embodied in a deep-level structure.
In summary, with the depth of network hierarchy, the learned features become more abstract, and it is necessary to develop a heart beat detection method based on deep learning (i.e. for beat frequency analysis of electrocardiosignals and classification of arrhythmia) to alleviate many problems of manual feature extraction and conventional machine learning, so that the electrocardio features can be used as model input without manual design and extraction, and accurate diagnosis results can be achieved.
Disclosure of Invention
In order to solve the problem that the existing heart beat classification method needs manual feature extraction, the invention aims to provide a heart beat classification method, a heart beat classification device, heart beat classification equipment and a heart beat classification storage medium based on a U-Net network.
The technical scheme adopted by the invention is as follows:
a heart beat classification method based on a U-Net network comprises the following steps:
s101, taking a sample electrocardiosignal as the input of a U-Net network model, taking a determined heart beat classification label of the sample electrocardiosignal as the output of the U-Net network model, dividing a training sample set and a verification sample set, training and verifying the U-Net network model by adopting a cross verification method after a set initial optimizer and an initial evaluation index are led in, and obtaining and storing the heart beat classification model by automatically adjusting a hyper-parameter, automatically configuring the evaluation index and/or automatically selecting the optimizer, wherein the U-Net network model is used for sampling and building a U-Net network of a one-dimensional convolutional neural network;
s102, importing the electrocardiosignals to be detected into the heart beat classification model for classification to obtain predicted heart beat classification labels, and then taking the predicted heart beat classification labels as heart beat classification results of the electrocardiosignals to be detected.
Preferably, before the step S101 or S102, the following steps are further included:
s100, preprocessing the acquired electrocardiosignals, wherein the preprocessing mode comprises signal amplification processing, filtering and denoising processing, baseline drift removing processing and/or myoelectric interference removing processing.
Preferably, before the step S101, the method further includes the following steps: and carrying out data enhancement processing on the sample electrocardiosignals.
Preferably, the U-Net network model adopts an encoder-decoder structure and comprises an input layer, a first encoding unit, a second encoding unit, a third encoding unit, a fourth encoding unit, a transfer unit, a fourth decoding unit, a third decoding unit, a second decoding unit, a first decoding unit, a one-dimensional convolution layer, a classification layer and an output layer which are sequentially connected along a forward propagation direction, wherein the classification layer adopts a Sigmoid classification function;
the first coding unit, the second coding unit, the third coding unit and the fourth coding unit respectively comprise a one-dimensional convolution layer, a ResBlock residual module, a Relu active layer and a one-dimensional down-sampling layer which are sequentially connected along the forward propagation direction, wherein the one-dimensional down-sampling layer comprises a one-dimensional maximum pooling sublayer and a discarding sublayer, and the sampling rate is sequentially decreased progressively along the forward propagation direction;
the transmission unit comprises a one-dimensional convolutional layer, a ResBlock residual module and a Relu activation layer which are sequentially connected along the forward propagation direction;
the fourth decoding unit, the third decoding unit, the second decoding unit and the first decoding unit respectively comprise a one-dimensional upsampling layer, a one-dimensional convolutional layer, a connecting layer, a one-dimensional convolutional layer, a ResBlock residual module and a Relu activation layer which are sequentially connected along the forward propagation direction, wherein the sampling rate of the one-dimensional upsampling layer is sequentially increased progressively along the forward propagation direction;
the sampling rate of a one-dimensional down-sampling layer in the fourth coding unit is the same as that of a one-dimensional up-sampling layer in the fourth decoding unit, the sampling rate of a one-dimensional down-sampling layer in the third coding unit is the same as that of a one-dimensional up-sampling layer in the third decoding unit, the sampling rate of a one-dimensional down-sampling layer in the second coding unit is the same as that of a one-dimensional up-sampling layer in the second decoding unit, and the sampling rate of a one-dimensional down-sampling layer in the first coding unit is the same as that of a one-dimensional up-sampling layer in the first decoding unit;
the input end of the connection layer in the fourth decoding unit is further connected with the output end of the Relu activation layer in the fourth encoding unit, the input end of the connection layer in the third decoding unit is further connected with the output end of the Relu activation layer in the third encoding unit, the input end of the connection layer in the second decoding unit is further connected with the output end of the Relu activation layer in the second encoding unit, and the input end of the connection layer in the first decoding unit is further connected with the output end of the Relu activation layer in the first encoding unit to form jump connection respectively.
Further preferably, the ResBlock residual module comprises two residual blocks which are sequentially connected along the forward propagation direction, wherein the residual blocks comprise a Relu active layer, a batch normalization layer, a one-dimensional convolution layer and an overlap layer which are sequentially connected along the forward propagation direction, the input end of the Relu active layer is further connected with the input end of the overlap layer to form a jump layer connection, so that a shortcut is added to the two one-dimensional convolution layers, and a residual block is formed.
Specifically, the cross validation method adopts a Hold-Out cross validation method, a K-fold cross validation method or a Leave-One-Out cross validation method.
Preferably, the step S101 further includes the following steps:
s1011, dividing the training sample set and the verification sample set and simultaneously dividing a test sample set;
s1012, after a heart beat classification model is obtained, leading each sample electrocardiosignal in the test sample set into the heart beat classification model one by one for classification, and obtaining a predicted heart beat classification label corresponding to each sample electrocardiosignal;
s1013, according to a consistency comparison result of the confirmed heartbeat classification label and the predicted heartbeat classification label, counting to obtain the predicted accuracy of the heartbeat classification model, if the predicted accuracy exceeds a threshold value, storing the heartbeat classification model, and if not, discarding the heartbeat classification model.
The other technical scheme adopted by the invention is as follows:
a heart beat classification device based on a U-Net network comprises a model training unit and a classification prediction unit;
the model training unit is used for inputting a sample electrocardiosignal as a U-Net network model, using a determined heartbeat classification label of the sample electrocardiosignal as the output of the U-Net network model, dividing a training sample set and a verification sample set, training and verifying the U-Net network model by adopting a cross verification method after a set initial optimizer and an initial evaluation index are led in, and obtaining and storing the heartbeat classification model by automatically adjusting a hyper-parameter, automatically configuring the evaluation index and/or automatically selecting the optimizer, wherein the U-Net network model is sampled to build a U-Net network of a one-dimensional convolutional neural network;
the classification prediction unit is in communication connection with the model training unit and is used for importing the electrocardiosignals to be tested into the heart beat classification model for classification to obtain predicted heart beat classification labels, and then the predicted heart beat classification labels are used as heart beat classification results of the electrocardiosignals to be tested.
The other technical scheme adopted by the invention is as follows:
a heartbeat categorization apparatus based on a U-Net network comprises a storage and a processor which are connected in communication, wherein the storage is used for storing a computer program and electrocardiosignal data, and the processor is used for executing the computer program to realize the heartbeat categorization method based on the U-Net network.
The other technical scheme adopted by the invention is as follows:
a storage medium having stored thereon a computer program and electrocardiographic signal data, the computer program, when being executed by a processor, realizing the steps of the U-Net network based heart beat classification method as described above.
The invention has the beneficial effects that:
(1) the invention provides a new method for realizing automatic heart beat classification by a machine learning model based on a U-Net network, namely, by designing the U-Net network model of a one-dimensional convolutional neural network, electrocardio data can be input into the U-Net model for training and cross validation to obtain a heart beat classified recognition model, and finally the recognition module is applied to carry out heart beat classification on electrocardio signals to be detected to obtain a corresponding heart beat classification result, so that various problems of manual extraction of characteristics and traditional machine learning are solved, the electrocardio characteristics can be input as the model without manual design and extraction, an accurate diagnosis result is achieved, and the method can be widely applied to common arrhythmia detection and is convenient for practical application and popularization.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a heartbeat classification method based on a U-Net network provided by the invention.
FIG. 2 is a schematic structural diagram of a U-Net network model provided by the present invention.
Fig. 3 is a schematic structural diagram of a ResBlock module in a U-Net network model according to the present invention.
FIG. 4 is a schematic structural diagram of the heartbeat classification device based on the U-Net network provided by the invention.
FIG. 5 is a schematic structural diagram of a heartbeat classification device based on a U-Net network provided by the invention.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments. It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto. Specific structural and functional details disclosed herein are merely illustrative of example embodiments of the invention. This invention may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments of the present invention.
It should be understood that, for the term "and/or" as may appear herein, it is merely an associative relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, B exists alone, and A and B exist at the same time; for the term "/and" as may appear herein, which describes another associative object relationship, it means that two relationships may exist, e.g., a/and B, may mean: a exists independently, and A and B exist independently; in addition, for the character "/" that may appear herein, it generally means that the former and latter associated objects are in an "or" relationship.
It will be understood that when an element is referred to herein as being "connected," "connected," or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Conversely, if a unit is referred to herein as being "directly connected" or "directly coupled" to another unit, it is intended that no intervening units are present. In addition, other words used to describe relationships between elements (e.g., "between … …" pair "directly between … …", "adjacent" pair "directly adjacent", etc.) should be interpreted in a similar manner.
It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting of example embodiments of the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, numbers, steps, operations, elements, components, and/or groups thereof.
It should also be noted that, in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed substantially concurrently, or the figures may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
It should be understood that specific details are provided in the following description to facilitate a thorough understanding of example embodiments. However, it will be understood by those of ordinary skill in the art that the example embodiments may be practiced without these specific details. For example, systems may be shown in block diagrams in order not to obscure the examples in unnecessary detail. In other instances, well-known processes, structures and techniques may be shown without unnecessary detail in order to avoid obscuring example embodiments.
Example one
As shown in fig. 1 to 3, the heartbeat classification method based on the U-Net network provided in this embodiment may include, but is not limited to, the following steps S101 to S102.
S101, taking a sample electrocardiosignal as input of a U-Net network model, taking a determined heartbeat classification label of the sample electrocardiosignal as output of the U-Net network model, dividing a training sample set and a verification sample set, training and verifying the U-Net network model by adopting a cross verification method after a set initial optimizer and an initial evaluation index are led in, obtaining and storing the heartbeat classification model by automatically adjusting a hyper-parameter, automatically configuring the evaluation index and/or automatically selecting the optimizer, wherein the U-Net network model is sampled to build a U-Net network of a one-dimensional convolutional neural network.
In step S101, the sample cardiac electrical signals may be acquired by an existing cardiac electrical acquisition device (the signal length may be 10 seconds, for example, and the sampling rate may be 500Hz), and the sample cardiac electrical signals correspond to a determined cardiac beat classification tag, where the cardiac beat classification tag may include, but is not limited to, a left bundle branch block tag, a right bundle branch block tag, an atrial premature beat tag, a ventricular premature beat tag, a pacing cardiac beat tag, a normal tag, and the like, and the sample cardiac electrical signals corresponding to the cardiac beat classification tags may be acquired by performing cardiac electrical acquisition on subjects in corresponding conditions. Because the electrocardiosignals reflect relatively weak physiological signals, the acquisition and processing of the electrocardiosignals belong to the field of weak signal detection, and the acquired electrocardiosignals inevitably have noise interference, including power frequency interference, baseline drift, electromyographic interference and the like, the sample electrocardiosignals need to be preprocessed (the preprocessing is the basis of subsequent operation) to reduce the influence of various noise interferences in the original electrocardiosignals, namely before the step S101, the method further comprises the following steps: s100, preprocessing the acquired electrocardiosignals, wherein the preprocessing mode can be but is not limited to signal amplification processing, filtering denoising processing, baseline wandering removing processing and/or myoelectric interference removing processing and the like. In addition, in order to improve the generalization performance of the model, before the step S101, the method further includes the following steps: and carrying out data enhancement processing on the sample electrocardiosignals. In addition, the signal amplification processing, the filtering denoising processing, the baseline wandering removing processing, the electromyography interference removing processing and the data enhancement processing are conventional.
In step S101, the U-Net network is a CNN-based image segmentation network, and is mainly used for medical image segmentation, and the network is initially proposed for cell wall segmentation, and then has excellent performance in lung nodule detection, blood vessel extraction on fundus retina, and the like. The original U-Net network structure consisted primarily of convolutional layers, max pooling layers (downsampling), deconvolution layers (upsampling), and the ReLU nonlinear activation function. The overall network process is shown in detail AS 1-AS 2 below.
As1. max pooling layer, down-sampling process: assume that the initially input image size is: the 572x572 grayscale image is changed to 568x568x64 size by 2 times of convolution operation of 3x3x64(64 convolution kernels, resulting in 64 feature maps), and then to 248x248x64 by 2x2 maximum pooling operation. The above process was repeated 4 times, i.e., X4 times (3X3 convolution +2X2 pooling), and the number of 3X3 convolution kernels was multiplied for the first 3X3 convolution operation after each pooling. Upon reaching the bottom most layer, i.e., after the 4 th maximum pooling, the image becomes 32x32x512 in size, then 2 more convolutions of 3x3x1024 are performed, and finally 28x28x1024 in size.
As2. deconvolution, upsampling process: at this time, the size of the image is 28x28x1024, deconvolution operation of 2x2 is first performed to change the image to 56x56x512 size, then copying and cropping (copy and crop) of the image before the corresponding maximum pooling layer is spliced with the deconvolved image to obtain an image of 56x56x1024 size, and then convolution operation of 3x3x512 is performed. The above process was repeated 4 times, i.e. x4 times (2x2 deconvolution +3x3 convolution), and the number of 3x3 convolution kernels was reduced by a factor of two at the first 3x3 convolution operation after each splice was made. When the uppermost layer is reached, namely after the 4 th deconvolution, the image is changed into 392x392x64 size, the size of 392x392x128 is obtained by copying, clipping and splicing, then the convolution operation of 3x3x64 is carried out for two times to obtain 388x388x64 size image, and finally the convolution operation of 1x1x2 is carried out for one time.
Because the sample electrocardiosignals are one-dimensional data based on time dimension, in order to be suitable for training and predicting the electrocardiosignals, a U-Net network of a one-dimensional convolution neural network needs to be built, and an Encoder-Decoder (namely coding-decoding) structure consisting of a compression path and a corresponding expansion path can be formed, wherein the compression path is the Encoder (coding) and can carry out automatic feature extraction on the input sample electrocardiosignals; the expansion path, i.e., Decoder, can perform high-precision information positioning to obtain an identification model for predicting the classification of the heartbeat. Optimally, as shown in fig. 2, the U-Net network model adopts an encoder-decoder structure, and includes an Input layer (Input), a first encoding unit, a second encoding unit, a third encoding unit, a fourth encoding unit, a transfer unit, a fourth decoding unit, a third decoding unit, a second decoding unit, a first decoding unit, a one-dimensional convolution layer (Conv1D), a classification layer (Sigmoid), and an Output layer (Output) which are sequentially connected along a forward propagation direction, where the classification layer (Sigmoid) adopts a Sigmoid classification function; the first encoding unit, the second encoding unit, the third encoding unit and the fourth encoding unit respectively comprise a one-dimensional convolutional layer (Conv1D), a ResBlock residual module (ResBlock), a Relu active layer (Relu) and a one-dimensional downsampling layer (Maxpool1D + Dropout) which are sequentially connected along a forward propagation direction, wherein the one-dimensional downsampling layer (Maxpool1D + Dropout) comprises a one-dimensional maximum pooling sublayer (Maxpool1D) and a discarding sublayer (Dropout), and the sampling rate is sequentially decreased in the forward propagation direction; the transmission unit comprises a one-dimensional convolutional layer (Conv1D), a ResBlock residual module (ResBlock) and a Relu activation layer (ReLU) which are sequentially connected along the forward propagation direction; the fourth decoding unit, the third decoding unit, the second decoding unit, and the first decoding unit respectively include a one-dimensional UpSampling layer (UpSampling1D), a one-dimensional convolutional layer (Conv1D), a connection layer (Concatenate), a one-dimensional convolutional layer (Conv1D), a ResBlock residual module (ResBlock), and a Relu activation layer (Relu) that are sequentially connected along a forward propagation direction, wherein a sampling rate of the one-dimensional UpSampling layer (UpSampling1D) sequentially increases along the forward propagation direction; the sampling rate of a one-dimensional down-sampling layer in the fourth coding unit is the same as that of a one-dimensional up-sampling layer in the fourth decoding unit, the sampling rate of a one-dimensional down-sampling layer in the third coding unit is the same as that of a one-dimensional up-sampling layer in the third decoding unit, the sampling rate of a one-dimensional down-sampling layer in the second coding unit is the same as that of a one-dimensional up-sampling layer in the second decoding unit, and the sampling rate of a one-dimensional down-sampling layer in the first coding unit is the same as that of a one-dimensional up-sampling layer in the first decoding unit; the input end of the connection layer in the fourth decoding unit is further connected with the output end of the Relu activation layer in the fourth encoding unit, the input end of the connection layer in the third decoding unit is further connected with the output end of the Relu activation layer in the third encoding unit, the input end of the connection layer in the second decoding unit is further connected with the output end of the Relu activation layer in the second encoding unit, and the input end of the connection layer in the first decoding unit is further connected with the output end of the Relu activation layer in the first encoding unit to form jump connection respectively. All the technical terms are common terms in the prior deep learning technology, and are not described in detail herein. Because the U-Net network also uses jump connection, the up-sampling result of the decoding unit at the current stage can be connected with the output with the same resolution in the coding unit at the same stage, and then the up-sampling result is used as the input of the decoding unit at the next stage, so that the precision of information positioning and the identification accuracy of the obtained heartbeat classification model are further improved.
In step S101, further preferably, the ResBlock residual module includes two residual blocks connected in sequence along the forward propagation direction, where the residual blocks include a Relu active layer (Relu), a batch normalization layer (BatchNormalization), a one-dimensional convolution layer (Conv1D), a one-dimensional convolution layer (Conv1D), and an Addition layer (Addition) connected in sequence along the forward propagation direction, and an input end of the Addition layer is further connected to an input end of the Relu active layer to form a skip layer connection, so that a shortcut is added to the two one-dimensional convolution layers, thereby forming a residual block. As shown in fig. 3, a simple residual error network structure can be formed, the problem of performance degradation of the deep convolutional neural network is solved, and the performance of the obtained heartbeat classification model is improved. In addition, all the technical terms mentioned above are common terms in the existing deep learning technology, and are not described herein again.
In step S101, the cross validation method is a common statistical analysis method for validating the performance of a classifier, and the basic idea is to group raw data in a certain sense, where one part is used as a training set and the other part is used as a validation set, and first train the classifier with the training set, and then test a model obtained by training with the validation set, so as to serve as a performance index for evaluating the classifier; specifically, the cross-validation method can be, but is not limited to, a Hold-Out cross-validation method, a K-fold cross-validation method, a Leave-One-Out cross-validation method, or the like.
In step S101, the automatic adjustment of the hyper-parameters (in the context of machine learning, the hyper-parameters are parameters set before the learning process is started, and are not parameter data obtained by training) is to optimize the model parameters, the automatic configuration of the evaluation indexes is to determine indexes suitable as classification criteria, the automatic selection of the optimizer is to select a suitable optimizer (Adam optimizer may be selected as the initial optimizer), and the model performance can be continuously optimized fully automatically by continuously and automatically adjusting the hyper-parameters, automatically configuring the evaluation indexes, and/or automatically selecting the optimizer in the cross-validation process, so as to obtain the recognition model for heartbeat classification. In order to finally verify whether the obtained heartbeat classification model can be used for detecting heartbeat classification, the optimization method may further include, but is not limited to, the following steps S1011 to S1013: s1011, dividing the training sample set and the verification sample set and simultaneously dividing a test sample set; s1012, after a heart beat classification model is obtained, leading each sample electrocardiosignal in the test sample set into the heart beat classification model one by one for classification, and obtaining a predicted heart beat classification label corresponding to each sample electrocardiosignal; s1013, according to a consistency comparison result of the confirmed heartbeat classification label and the predicted heartbeat classification label, counting to obtain the predicted accuracy of the heartbeat classification model, if the predicted accuracy exceeds a threshold value, storing the heartbeat classification model, and if not, discarding the heartbeat classification model. In the step S1013, the threshold may be 70%, and through the foregoing steps S1011 to S1013, it may be verified whether the obtained cardiac beat classification model meets the expectation, and if the obtained cardiac beat classification model does not meet the expectation, the collection may need to be re-trained and verified, or the training and verification may be performed after more sample electrocardiosignals are collected.
S102, importing the electrocardiosignals to be detected into the heart beat classification model for classification to obtain predicted heart beat classification labels, and then taking the predicted heart beat classification labels as heart beat classification results of the electrocardiosignals to be detected.
Before the step S102, the preprocessing mode of the electrocardiographic signal to be detected is consistent with that of the sample electrocardiographic signal, which is not described herein again.
According to the steps S101-S102, after a heart beat classification model is obtained in the early stage, only the electrocardiosignals of a subject are needed to be obtained, and the corresponding heart beat classification result can be obtained by importing, so that the problems of manual extraction features and traditional machine learning are solved, the electrocardio features can be used as model input without manual design and extraction, and an accurate diagnosis result is achieved.
In summary, the heartbeat classification method based on the U-Net network provided by the embodiment has the following technical effects:
(1) the embodiment provides a new method for realizing automatic heart beat classification by a machine learning model based on a U-Net network, namely, by designing the U-Net network model of a one-dimensional convolutional neural network, electrocardio data can be input into the U-Net model for training and cross validation to obtain a heart beat classified recognition model, and finally the recognition module is applied to carry out heart beat classification on electrocardio signals to be detected to obtain a corresponding heart beat classification result, so that various problems of manual extraction of features and traditional machine learning are solved, the electrocardio features can be input as the model without manual design and extraction, an accurate diagnosis result is achieved, and the method can be widely applied to common arrhythmia detection and is convenient for practical application and popularization.
Example two
As shown in fig. 4, the present embodiment provides a hardware device for implementing the heartbeat classification method based on the U-Net network of the first embodiment, including a model training unit and a classification prediction unit; the model training unit is used for inputting a sample electrocardiosignal as a U-Net network model, using a determined heartbeat classification label of the sample electrocardiosignal as the output of the U-Net network model, dividing a training sample set and a verification sample set, training and verifying the U-Net network model by adopting a cross verification method after a set initial optimizer and an initial evaluation index are led in, and obtaining and storing the heartbeat classification model by automatically adjusting a hyper-parameter, automatically configuring the evaluation index and/or automatically selecting the optimizer, wherein the U-Net network model is sampled to build a U-Net network of a one-dimensional convolutional neural network; the classification prediction unit is in communication connection with the model training unit and is used for importing the electrocardiosignals to be tested into the heart beat classification model for classification to obtain predicted heart beat classification labels, and then the predicted heart beat classification labels are used as heart beat classification results of the electrocardiosignals to be tested.
The working process, working details and technical effects of the foregoing apparatus provided in this embodiment may be referred to in the first embodiment, and are not described herein again.
EXAMPLE III
As shown in fig. 5, this embodiment provides a hardware device for implementing the U-Net network based heartbeat categorization method in the first embodiment, which includes a memory and a processor that are communicatively connected, where the memory is used to store a computer program and electrocardiographic signal data, and the processor is used to execute the computer program to implement the steps of the U-Net network based heartbeat categorization method in the first embodiment.
The working process, the working details and the technical effects of the foregoing device provided in this embodiment may be referred to as embodiment one, and are not described herein again.
Example four
The present embodiment provides a storage medium storing a computer program including the U-Net network based heartbeat categorization method according to the first embodiment, that is, the storage medium stores the computer program and the electrocardiographic signal data, and the computer program, when being executed by a processor, implements the steps of the U-Net network based heartbeat categorization method according to the first embodiment. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices, and may also be a mobile smart device (such as a smart phone, a PAD, or an ipad).
For the working process, the working details, and the technical effects of the storage medium provided in this embodiment, reference may be made to embodiment one, which is not described herein again.
The various embodiments described above are merely illustrative, and may or may not be physically separate, as they relate to elements illustrated as separate components; if reference is made to a component displayed as a unit, it may or may not be a physical unit, and may be located in one place or distributed over a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: modifications of the technical solutions described in the embodiments or equivalent replacements of some technical features may still be made. And such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Finally, it should be noted that the present invention is not limited to the above alternative embodiments, and that any person can obtain other products in various forms in the light of the present invention. The above detailed description should not be taken as limiting the scope of the invention, which is defined in the claims, and which the description is intended to be interpreted accordingly.

Claims (9)

1. A heartbeat classification method based on a U-Net network is characterized by comprising the following steps:
s101, taking a sample electrocardiosignal as the input of a U-Net network model, taking a determined heart beat classification label of the sample electrocardiosignal as the output of the U-Net network model, dividing a training sample set and a verification sample set, training and verifying the U-Net network model by adopting a cross verification method after a set initial optimizer and an initial evaluation index are led in, and obtaining and storing the heart beat classification model by automatically adjusting a hyper-parameter, automatically configuring the evaluation index and/or automatically selecting the optimizer, wherein the U-Net network model is used for sampling and building a U-Net network of a one-dimensional convolutional neural network;
s102, importing the electrocardiosignals to be detected into the heart beat classification model for classification to obtain predicted heart beat classification labels, and then taking the predicted heart beat classification labels as heart beat classification results of the electrocardiosignals to be detected;
the U-Net network model adopts an encoder-decoder structure and comprises an input layer, a first encoding unit, a second encoding unit, a third encoding unit, a fourth encoding unit, a transfer unit, a fourth decoding unit, a third decoding unit, a second decoding unit, a first decoding unit, a one-dimensional convolution layer, a classification layer and an output layer which are sequentially connected along a forward propagation direction, wherein the classification layer adopts a Sigmoid classification function;
the first coding unit, the second coding unit, the third coding unit and the fourth coding unit respectively comprise a one-dimensional convolution layer, a ResBlock residual module, a Relu active layer and a one-dimensional down-sampling layer which are sequentially connected along the forward propagation direction, wherein the one-dimensional down-sampling layer comprises a one-dimensional maximum pooling sublayer and a discarding sublayer, and the sampling rate is sequentially decreased progressively along the forward propagation direction;
the transmission unit comprises a one-dimensional convolutional layer, a ResBlock residual module and a Relu activation layer which are sequentially connected along the forward propagation direction;
the fourth decoding unit, the third decoding unit, the second decoding unit and the first decoding unit respectively comprise a one-dimensional upsampling layer, a one-dimensional convolutional layer, a connecting layer, a one-dimensional convolutional layer, a ResBlock residual module and a Relu activation layer which are sequentially connected along the forward propagation direction, wherein the sampling rate of the one-dimensional upsampling layer is sequentially increased progressively along the forward propagation direction;
the sampling rate of a one-dimensional down-sampling layer in the fourth coding unit is the same as that of a one-dimensional up-sampling layer in the fourth decoding unit, the sampling rate of a one-dimensional down-sampling layer in the third coding unit is the same as that of a one-dimensional up-sampling layer in the third decoding unit, the sampling rate of a one-dimensional down-sampling layer in the second coding unit is the same as that of a one-dimensional up-sampling layer in the second decoding unit, and the sampling rate of a one-dimensional down-sampling layer in the first coding unit is the same as that of a one-dimensional up-sampling layer in the first decoding unit;
the input end of the connection layer in the fourth decoding unit is further connected with the output end of the Relu activation layer in the fourth encoding unit, the input end of the connection layer in the third decoding unit is further connected with the output end of the Relu activation layer in the third encoding unit, the input end of the connection layer in the second decoding unit is further connected with the output end of the Relu activation layer in the second encoding unit, and the input end of the connection layer in the first decoding unit is further connected with the output end of the Relu activation layer in the first encoding unit to form jump connection respectively.
2. The method for classifying heartbeats based on the U-Net network as claimed in claim 1, wherein before the step S101 or S102, the method further comprises the following steps:
s100, preprocessing the acquired electrocardiosignals, wherein the preprocessing mode comprises signal amplification processing, filtering and denoising processing, baseline drift removing processing and/or myoelectric interference removing processing.
3. The heart beat classification method based on the U-Net network as claimed in claim 1, characterized in that before the step S101, the method further comprises the following steps: and carrying out data enhancement processing on the sample electrocardiosignals.
4. The heartbeat categorization method based on U-Net network of claim 1 further characterized in that: the ResBlock residual module comprises two residual blocks which are sequentially connected along the forward propagation direction, wherein each residual block comprises a Relu active layer, a batch normalization layer, a one-dimensional convolution layer and an overlap layer which are sequentially connected along the forward propagation direction, the input end of the Relu active layer is further connected with the input end of the overlap layer to form a jump layer connection, so that a shortcut is added to the two one-dimensional convolution layers, and a residual block is formed.
5. The heart beat classification method based on the U-Net network as claimed in claim 1, characterized in that: the cross validation method adopts a Hold-Out cross validation method, a K-fold cross validation method or a Leave-One-Out cross validation method.
6. The heart beat classification method based on the U-Net network as claimed in claim 1, wherein the step S101 further comprises the following steps:
s1011, dividing the training sample set and the verification sample set and simultaneously dividing a test sample set;
s1012, after a heart beat classification model is obtained, leading each sample electrocardiosignal in the test sample set into the heart beat classification model one by one for classification, and obtaining a predicted heart beat classification label corresponding to each sample electrocardiosignal;
s1013, according to a consistency comparison result of the confirmed heartbeat classification label and the predicted heartbeat classification label, counting to obtain the predicted accuracy of the heartbeat classification model, if the predicted accuracy exceeds a threshold value, storing the heartbeat classification model, and if not, discarding the heartbeat classification model.
7. The utility model provides a heart claps sorter based on U-Net network which characterized in that: the method comprises a model training unit and a classification prediction unit;
the model training unit is used for inputting a sample electrocardiosignal as a U-Net network model, using a determined heartbeat classification label of the sample electrocardiosignal as the output of the U-Net network model, dividing a training sample set and a verification sample set, training and verifying the U-Net network model by adopting a cross verification method after a set initial optimizer and an initial evaluation index are led in, and obtaining and storing the heartbeat classification model by automatically adjusting a hyper-parameter, automatically configuring the evaluation index and/or automatically selecting the optimizer, wherein the U-Net network model is sampled to build a U-Net network of a one-dimensional convolutional neural network;
the classification prediction unit is in communication connection with the model training unit and is used for importing the electrocardiosignals to be detected into the heartbeat classification model for classification to obtain predicted heartbeat classification labels, and then the predicted heartbeat classification labels are used as heartbeat classification results of the electrocardiosignals to be detected;
the U-Net network model adopts an encoder-decoder structure and comprises an input layer, a first encoding unit, a second encoding unit, a third encoding unit, a fourth encoding unit, a transfer unit, a fourth decoding unit, a third decoding unit, a second decoding unit, a first decoding unit, a one-dimensional convolution layer, a classification layer and an output layer which are sequentially connected along a forward propagation direction, wherein the classification layer adopts a Sigmoid classification function;
the first coding unit, the second coding unit, the third coding unit and the fourth coding unit respectively comprise a one-dimensional convolution layer, a ResBlock residual module, a Relu active layer and a one-dimensional down-sampling layer which are sequentially connected along the forward propagation direction, wherein the one-dimensional down-sampling layer comprises a one-dimensional maximum pooling sublayer and a discarding sublayer, and the sampling rate is sequentially decreased progressively along the forward propagation direction;
the transmission unit comprises a one-dimensional convolutional layer, a ResBlock residual module and a Relu activation layer which are sequentially connected along the forward propagation direction;
the fourth decoding unit, the third decoding unit, the second decoding unit and the first decoding unit respectively comprise a one-dimensional upsampling layer, a one-dimensional convolutional layer, a connecting layer, a one-dimensional convolutional layer, a ResBlock residual module and a Relu activation layer which are sequentially connected along the forward propagation direction, wherein the sampling rate of the one-dimensional upsampling layer is sequentially increased progressively along the forward propagation direction;
the sampling rate of a one-dimensional down-sampling layer in the fourth coding unit is the same as that of a one-dimensional up-sampling layer in the fourth decoding unit, the sampling rate of a one-dimensional down-sampling layer in the third coding unit is the same as that of a one-dimensional up-sampling layer in the third decoding unit, the sampling rate of a one-dimensional down-sampling layer in the second coding unit is the same as that of a one-dimensional up-sampling layer in the second decoding unit, and the sampling rate of a one-dimensional down-sampling layer in the first coding unit is the same as that of a one-dimensional up-sampling layer in the first decoding unit;
the input end of the connection layer in the fourth decoding unit is further connected with the output end of the Relu activation layer in the fourth encoding unit, the input end of the connection layer in the third decoding unit is further connected with the output end of the Relu activation layer in the third encoding unit, the input end of the connection layer in the second decoding unit is further connected with the output end of the Relu activation layer in the second encoding unit, and the input end of the connection layer in the first decoding unit is further connected with the output end of the Relu activation layer in the first encoding unit, so that jump connection is formed respectively.
8. The utility model provides a heart claps sorting equipment based on U-Net network which characterized in that: the method comprises a memory and a processor which are in communication connection, wherein the memory is used for storing a computer program and electrocardiosignal data, and the processor is used for executing the computer program to realize the steps of the heart beat classification method based on the U-Net network according to any one of claims 1 to 6.
9. A storage medium, characterized by: the storage medium stores a computer program and electrocardiosignal data, and the computer program is executed by a processor to realize the steps of the heart beat classification method based on the U-Net network according to any one of claims 1 to 6.
CN201911295639.6A 2019-12-16 2019-12-16 Heart beat classification method, device, equipment and storage medium based on U-Net network Active CN110946566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911295639.6A CN110946566B (en) 2019-12-16 2019-12-16 Heart beat classification method, device, equipment and storage medium based on U-Net network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911295639.6A CN110946566B (en) 2019-12-16 2019-12-16 Heart beat classification method, device, equipment and storage medium based on U-Net network

Publications (2)

Publication Number Publication Date
CN110946566A CN110946566A (en) 2020-04-03
CN110946566B true CN110946566B (en) 2022-06-17

Family

ID=69981922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911295639.6A Active CN110946566B (en) 2019-12-16 2019-12-16 Heart beat classification method, device, equipment and storage medium based on U-Net network

Country Status (1)

Country Link
CN (1) CN110946566B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111481192B (en) * 2020-04-22 2022-06-03 重庆邮电大学 Electrocardiosignal R wave detection method based on improved U-Net
CN111772619B (en) * 2020-06-19 2022-09-20 厦门纳龙健康科技股份有限公司 Heart beat identification method based on deep learning, terminal equipment and storage medium
CN112381726B (en) * 2020-10-29 2023-05-23 浙江吉利控股集团有限公司 Construction method and device for global map of underground garage
CN112927224A (en) * 2021-03-30 2021-06-08 太原理工大学 Heart nuclear magnetic image recognition method, device and equipment based on deep learning and random forest and storage medium
CN113192022A (en) * 2021-04-27 2021-07-30 长治学院 Pathogenic spore identification and counting method and device based on deep learning
CN114652323B (en) * 2022-02-25 2023-03-21 苏州大学 Arrhythmia detection method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191426A (en) * 2018-07-24 2019-01-11 江南大学 A kind of flat image conspicuousness detection method
CN109829880A (en) * 2018-12-07 2019-05-31 清影医疗科技(深圳)有限公司 A kind of CT image detecting method based on deep learning, device and control equipment
CN109886971A (en) * 2019-01-24 2019-06-14 西安交通大学 A kind of image partition method and system based on convolutional neural networks
CN110313894A (en) * 2019-04-15 2019-10-11 四川大学 Arrhythmia cordis sorting algorithm based on convolutional neural networks
CN110353665A (en) * 2019-08-14 2019-10-22 苏州大学 ECG signal signature waveform detection method is singly led based on improved one-dimensional U-net

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10595727B2 (en) * 2018-01-25 2020-03-24 Siemens Healthcare Gmbh Machine learning-based segmentation for cardiac medical imaging

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109191426A (en) * 2018-07-24 2019-01-11 江南大学 A kind of flat image conspicuousness detection method
CN109829880A (en) * 2018-12-07 2019-05-31 清影医疗科技(深圳)有限公司 A kind of CT image detecting method based on deep learning, device and control equipment
CN109886971A (en) * 2019-01-24 2019-06-14 西安交通大学 A kind of image partition method and system based on convolutional neural networks
CN110313894A (en) * 2019-04-15 2019-10-11 四川大学 Arrhythmia cordis sorting algorithm based on convolutional neural networks
CN110353665A (en) * 2019-08-14 2019-10-22 苏州大学 ECG signal signature waveform detection method is singly led based on improved one-dimensional U-net

Also Published As

Publication number Publication date
CN110946566A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
CN110946566B (en) Heart beat classification method, device, equipment and storage medium based on U-Net network
CN110623658B (en) Signal processing method, signal processing apparatus, medical device, and storage medium
CN110619322A (en) Multi-lead electrocardio abnormal signal identification method and system based on multi-flow convolution cyclic neural network
CN111134662B (en) Electrocardio abnormal signal identification method and device based on transfer learning and confidence degree selection
CN110555468A (en) Electroencephalogram signal identification method and system combining recursion graph and CNN
CN110751636B (en) Fundus image retinal arteriosclerosis detection method based on improved coding and decoding network
CN104636580A (en) Health monitoring mobile phone based on human face
CN107239684A (en) A kind of feature learning method and system for ECG identifications
Šajn et al. Image processing and machine learning for fully automated probabilistic evaluation of medical images
Xiang et al. ECG-based heartbeat classification using two-level convolutional neural network and RR interval difference
CN113855038B (en) Electrocardiosignal critical value prediction method and device based on multi-model integration
CN111291727A (en) Method and device for detecting signal quality by photoplethysmography
CN116343284A (en) Attention mechanism-based multi-feature outdoor environment emotion recognition method
CN115177262A (en) Heart sound and electrocardiogram combined diagnosis device and system based on deep learning
CN115281688A (en) Cardiac hypertrophy multi-label detection system based on multi-mode deep learning
CN113925459A (en) Sleep staging method based on electroencephalogram feature fusion
CN111047590A (en) Hypertension classification method and device based on fundus images
CN114224288A (en) Microcapsule neural network training method and device for detecting epilepsia electroencephalogram signals
CN113627391A (en) Cross-mode electroencephalogram signal identification method considering individual difference
CN113421250A (en) Intelligent fundus disease diagnosis method based on lesion-free image training
CN110960207A (en) Tree model-based atrial fibrillation detection method, device, equipment and storage medium
CN110786847A (en) Electrocardiogram signal library building method and analysis method
CN114091530A (en) Electrocardiogram classification method and domain-adaptive-based electrocardiogram classification model training method
CN113143204A (en) Electrocardiosignal quality evaluation method, computer device and storage medium
Saranya et al. Early Detection of Heartbeat from Multimodal Data Using RPA Learning with KDNN-SAE.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant