The present invention relates to a method for OSA (Obstructive Sleep Apnea) severity detection, and more particularly of using a recording-based electrocardiography (ECG) signal as an input to detect and output directly a value of apnea-hypopnea index (AHI) for the OSA Severity.
Referring to
Using an example to describe the OSA severity evaluation in
Suppose that a person's sleeping time is 8 hours, OSA severity evaluation can conduct throughout the 8 hours. However, 8 hours are not a fixed time, no limitation to the sleeping time, 8 hours are just an example.
Suppose: A recording-based ECG signal 1 has a time length of 8 hours;
A segmented ECG signal 2 has a time length T of 60 seconds;
Total cut K=480 segmented ECG signals 2 (K*T=28800 seconds=8 hours);
Suppose OSA severity evaluation 5 shows that L=200 segmented ECG signal 2 are apnea;
Therefore apnea-hypopnea index (AHI) is calculated, AHI=L/(K*T/3600), which means apnea times per hour:
Normal: AHI<5
Mild: 5≤AHI<15
Moderate: 15≤AHI<30
Severe: AHI≥30
In the above example, AHI=25, which means the result is a moderate case.
The above method has three disadvantages: the first is that the recognition process is very complicated; the second is that the accuracy of the recognition model is influenced by the different time length of the segment-based signals; the third is that the recognition model uses datasets of segment-based signals during training procedures, which has a very complicated labeling work, the cost of manpower and time is considerable.
The object of the present invention is to provide a method for OSA (Obstructive Sleep Apnea) severity detection by using a recording-based electrocardiography (ECG) signal, the contents of the present invention are decribed as below.
Firstly a detection model of OSA severity is built up.
Acquire ECG signal from public datasets as the training material to input into the detection model of OSA severity for training, and achieve a model.
A recording-based whole ECG signal is inputted into the model for directly showing AHI value and a corresponding result of OSA severity (i.e. normal, mild, moderate or severe).
The recording-based whole ECG signal is inputted into the model, after a processing of a feature maps extraction layer based on convolutional neural network, a global average pooling layer, a dence layer and an output layer to obtain the AHI value and the corresponding result of four-category OSA severity.
The present invention provides detection model of OSA severity 21 to output directly the AHI value and the corresponding result of the OSA severity, i.e. normal, mild, moderate or severe. A whole ECG signal 1 (for example 8 hours, but the time length is not limited) is inputed into the model for recognition and shows oucome 22 directly.
The feature maps extraction layer based on convolutional neural network 311˜335: The feature maps extraction layer uses convolutional neural network (CNN) to conduct feature maps extraction for the input signal. The convolutional neural network is used very often in deep learnig. The biggest feature in CNN is to extract automatically feature information of the input signal through model training, which is called feature maps, and then the feature maps is used for conducting recognition. This method can promote the accuracy of recognition efficiently. The CNN is composed of convolution layers, activation functions and pooling layers. By using these layers to conduct multiple layers of parallel or series connection repeatedly, various CNNs can be built up. In the present embodiment, convolutional layer 311-313 and pooling layer 314 are the first level for feature maps extraction; convolutional layer 321, add 322, convolutional layer 323, convolutional layer 324, and convolutional layer 325 are the second level for feature maps extraction, while convolutional layer 331, convolutional layer 332, add 333, convolutional layer 334 and convolutional layer 335 are the third level for feature maps extraction.
The global average pooling 340: A global average pooling method is used for calculating an average value for each feature map as the ouput of the pooling layer. This method can convert an input signal of different length into an output signal of the same length. In other word, this method can make the model of the present invention accept input signal of any length.
The dence 350: to integrate the features of high abstraction obtained above, and then transfer to the output layer 360.
The output layer 360: use Rectified Linear Unit (ReLU) activation function to output an AHI value (≥0).
In the present embodiment, all convolutional layers use kernel of 1-dimension. Convolutional layer 311 uses 32 kernels of size 20, expressed as (32, 20). Convolutional layer 312 uses kernels of (64, 20); Convolutional layer 313 uses kernels of (128, 5); Convolutional layer 321 uses kernels of (128, 3); Convolutional layer 323 uses kernels of (128, 3); Convolutional layer 324 uses kernels of (64, 1); Convolutional layer 325 uses kernels of (128, 3). Convolutional layer 331 uses kernels of (128, 3); Convolutional layer 332 uses kernels of (128, 3); Convolutional layer 334 uses kernels of (128, 3); Convolutional layer 335 uses kernels of (64, 1).
In the present embodiment, if the input ECG signal 1 samples out 2,160,000 sampling points within 6 hours by 100 Hz sampling rate, then after a convolutional operation of the convolutional layer 311 to convert into 32 feature maps of size 108,000. This feature maps is a 2-dimension array, expressed as 108,000×32. Then the convolutional layer 312 conducts a convolutional operation to the feature maps outputted from the convolutional layer 311, so as to generate 5,400×64 feature maps. The convolutional layer 313 conducts a convolutional operation to the 5,400×64 feature maps so as to generate 1,080×128 feature maps. The pooling layer 314 uses a sliding window of size 2 to adopt max pooling for the feature maps outputted from the convolutional layer 313, so as to obtain 540×128 feature maps.
Thereafter the convolutional layer 321 conducts a convolutional operation to the feature maps outputted from the pooling layer 314 so as to generate 540×128 feature maps, and then after a convolutional operation by the convolutional layer 323 to generate 540×128 feature maps. Then the feature maps outputted from the pooling layer 314 and the feature maps outputted from the convolutional layer 323 will conduct addition operation at the add 322 to obtain a merged 540×128 feature maps. The convolutional layer 324 conducts a convolutional operation to the feature maps outputted from the add 322 to obtain 540×64 feature maps. The convolutional layer 325 will conduct convolutional operation to feature maps outputted from the convolutional layer 324 to obtain 540×128 feature maps.
Thereafter the convolutional layer 331 conducts a convolutional operation to the feature maps outputted from the convolutional layer 325 to generate 540×128 feature maps, continue in this way by convolutional operation of the convolutional layer 332 and convolutional layer 334 to maintain 540×128 feature maps. Then the feature maps outputted from the convolutional layer 325 and the feature maps outputted from the convolutional layer 334 will conduct addition operation at the add 333 to obtain a merged 540×128 feature maps. Finally the convolutional layer 335 conducts convolutional operation to the feature maps putputted from the add 333 to obtain 540×64 feature maps.
The global average pooling 340 in the present embodiment then uses global average pooling method to treat feature maps outputted from the convolutional layer 335 and obtains 64 feature maps average value. It's worth mentioning that the global average pooling method can make input of different length to be converted into output of the same length, therefore the input signal of the present invention model can be any length by this method. Thereafter the features outputted from the global average pooling 340 will be linked to the dence 350 having 16 neurons. The dence 350 is linked to the output layer 360 having only 1 neuron. The output layer 360 uses ReLU activation function to output an AHI value (2:0). Finally, the show outcome 22 will display the AHI value and a corresponding result of four-category OSA severity (i.e. normal, mild, moderate or severe).
Nowadays wearable devices which can measure ECG signal are very popular, it is very convenient to conduct OSA diagnosis through ECG signal analysis, a user can do self-test at home. Referring to
The scope of the present invention depends upon the following claims, and is not limited by the above embodiments.