Skip to content

DevHeadsCommunity/gestures-with-freeRTOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Gesture Recognition with AI on FreeRTOS

This project demonstrates a gesture recognition application using machine learning (ML) and artificial intelligence (AI) on an embedded system powered by FreeRTOS. The application utilizes sensor data from accelerometers and gyroscopes to recognize user gestures in real-time, leveraging TensorFlow Lite for Microcontrollers to perform ML inference on-device.

To-Do Features

  • Gesture Recognition: Detect and classify gestures, such as swipes, taps, and rotations, based on sensor input.
  • Real-Time Processing: Use FreeRTOS to ensure that sensor data collection, ML inference, and output processing are handled efficiently and predictably.
  • Optimized for Embedded Systems: Implement TensorFlow Lite for Microcontrollers to run lightweight, optimized ML models on resource-constrained devices.

Application Overview

The application is divided into several tasks managed by FreeRTOS:

  • Sensor Data Collection Task: Reads data from accelerometer and gyroscope sensors, providing input for gesture recognition.
  • Data Pre-processing Task: Cleans and normalizes the sensor data, extracting features required by the ML model.
  • Gesture Recognition Task (ML Inference): Runs the TensorFlow Lite model to classify the gesture based on the pre-processed data.
  • Output Processing Task: Triggers appropriate responses based on the recognized gesture, such as sending commands or updating displays.

Getting Started

Hardware Requirements

  • Microcontroller with accelerometer and gyroscope sensors (e.g., STM32, MIMXRT1060)
  • Debugging and programming tool compatible with the microcontroller (e.g., J-Link, ST-Link)

Software Requirements

Setup Instructions

  1. Clone the Repository:

  2. Configure FreeRTOS: Set up FreeRTOS in your development environment, configuring task priorities and stack sizes to support sensor polling, ML inference, and output tasks.

  3. Add TensorFlow Lite for Microcontrollers: Import the TensorFlow Lite for Microcontrollers library, ensuring compatibility with your microcontroller.

  4. Build and Flash: Compile the project and flash it to your microcontroller using your chosen development environment.

Model Training

This application uses a pre-trained model to recognize gestures. To create or customize the model:

  1. Data Collection: Capture accelerometer and gyroscope data for each gesture and label it.
  2. Model Training: Use TensorFlow or another ML framework to train a model on your labeled data. Export the model in a TensorFlow Lite format compatible with microcontrollers.
  3. Deployment: Integrate the trained model into the project, typically by including it as a .tflite file within the embedded codebase.

Usage

  1. Perform a Gesture: Use a swipe, tap, or rotation motion.
  2. Real-Time Recognition: The application will classify the gesture in real-time.
  3. Response Handling: The application will trigger predefined responses based on the recognized gesture, such as activating a device or displaying information.

Future Directions

This application serves as a foundation for embedded AI applications. Future improvements could include:

  • Multi-sensor integration for enhanced recognition accuracy.
  • Expanding gesture vocabulary.
  • Optimizing model size and processing time for more constrained devices.

Contributing

Contributions are welcome! Please submit a pull request or open an issue for feature requests and bug reports.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published