作者
Reeham H. Gabr,Samer M. Sharfo,Rahma S. Zekry,Amer O. Alraee,Mohamed A. Elghobashy,Fatma El-Zahraa M. Labib
摘要
Sleep posture analysis is essential for addressing conditions such as sleep apnea, pressure ulcers, and other posture-related complications. Proper monitoring and timely intervention can significantly improve patient outcomes by preventing these issues. This study presents a robust deep learning model, YOLOv8n, designed to accurately detect patient positions in bed, classified into four key postures: Supine, Prone, To-Left, and To-Right. Trained on a dataset of 4514 images — 3160 for training, 903 for validation, and 451 for testing — the YOLOv8n model achieved exceptional performance, with a precision of 95.2%, a recall of 88.2%, and an [Formula: see text]1-score of 92% during testing. To further assess its robustness, an external dataset of 150 images (100 for validation and 50 for testing) was used, where the model demonstrated strong generalization capabilities, achieving a precision of 83.3%, a recall of 93.5%, and an mAP@0.5 of 93.6%. In the final testing phase, YOLOv8n demonstrated superior performance compared to YOLOv5n, achieving metrics such as precision (95.2% versus 88.2%), recall (88.2% versus 73%), mAP@0.5 (93.7% versus 80.7%), and mAP@0.5:0.95 (68.6% versus 54.0%). This 15.4% improvement in mAP@0.5:0.95 underscores YOLOv8n’s superior accuracy, particularly in challenging postures like Prone and To-Right. These results confirm its reliability and robustness for real-time patient posture detection in diverse conditions. To enhance its practicality, the YOLOv8n model was integrated into a web application developed with the Flask micro web framework. The application provides real-time position detection and features an alert system to notify caregivers when a patient remains in the same posture for more than the medically recommended duration (1–2 h). This integration ensures usability in both clinical and home healthcare environments. In conclusion, YOLOv8n offers a highly accurate, reliable, and practical solution for real-time patient posture monitoring. By outperforming YOLOv5n across all metrics, YOLOv8n emerges as a superior model, well-suited for diverse healthcare applications and capable of improving patient care through timely intervention and effective monitoring.