Abstract
Stroke is a serious illness that affects older adults, especially those with chronic conditions. It occurs when blood flow to a specific part of the brain is interrupted, potentially causing brain damage that can lead to severe disability or even death. Stroke places a significant burden on global healthcare systems due to its high mortality rate. Therefore, this paper presents a system for real-time stroke detection and monitoring based on fog computing and Internet of Medical Things (IoMT) devices, which enable continuous monitoring and facilitate rapid clinical intervention. The suggested strategy includes two primary stages: data preprocessing and stroke detection. Patient face images are collected using a smart camera placed in their rooms. Then, the datasets are transmitted to a fog node in the hospital, where the data preprocessing stage is applied. This stage includes face detection using YOLO v8, followed by image cropping and resizing to retain only patient faces. The second stage is stroke detection using the proposed Convolutional Neural Network (CNN) model, which classifies face images and detects changes. If there is any problem with the patient, alerts are sent to the doctor and his staff. The model efficiency, strength, and reliability are checked using many metrics. The experiment outcomes indicate that the suggested strategy achieves accuracy 99.05% (95% CI; 98.86–99.24), sensitivity 99.42% (95% CI; 99.20 -99.65), specificity 98.70% (95% CI; 98.36–99.04), precision 98.66% (95% CI; 98.29 -99.0), and f1 score 99.04% (95% CI; 98.84–99.28). SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1038/s41598-025-28513-5.