Predicting when someone is about to leave a bed
Many falls in hospitals and aged care happen when a person gets out of bed without help. Most bed alarms only sound once the person has already moved. Using the same fibre-in-the-mattress sensor, I trained a model that predicts the moment of leaving about 30 seconds ahead, giving staff time to respond.
Sarkar et al., Biomedical Optics Express 17(7), 3663 to 3679, 2026 (open access). This work received the ANZCOP Student Prize at the Australian Institute of Physics Congress, 2024.Now: Ready
Watch it: 80 seconds in bed, at double speed
A person rests, then gets up. The plot compares each speckle frame with the one a second earlier. Calm breathing keeps it high; getting up makes it collapse.
Frame-to-frame similarity (ZNCC) over time, in seconds
Press play to start.
This demo is a simplified simulation that runs in your browser, not the trained model. The predicted time shown includes the roughly one-second error reported in the paper, to give a sense of the result.
How it works
The hardest part of training a prediction model is usually the labels: someone has to mark, frame by frame, when each event happened. This system labels its own data.
- Record. The fibre in the mattress produces a speckle video while a person rests and then gets up.
- Label automatically. Zero-normalised cross-correlation (ZNCC) compares each frame with the previous one. The sharp drop when the person leaves marks the exit time, with no manual annotation.
- Compress. Principal component analysis (PCA) reduces each frame to its most informative components.
- Predict. A convolutional neural network learns from the quiet period before the exit and estimates, as a number of seconds, how long until the person gets up.
What we found
- 30 swarning before the person leaves the bed
- ±1 sapproximate error in the predicted time
- 0frames labelled by hand, thanks to automatic ZNCC labelling
One result links the machine learning back to the physics. Prediction accuracy kept improving as more principal components were used, up to about 300, which is close to the number of light paths, or modes, the fibre can carry. In other words, the model needs roughly as many inputs as the fibre has independent channels of information.
Limits and next steps
The study used one participant, leaving from one side of the bed, on a static mattress. Before clinical use, the approach needs testing with more people, different ways of getting up, and beds that move. The open-access paper has the full method and results.