Physical Activity Recognition and Tracking of Diabetic Patients using Wearable Sensors
We propose to recognize and track the physical activities performed by a diabetic patient. Apart from taking prescribed medicine regularly, diabetic patients are also strongly advised to do physical activities such as walking or running for a specific amount of time on a daily basis. Most importantl
2025-06-28 16:28:47 - Adil Khan
Physical Activity Recognition and Tracking of Diabetic Patients using Wearable Sensors
Project Area of Specialization Artificial IntelligenceProject SummaryWe propose to recognize and track the physical activities performed by a diabetic patient. Apart from taking prescribed medicine regularly, diabetic patients are also strongly advised to do physical activities such as walking or running for a specific amount of time on a daily basis. Most importantly, the information about these activities such as their intensity and time duration must be reported to the doctors with high accuracy so that the patients can get valuable feedback. This will be done by our proposed system which will automatically recognize and then track the physical activities of a diabetic patient, generate a detailed report about these activities and then send it to the doctor at the end of the day. Nonetheless, the most challenging part of this system is the automatic recognition of physical activities that will be performed by applying machine learning algorithms on the data acquired from the wearable sensors attached to various body organs such as arms and legs.
In order to train and then test machine learning algorithms, sensor data collection is an important step. This will be performed under the supervision of an expert as the time and intensity of a given physical activity is highly dependent upon the gender, age, and other health issues of the subjects. The acquired will then be processed to generate its features and split into train and test sets. The training set will be used to train various machine learning algorithms such as random forest, support vector machine (SVM), and convolutional neural networks (CNN).
The algorithm with the best classification accuracy on the test set will then be selected to recognize and track physical activities in real-time. Consequently, our system will take data from wearable sensors, send it to a Raspberry Pi where the activity will be recognized and tracked in real-time with the help of the trained model. This information will be maintained in a log file which will then be sent to the doctor as a daily report.
Project ObjectivesThe following are the objectives of Physical Activity recognition and tracking of Diabetic Patients using wearable sensors:
- Acquiring data set of physical activities performed by diabetic patients using wearable sensors.
- Read, pre-process and extract features of the sensors data.
- Performance evaluation of machine learning algorithms for physical activity recognition from sensor data.
- Perform real-time activity recognition on Raspberry pi.
- Share the information about the recognized physical activities with the doctor for examination and further recommendations.
The following are the steps for the project implementation:
1. Acquisition of Data
The data is proposed to be collected under the supervision of a doctor along with the help of PARQ (Physical Activity Readiness Questionnaire). The responders are proposed to be divided into two categories based upon their age.
- Group 2: Aging between 18-65+ years
- Group 1: Aging between 5-17 years
2. Data pre-processing
After collecting the data from different responders, it will be pre-processed by applying a time windowing operation. The input signal of a given sensor such as an accelerometer will be sampled for a fixed time such as 2 or 3 seconds.
3. Extracting features from Data
After preprocessing the data, features like mean, standard deviation, and entropy, etc. will be extracted in order to represent that particular signal window in the form of a feature vector. These feature vectors will then be stacked to form the complete data matrix.
4. Performance evaluation of machine learning algorithms
The complete data matrix constructed for each activity will then be used to train and then test the machine learning algorithms to recognize that particular activity. The proposed machine learning algorithms to be evaluated are (but not limited to) k-nearest neighbors (k-NN), logistic regression, support vector machine (SVM), artificial neural network (ANN), and decision trees.
5. Real-time activity recognition and Sending Updates to the Doctor
After acquiring accurate results for physical activity, the patient’s activity will be tracked in real-time using wearable sensors and Raspberry Pi, and the final reports will be sent to the doctor thereby helping him to recommend physical activity to the patient in a more convenient way.
Block Diagram:![]()

The project has a wide scope and great benefits for living a healthy lifestyle. Some of these benefits include:
- Encouraging physical activities in diabetic patients.
- It makes sure that patients with complex diseases or weaker health conditions do not put themselves in danger by excessive physical exercises that are not suitable for their health.
- It monitors the physical activity of Diabetic patients to help them live a healthy lifestyle.
- We have involved medical specialist in our study that will guide us to not only collect the dataset from patients but also check the physical fitness of the patient.
- We use Raspberry Pi for real-time activity recognition and to send daily activity reports of the patient to the nearby doctor.
- Sensors:
- Accelerometer
- Gyroscope
- Magnetometer
- Temperature
- Pressure
- ECG
- Raspberry Pi for Real-time Activity recognition and monitoring of patients.
- System to sending monitoring updates to the nearby doctor.
- Software for Data pre-processing, feature extraction, and activity recognition
- Raspberry Pi based Processing platform
- Linux based OS
- Used for real-time activity recognition
| Item Name | Type | No. of Units | Per Unit Cost (in Rs) | Total (in Rs) |
|---|---|---|---|---|
| Total in (Rs) | 79150 | |||
| MetaMotionR+ | Equipment | 3 | 14950 | 44850 |
| R Wristband | Equipment | 2 | 1600 | 3200 |
| Sleeveband | Equipment | 1 | 2900 | 2900 |
| Velcro Armband | Equipment | 1 | 1500 | 1500 |
| Raspberry Pi 4B 4GB Ram | Equipment | 1 | 17000 | 17000 |
| Exhaust Fan for Raspberry Pi | Miscellaneous | 1 | 500 | 500 |
| 32 GB Micro SD Card | Miscellaneous | 1 | 1600 | 1600 |
| Card Reader | Miscellaneous | 1 | 100 | 100 |
| Other Miscellaneous expenses (Wires, Paper work, print) | Miscellaneous | 1 | 7500 | 7500 |