簡易檢索 / 詳目顯示

研究生: 藍如意
Nipattanon, Ponpatcharee
論文名稱: 應用無錨框物件偵測模型於心電圖頻譜之阻塞型睡眠呼吸中止事件辨識與AHI估測研究
Anchor-Free Object Detection for Event-Based Obstructive Sleep Apnea Identification and AHI Estimation via ECG-Derived Spectrograms
指導教授: 林哲偉
Lin, Che-Wei
學位類別: 碩士
Master
系所名稱: 工學院 - 生物醫學工程學系
Department of BioMedical Engineering
論文出版年: 2026
畢業學年度: 114
語文別: 英文
論文頁數: 104
中文關鍵詞: 睡眠呼吸中止症物件偵測心電圖呼吸中止低通氣指數深度學習連續小波轉換
外文關鍵詞: Sleep apnea, Object detection, Electrocardiogram (ECG), Apnea–Hypopnea Index (AHI), Deep learning, Continuous wavelet transform
相關次數: 點閱:4下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 睡眠呼吸中止症(Sleep Apnea, SA)是一種常見的睡眠相關呼吸疾病,其臨床診斷主要依賴呼吸中止低通氣指數(Apnea–Hypopnea Index, AHI)進行嚴重程度評估。現有多數基於心電圖(Electrocardiogram, ECG)的自動化檢測方法採用固定時間窗分類策略,然而此類方法難以準確描述呼吸中止與低通氣事件的真實時間邊界與持續時間。為克服上述限制,本研究提出一種基於深度學習物件偵測模型的事件導向睡眠呼吸中止檢測框架,透過ECG頻譜影像進行分析,以單一生理訊號實現與臨床定義一致的AHI估測。本研究使用來自國立成功大學醫院睡眠中心之50位受試者的單通道ECG資料,透過Morlet小波之連續小波轉換將ECG訊號轉換為時頻頻譜圖,每張頻譜圖對應90秒的睡眠片段。呼吸中止與低通氣事件分別透過多種無錨框物件偵測模型進行辨識,包括YOLOv8-Nano、RT-DETR與NanoDet,同時納入有錨框模型RetinaNet作為架構比較。模型效能採用受試者分組五折交叉驗證與留一受試者交叉驗證進行評估,並依臨床定義計算預測AHI,僅納入持續時間不少於10秒之事件。
    實驗結果顯示,YOLOv8-Nano在留一受試者交叉驗證中表現最佳,達到均方根誤差11.12次/小時、平均絕對誤差8.36次/小時、皮爾森相關係數0.87、一致性相關係數0.86。依嚴重程度分組分析顯示,所有模型在輕度OSA族群中表現最佳,而在重度OSA族群中因事件重疊與持續時間變化大而面臨較大挑戰。整體而言,無錨框模型在處理事件持續時間變化大且彼此重疊的情況下,皆顯著優於有錨框模型,展現更高的穩定性與可靠性。
    本研究結果顯示,基於ECG頻譜之事件導向物件偵測方法不僅能提供具臨床意義且可解釋的睡眠呼吸中止事件偵測結果,亦能維持具競爭力的AHI預測效能。此一僅使用ECG訊號之框架具備高度實用性與可擴展性,特別適用於重視簡化硬體配置、可及性與臨床解釋性的睡眠呼吸中止症篩檢與長期監測應用情境。

    Sleep apnea (SA) is a prevalent sleep-related breathing disorder, with clinical diagnosis primarily relying on the apnea–hypopnea index (AHI) for severity assessment. Most existing electrocardiogram (ECG)-based automatic detection methods employ fixed time-window classification strategies; however, such approaches fail to accurately represent the true temporal boundaries and durations of apnea and hypopnea events. To address this limitation, this study proposes an event-based sleep apnea detection framework using deep learning–based object detection applied to ECG spectrograms, aiming to achieve AHI estimation that conforms to clinical event definitions using a single physiological signal.
    Single-channel ECG recordings from 50 subjects collected at the National Cheng Kung University Hospital Sleep Center were transformed into time–frequency spectrograms using continuous wavelet transform (CWT) with a Morlet wavelet. Each spectrogram corresponded to a 90-second sleep segment. Apnea and hypopnea events were detected using multiple anchor-free object detection models, including YOLOv8-Nano, RT-DETR, and NanoDet, with an anchor-based detector (RetinaNet) included for architectural comparison. Model performance was evaluated using subject-wise 5-fold cross-validation and leave-one-subject-out (LOSO) cross-validation. Predicted AHI values were calculated by counting detected events with durations of at least 10 seconds in accordance with clinical definitions.
    Experimental results demonstrated that YOLOv8-Nano achieved the best performance under LOSO evaluation, with a root mean square error (RMSE) of 11.12 events/hour, mean absolute error (MAE) of 8.36 events/hour, Pearson correlation coefficient (R) of 0.87, and concordance correlation coefficient (CCC) of 0.86. Severity-stratified analysis revealed that all models achieved the lowest absolute errors in mild OSA subjects, while severe OSA cases exhibited higher errors due to overlapping events and variable durations despite showing the strongest correlation. Overall, anchor-free detectors consistently outperformed the anchor-based model, demonstrating superior robustness in handling variable-duration and overlapping apnea events.
    These findings demonstrate that event-based object detection on ECG-derived spectrograms can provide clinically meaningful and interpretable apnea detection while maintaining competitive AHI estimation performance. The proposed ECG-only framework offers a practical and scalable solution for sleep apnea screening and monitoring, particularly in settings where simplicity, accessibility, and clinical interpretability are essential.

    摘要 I Abstract III Acknowledgement V Table of Contents VI List of Tables IX List of Figures X Chapter 1 Introduction 1 1.1 Background 1 1.2 Motivation 2 1.3 Research Objectives 3 Chapter 2 Literature Review 5 2.1 Sleep Apnea and Clinical Diagnosis 5 2.1.1 Definition of Apnea and Hypopnea 5 2.1.2 Apnea-Hypopnea Index (AHI) and Severity Classification 6 2.1.3 Polysomnography and Its Limitations 7 2.2 ECG-based Sleep Apnea Detection 7 2.2.1 Physiological Relationship between ECG and Respiratory Events 7 2.2.2 Previous ECG-based Classification Approaches 8 2.2.3 Limitations of Fixed Time-Window Classification 9 2.3 Object Detection in Biomedical Signal Analysis 9 2.3.1 From Classification to Event-based Detection 9 2.3.2 Anchor-based vs. Anchor-free Detection Paradigms 10 Chapter 3 Methodology 12 3.1 Overview of the Proposed Framework 12 3.2 Data Source 14 3.2.1 The NCKUHSC Database 14 3.2.2 Subject Demographics and Data Distribution 15 3.3 Signal Pre-processing 15 3.3.1 Band-pass Filtering 16 3.3.2 Z-score Normalization 16 3.3.3 Continuous Wavelet Transform (CWT) Spectrogram Generation 17 3.4 Data Preparation 18 3.4.1 Data Segmentation 18 3.4.2 Bounding Box Labeling 19 3.5 Object Detection Architectures 20 3.5.1 YOLOv8-Nano 20 3.5.2 RT-DETR 21 3.5.3 NanoDet 22 3.6 Model Training and Validation Strategy 24 3.6.1 Training Configuration and Hyperparameters 24 3.6.2 Subject-wise 5-Fold Cross-Validation 25 3.6.3 Leave-One-Subject-Out (LOSO) Cross-Validation 25 3.7 Post-processing and AHI Calculation 26 3.7.1 Confidence Threshold Selection 26 3.7.2 Non-Maximum Suppression (NMS) 27 3.7.3 Event Merging and Duration Filtering 27 3.7.4 AHI Estimation 28 Chapter 4 Experimental Results 29 4.1 Experimental Setup 29 4.1.1 Evaluation Metrics 29 4.2 Confidence Threshold Analysis 32 4.2.1 Threshold Selection for Each Model 32 4.2.2 Precision-Recall Curve Analysis 34 4.3 Visualization of Detection Results 35 4.3.1 Detection on 90-second Spectrograms 36 4.3.2 Detection on 135-second Spectrograms 38 4.4 AHI Estimation Performance 40 4.4.1 Overall Performance Across All Subjects 40 4.4.2 Performance by Severity Group 45 4.4.3 Comparison of 90-second vs. 135-second Spectrograms 50 4.4.4 Summary of AHI Estimation Results 53 Chapter 5 Discussion 55 5.1 Performance Degradation Caused by Atypical Subject Profiles 55 5.2 Performance Analysis of Object Detection Models 59 5.2.1 Comparison Among Anchor-free Models 59 5.2.2 Anchor-free vs. Anchor-based Detection 65 5.3 Comparison with Existing Literature 69 5.3.1 Comparison with ECG-based Classification Methods 69 5.3.2 Comparison with Multi-modal Approaches 71 5.3.3 Methodological Considerations in Literature Comparison 72 5.4 Clinical Implications and Interpretability 73 5.5 Advantages of the Event-based Detection Approach 76 Chapter 6 Conclusion 81 6.1 Summary of Findings 81 6.2 Limitations 82 6.3 Future Work 84 References 88 Appendix 90

    [1] B. Lechat et al., “Obstructive sleep apnea severity varies by season and environmental influences such as ambient temperature,” Commun Med (Lond), vol. 5, no. 1, p. 314, Jul 29 2025, doi: 10.1038/s43856-025-01016-0.
    [2] A. A. o. S. Medicine. “AHI and beyond: Exploring alternatives to diagnosing OSA severity.” https://aasm.org/ahi-and-beyond-exploring-alternatives-to-diagnosing-osa-severity/ (accessed 21 Dec 2025).
    [3] L. Ye, W. Li, and D. G. Willis, “Facilitators and barriers to getting obstructive sleep apnea diagnosed: perspectives from patients and their partners,” J Clin Sleep Med, vol. 18, no. 3, pp. 835-841, Mar 1 2022, doi: 10.5664/jcsm.9738.
    [4] G. Iannella et al., “The Global Burden of Obstructive Sleep Apnea,” Diagnostics (Basel), vol. 15, no. 9, Apr 25 2025, doi: 10.3390/diagnostics15091088.
    [5] M. A. Secretariat, “Polysomnography in Patients with Obstructive Sleep Apnea: an Evidence Based Analysis,” Ontario Health Technology Assessment Series, vol. 6(13), 2006.
    [6] Y. Zhang, K. Chen, Y. Xu, and H. Wu, “Research progress on the first‐night effect in polysomnography studies,” Sleep Research, vol. 1, no. 1, pp. 19-26, 2024, doi: 10.1002/slp2.12.
    [7] T. M. Penzel, G. B.; Mark, R. G.; Goldberger, A. L.; Peter, J. H., “The apnea-ECG database,” in Proc. Comput, 2000, vol. 27, p. conference paper.
    [8] T. Penzel, J. W. Kantelhardt, L. Grote, J. H. Peter, and A. Bunde, “Comparison of detrended fluctuation analysis and spectral analysis for heart rate variability in sleep and sleep apnea,” IEEE Trans Biomed Eng, vol. 50, no. 10, pp. 1143-51, Oct 2003, doi: 10.1109/TBME.2003.817636.
    [9] J. M. T. Penzel, P. de Chazal, B. Raymond, A. Murray, G. Moody, “Systematic Comparison-of-Different-Algorithms-for-Apnoea-Detection Based on Electrocardiogram Recordings,” IEEE Transactions on Biomedical Engineering, vol. 50, no. 10, pp. 1143–1151, 2003, doi: 10.1109/TBME.2003.817636.
    [10] E. T. Attar, “Detailed evaluation of sleep apnea using heart rate variability: a machine learning and statistical method using ECG data,” Front Neurol, vol. 16, p. 1636983, 2025, doi: 10.3389/fneur.2025.1636983.
    [11] A. A. o. S. Medicine, “The AASM Manual for the Scoring of Sleep and Associated Events,” Darien, IL, USA, 2012.
    [12] C. Song, K. Liu, X. Zhang, L. Chen, and X. Xian, “An Obstructive Sleep Apnea Detection Approach Using a Discriminative Hidden Markov Model From ECG Signals,” IEEE Trans Biomed Eng, vol. 63, no. 7, pp. 1532-42, Jul 2016, doi: 10.1109/TBME.2015.2498199.
    [13] H. Y. Chang, C. Y. Yeh, C. T. Lee, and C. C. Lin, “A Sleep Apnea Detection System Based on a One-Dimensional Deep Convolution Neural Network Model Using Single-Lead Electrocardiogram,” Sensors (Basel), vol. 20, no. 15, Jul 26 2020, doi: 10.3390/s20154157.
    [14] H. Sharma and K. K. Sharma, “Sleep apnea detection from ECG using variational mode decomposition,” Biomed Phys Eng Express, vol. 6, no. 1, p. 015026, Jan 20 2020, doi: 10.1088/2057-1976/ab68e9.
    [15] S. Kim et al., “A Comprehensive Study on a Deep-Learning-Based Electrocardiography Analysis for Estimating the Apnea-Hypopnea Index,” Diagnostics (Basel), vol. 14, no. 11, May 29 2024, doi: 10.3390/diagnostics14111134.
    [16] P. G. T.-Y. Lin, R. Girshick, K. He, and P. Dollár, “Focal Loss for Dense Object Detection,” arXiv preprint, vol. arXiv:1708.02002, February 7, 2018 2018, doi: 10.48550/arXiv.1708.02002.
    [17] Ultralytics. “Explore Ultralytics YOLOv8.” https://docs.ultralytics.com/models/yolov8/ (accessed December 21, 2023).
    [18] Y. Z. e. al., “DETRs Beat YOLOs on Real-time Object Detection,” arXiv preprint, vol. arXiv:2304.08069, April 3, 2024 2024. [Online]. Available: https://arxiv.org/abs/2304.08069.
    [19] R. Lyu. “A Lightweight Anchor-Free Object Detection Framework.” https://github.com/RangiLyu/nanodet (accessed March 2025.
    [20] F. Setiawan and C.-W. Lin, “OSANet: Detection of Obstructive Sleep Apnea Episodes Using a DarkNet-Based Deep Learning Approach and Time-Frequency Spectrogram Features Derived from Single-Lead ECG,” presented at the 2025 IEEE Conference on Computational Intelligence in Bioinformatics and Computational Biology (CIBCB), 2025.
    [21] F. R. Mashrur, M. S. Islam, D. K. Saha, S. M. R. Islam, and M. A. Moni, “SCNN: Scalogram-based convolutional neural network to detect obstructive sleep apnea using single-lead electrocardiogram signals,” Comput Biol Med, vol. 134, p. 104532, Jul 2021, doi: 10.1016/j.compbiomed.2021.104532.
    [22] F. Setiawan and C. W. Lin, “A Deep Learning Framework for Automatic Sleep Apnea Classification Based on Empirical Mode Decomposition Derived from Single-Lead Electrocardiogram,” Life (Basel), vol. 12, no. 10, Sep 27 2022, doi: 10.3390/life12101509.
    [23] S. A. Singh and S. Majumder, “A Novel Approach Osa Detection Using Single-Lead Ecg Scalogram Based on Deep Neural Network,” Journal of Mechanics in Medicine and Biology, vol. 19, no. 04, 2019, doi: 10.1142/s021951941950026x.
    [24] J. Xie, P. Fonseca, J. van Dijk, S. Overeem, and X. Long, “Assessment of obstructive sleep apnea severity using audio-based snoring features,” Biomedical Signal Processing and Control, vol. 86, 2023, doi: 10.1016/j.bspc.2023.104942.
    [25] P. Fonseca et al., “Estimating the Severity of Obstructive Sleep Apnea Using ECG, Respiratory Effort and Neural Networks,” IEEE J Biomed Health Inform, vol. 28, no. 7, pp. 3895-3906, Jul 2024, doi: 10.1109/JBHI.2024.3383240.
    [26] Y. Y. H. Pan, J. Ye, and X. Zhang, “MobileNetV2: A lightweight classification model for home-based sleep apnea screening,” January 3, 2025 2025. [Online]. Available: https://arxiv.org/abs/2412.19967
    [27] J. Xie, P. Fonseca, J. P. van Dijk, S. Overeem, and X. Long, “Multi-modal multi-task deep neural networks for sleep disordered breathing assessment using cardiac and audio signals,” Int J Med Inform, vol. 201, p. 105932, Sep 2025, doi: 10.1016/j.ijmedinf.2025.105932.

    QR CODE