This repository contains Python scripts for hand gesture control using MediaPipe for hand tracking and gesture recognition and Arduino for controlling servo motors and LEDs. The system can recognize gestures performed with the left hand to control a servo motor and gestures with the right hand to control LEDs/AC Appliances.
- Real-time hand tracking using MediaPipe Hands.
- Left-hand gesture control to manipulate a servo motor.
- Right-hand gesture control to change the state of LEDs.
- Recognition accuracy and performance metrics displayed on the screen.
- Data logging and analysis for gesture angles.
- Webcam
- Arduino board
- Servo motor
- LEDs
- Python 3.x
- OpenCV
- Mediapipe
- Pandas
- Pyfirmata
-
Clone the repository:
git clone https://github.com/Jjateen/PTI-mediapipe.git
-
Install the required Python packages:
pip install -r requirements.txt
-
Connect your Arduino board and update the COM port in the script accordingly.
Run the following script to test you environment setup:
python err_test.py
Run the following script to control LEDs/Relay and Servo motor based on hand gestures:
python final_test.py
Detailed explanations of the code and usage can be found in the Wiki.
The hand gesture data is logged and saved to a CSV file (hand_control_data.csv
). You can analyze this data for further insights and improvements.
This project is licensed under the Apache 2.0.
Feel free to contribute by opening issues, proposing new features, or submitting pull requests.