Skip to content

Sleep Detection Model

Model Overview

The following table provides the latest pre-trained models for sleep detection. Below we also provide additional details including training configuration, accuracy metrics, and hardware performance results for the models.

NAME LOCATION # CLASSES MODEL PARAMS FLOPS ACCURACY AP
SD-2-TCN-SM Wrist 2 TCN 9K 1.5M/hr 95.9% 94.5%

Model Details

The SD-2-TCN-SM model is a 2-stage sleep detection model that uses a Temporal Convolutional Network (TCN) architecture. The model is trained on accelerometer sensor data collected from the wrist and is able to classify sleep and wake stages.

  • Location: Wrist
  • Classes: Awake, Sleep
  • Frame Size: 2 hours
  • Datasets: MESA
  • Features: FS-W-A-5

Model Performance

Confusion Matrix

The confusion matrix provides a detailed breakdown of the model's performance on the test set. The rows represent the true labels, while the columns represent the predicted labels. The diagonal elements represent the number of correct predictions for each class, while the off-diagonal elements represent the number of incorrect predictions.

Sleep Efficiency Plot

The following plot shows the model's performance in detecting sleep efficieny- percentage of time spent asleep while in bed. The x-axis represents the true sleep efficiency, while the y-axis represents the predicted sleep efficiency.

Total Sleep Time (TST) Plot

The following plot shows the model's performance in detecting total sleep time (TST). The x-axis represents the true TST, while the y-axis represents the predicted TST. The plot shows a strong correlation between the true and predicted TST values.


EVB Performance

The following table provides the latest performance results when running on Apollo4 Plus EVB. These results are obtained using neuralSPOTs Autodeploy tool. From neuralSPOT repo, the following command can be used to capture EVB results via Autodeploy:

python -m ns_autodeploy \
--tflite-filename model.tflite \
--model-name model \
--cpu-mode 192 \
--arena-size-scratch-buffer-padding 0 \
--max-arena-size 60 \
Name Params FLOPS Metric Time Arena Energy
SD-2-TCN-SM 9K 1.5M/hr 94.5% AP 61ms/hr 34KB 586uJ/hr

Downloads

Asset Description
configuration.json Configuration file
model.keras Keras Model file
model.tflite TFLite Model file
metrics.json Metrics file