A software storable in, and executable by, electronic processing resources (10) and designed to cause, when executed, the electronic processing resources (10) to become configured to real-time predict one or more behavioural states and/or transitions among Awake (W), Drowsiness (D) and Sleep(S) phases of a subject;
- the software is designed to cause, when executed, the electronic processing resources (10) to become configured to:
- receive (20) a biometric signal of a subject from a sensory system (3, 4) through a sensing unit (2) in communication with the electronic processing resources (10);
- process (21-29) the received biometric signal to classify it into one of different classes associated with the one or more behavioural states and/or transitions among Awake (W), Drowsiness (D) and Sleep(S) phases of a subject;
- and
- detect and/or predict (30) a behavioural state and/or a transition among awake (W), Drowsiness (D), and Sleep(S) phases of the subject based on the classified biometric signal,
- the sensory system comprising a wearable sensor (3) and/or a contactless sensor (4) each configured to output respective biometric signals;
- each biometric signal comprises alternatively a subset of a physiological data or a variable derived from said physiological data, the physiological data and/or variable derived from said physiological data comprising values indicative of at least one of cardiac, respiration or eye outputs, conveniently heart rate, heart rate variability, HRV, respiration rate, RR, respiration amplitude, eye blinking or eye gazing;
- the software is characterised in that it is designed to cause, when executed, the electronic processing resources (10) to become configured to:
- compute (24) at least a first one synthetic quantity for and based on the received biometric signal;
- compute (29) at least one threshold for the received biometric signal based on the at least first one synthetic quantity computed therefor;
- and
- classify (29) the biometric signal into one of different classes associated with the one or more behavioural states and/or transitions among awake (W), Drowsiness (D), and Sleep(S) phases based on threshold computed therefor;
- wherein, in order to classify (29) the biometric signal into one of different classes associated with the one or more behavioural states and/or transitions among awake (W), Drowsiness (D), and Sleep(S) phases based on threshold computed therefor, the software is designed to cause, when executed, the electronic processing resources (10) to become configured to:
- compute (29) a drowsiness index (DOD) on the basis of the at least a first one synthetic quantity and the computed threshold;
- and
- classify (29) the received biometric signal into one of different classes based on the computed drowsiness index (DOD);
- and wherein, in order to classify (29) the received biometric signal into one of different classes based on the computed drowsiness index, the software is designed to cause, when executed, the electronic processing resources (10) to become configured to:
- determine that, if the drowsiness index (DOD) is lower than or equal to a predetermined number (w) divided by two, the received biometric signal is classified in a first class (KS1) indicative of the awake (W) phase;
- determine that, if the drowsiness index (DOD) is higher than the predetermined number (w) divided by two and is lower than or equal to the predetermined number (w) divided by two and added to a first parameter (p), the received biometric signal is classified in a second class (KS2) indicative of the drowsy (D) phase;
- determine that, if the drowsiness index (DOD) is higher than the predetermined number (w) divided by two and added to the first parameter (p) and is lower than or equal to the predetermined number (w) divided by two and added to a second parameter (r), the received biometric signal is classified in a third class (KS3) indicative of the drowsy (D) phase;
- and
- determine that, if the drowsiness index (DOD) is higher than the predetermined number (w) divided by two and added to the second parameter (r), the received biometric signal is classified in a fourth class (KS4) indicative of the sleep(S) phase;
- wherein the first and second parameter (p, r) are constant values function of the sensitivity and the specificity of the electronic processing resources (10).