PregPose Pal

Overview

PregPose Pal is an intelligent, web-based platform designed to help pregnant women monitor and improve their posture and movement safety using only their mobile phone’s built-in sensors. The system enables users to record their own movement data, train custom machine learning models, and receive real-time feedback and visualizations to help prevent falls and discomfort during pregnancy.

Motivation

Falls and unsafe postures are a significant risk during pregnancy, potentially leading to injury for both mother and baby. Many existing solutions require expensive wearables or are not personalized. PregPose Pal leverages the sensors already present in smartphones to provide a low-cost, accessible, and customizable solution for posture and movement monitoring.

Key Features

  • Personalized Data Collection: Users record their own movement data for a variety of postures using a mobile sensor-logger app, ensuring the system is tailored to their unique body and movement style.
  • Custom Model Training: The platform allows users to train machine learning models (Random Forest by default) on their own data, enabling accurate, individualized posture recognition.
  • Real-Time Feedback: During live prediction, the system provides instant visual cues and phone vibrations when risky postures (like twisting, bending, or quick standing) are detected.
  • Interactive Visualization: Users can view live graphs of sensor data, a pie chart of detected postures, and a timeline of posture changes, all in a modern, animated dashboard.
  • Downloadable History: The system maintains a history of posture changes, which can be downloaded as a CSV for personal tracking or sharing with healthcare providers.
  • Sensitivity Adjustment: Users can fine-tune the sensitivity for each posture class in real time to match their comfort and needs.

Technologies Used

  • Flask: Backend web framework for API and UI rendering.
  • scikit-learn: Machine learning library for model training and prediction.
  • pandas, numpy: Data processing and feature engineering.
  • Chart.js: Frontend visualization for animated, interactive charts.
  • HTML/CSS/JS: Responsive, modern user interface.
  • Sensor Logger App: Third-party mobile app for streaming accelerometer and gyroscope data to the server.

Model Approach

PregPose Pal uses a Random Forest classifier for posture recognition. This model is chosen because it is fast and efficient for medium-sized datasets, robust to noise and outliers (which are common in sensor data), and easy to interpret. Feature importance analysis shows that both gyroscope and accelerometer axes contribute significantly to accurate posture detection.

feature importance from personal data:

Feature Importance
x_gyro 0.207
y_gyro 0.186
y_accel 0.181
x_accel 0.162
z_accel 0.135
z_gyro 0.129

Inputs and Outputs

  • Inputs: Mobile sensor data (accelerometer and gyroscope, x/y/z axes)
  • Outputs: Detected posture class ( bend_forward_down, twisting, quick_stand_sit, normal_sit, normal_stand, normal_walk, asymmetric_movement, normalspeedsit) risky poses: bend_forward_down, twisting, asymmetric_movement,quick_stand_sit

Data and Analysis

  • Personal sample data is available in the labeled_data/ directory.
  • Data analysis and feature importance can be found in pregnancy_pose_analysis.ipynb.
  • The file record_acl_gyro.py contains sample code to check data transfer from the Sensor Logger app to Flask.

Project Impact

PregPose Pal empowers pregnant women to move safely and confidently by providing personalized, real-time posture monitoring and feedback—without the need for expensive hardware or complex setup. The platform is fully web-based, works on any device, and is designed with a modern, accessible, and friendly interface.

Built With

Share this project:

Updates

posted an update

Future updates

We are also planning to keep a separate mobile application which handles the sensor recordings and displays metrics in app!

And also instead of mobile device we can use IMU sensors or any other devices

Log in or sign up for Devpost to join the conversation.