Event-Based Detection of Obstructive Sleep Apnea Using YOLOv8 and Electrocardiogram Spectrograms
摘要
This research explores the feasibility of utilizing YOLOv8 to detect obstructive sleep apnea (OSA) based on real-time events derived from single-lead electrocardiogram (ECG) data, moving beyond the traditional epoch-based detection methods. The study utilized the National Cheng Kung University Hospital sleep database. To create a balanced dataset, data segmentation was performed at different ratios to balance hypopnea and apnea events. Preprocessing involved generating features using continuous wavelet transform (CWT) with the Morlet wavelet on ECG data, producing spectrogram images with various heat maps for YOLOv8 training. Our preliminary study involved twenty subjects, with plans to increase the sample size in future work. Using the Inferno heatmap, we achieved an F1 score of 74.63% for normal events and 74.37% for apnea and hypopnea events, with mean average precision (mAP) scores 73.8%. These results suggest that our approach is a promising first step towards developing diagnostic tools for OSA detection based on real-time event occurrences using ECG. Unlike existing methods that offer classification or detection based on fixed time windows, our approach allows YOLOv8 to identify hypopnea and apnea events of various durations, demonstrating the model’s capability to differentiate between apnea and normal events more effectively. This study underscores the potential of training YOLOv8 with ECG spectrograms for accurate event-based detection of OSA.