How pranavkumar2911/posture-detection-system-using-machine-learning works
Project Type and Purpose
• This is an embedded machine learning project designed for real-time posture detection on resource-constrained microcontrollers. It uses a BMI270 sensor for capturing inertial data and TensorFlow Lite for executing the ML inference on the device.
• The system is divided into distinct phases: data collection, model training/conversion, and real-time inference (deployment) on the embedded hardware.
Main Components
• Hardware Layer:
– Arduino board (e.g., Arduino Nano 33 BLE Sense or similar), which serves as the primary microcontroller.
– BMI270 sensor connected via I2C for collecting IMU data.
– (Optional) USB connection for programming and powering the board.
• Data Collection Module:
– Represent the Arduino sketch “data_collection.ino” that collects sensor data.
– Indicate that this component connects to the sensor and streams raw sensor data (these data are then saved as CSV in the “data” directory).
• Model Training and Conversion Module:
– The “model_training.ipynb” notebook indicates the Python-based training pipeline.
– Show preprocessing, training, and conversion processes—resulting in the TensorFlow Lite (TFLite) model (shown in the “models” directory as model.tflite).
– You might optionally include the “plots” directory as part of the evaluation/visualization process.
• Inference Deployment Module:
– The Arduino sketch “inference.ino” is responsible for running real-time posture classification using the TFLite model.
• Documentation and Supporting Assets:
– Include ancillary components like README, usage/docs, and additional documentation in the “docs” folder, which help in understanding system setup and usage.
Relationships and Interactions
• Data flows start from the sensor reading captured by “data_collection.ino” running on the Arduino, which is then transferred to a PC for data labeling and saved as Data_Set.csv.
• The training environment (Python/Jupyter Notebook) takes the raw data, preprocesses it, trains the machine learning model, and converts it into a TFLite model.
• Once the model is generated, it is deployed back onto the Arduino using “inference.ino” for real-time prediction.
Architectural Patterns and Design Principles
• A modular design where each major function (data collection, training, inference) is encapsulated in separate modules.
• Demonstrate separation of concerns between offline training (Python notebook) and on-device inference (Arduino sketches).
• Clear integration points where the output of one stage (e.g., the TFLite model) becomes an input to another stage (the inference module).
Relevant Technologies and Tools
• Hardware: Arduino board and BMI270 sensor.
• Software: Arduino IDE (for programming), TensorFlow Lite for Microcontrollers, Python (for model training) and Jupyter Notebook.
• Languages: C++ (for Arduino sketches) and Python (for training).