2025
Fall detection on edge hardware
My dissertation. A computer vision model that spots falls from a webcam feed and alerts a carer, built to run on a Raspberry Pi.
- Python
- TensorFlow
- MobileNetV2
- TFLite
- OpenCV
- Grad-CAM
Source on GitHubDemo video on LinkedIn
My dissertation at Bournemouth University, titled Machine Learning Driven IoT System for Assisting Less Able-Bodied Individuals. The idea: a camera in someone's home that notices when they fall and tells a carer, without the person having to press a button or reach a phone.
What it does
A webcam feed is classified frame by frame into five states: idle, sitting, lying, pre-fall and fall. Predictions go into a rolling buffer of the last 15 frames, and an alert only fires when that buffer holds at least three pre-fall frames and at least three fall frames. Lying down on its own never raises an alarm. When it does fire, the interface turns red and an email or SMS (via Twilio) goes to the configured contact.
How the model was built
- Transfer learning on MobileNetV2, chosen because it is small enough to run on a Raspberry Pi once converted to TensorFlow Lite.
- A merged dataset. Frames extracted from three public fall datasets (LE2I, URFD and UP-Fall), plus my own images captured with a multi-camera tool I wrote for the purpose. Augmented, then split 70/15/15 into train, validation and test.
- Two-phase training. 15 epochs with the pretrained base frozen, then fine-tuning from layer 100 upward at a tenth of the learning rate. Class weights and label smoothing kept the rarer classes from being drowned out.
- Grad-CAM heatmaps to check the model was looking at the person, not at something incidental in the background.
Seven iterations
It started as a binary fall/no-fall classifier at 89% accuracy. Adding a pre-fall class dropped that to 82%, because the problem got harder. Moving to the full five classes, growing the dataset and finally balancing it brought the last model to 92% accuracy on 1,736 test images.
Pre-fall reached 0.95 precision, which matters most here: a system that cries wolf gets switched off. Fall recall, at 0.79, is the weakest number and the first thing I would work on next, most likely with skeleton-based pose estimation as a second input.

Stack
TensorFlow and Keras for training, TFLite for inference on the device, OpenCV for capture, Tkinter for the on-screen status, and SMTP or Twilio for alerts. The code, training scripts and every iteration's results are on GitHub.