pgoel90/Palm-Rehabilitation-Trainer
0
Hand Rehabilitation System
An intelligent hand rehabilitation system that uses computer vision and machine learning to provide real-time feedback on hand exercises. This system helps patients perform rehabilitation exercises correctly with instant feedback on their form and technique.
Features
- Real-time Hand Detection: Uses MediaPipe for accurate hand landmark detection
- Exercise Classification: Machine learning model trained to recognize 8 different hand exercises
- Instant Feedback: Provides real-time feedback on exercise form and technique
- Reference Images: Shows proper form for each exercise
- Multiple Exercise Support: Supports 8 different rehabilitation exercises
Supported Exercises
- Ball Grip (Wrist Down): Squeeze a ball with wrist positioned down
- Ball Grip (Wrist Up): Squeeze a ball with wrist positioned up
- Pinch: Bring thumb and index finger together in a pinching motion
- Thumb Extend: Extend thumb while keeping other fingers in position
- Opposition: Touch thumb to each finger tip sequentially
- Extend Out: Extend all fingers outward
- Finger Bend: Bend all fingers inward
- Side Squeezer: Squeeze between index and middle fingers
Technology Stack
- Frontend: Streamlit
- Computer Vision: OpenCV, MediaPipe
- Machine Learning: Scikit-learn, Random Forest Classifier
- Image Processing: PIL (Pillow)
- Data Handling: Pandas, NumPy
How to Use
- Position Your Hand: Place your hand in front of the camera with good lighting
- Start Detection: Check the "Run Hand Detection" box
- Perform Exercises: Follow the reference images and perform the exercises
- Get Feedback: View real-time feedback on your form and technique
- Switch Exercises: The system automatically detects and switches between exercises
Model Information
- Algorithm: Random Forest Classifier
- Features: Hand landmark distances and angles (42 features)
- Training Data: Hand landmark data from various exercise positions
- Accuracy: Model provides real-time classification with confidence scores
File Structure
Palm-Rehabilitation-Trainer/
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── Dockerfile # Container configuration
├── README.md # Project documentation
└── src/ # Source code modules
├── models/ # Machine learning models
├── feedback/ # Exercise feedback functions
└── utils/ # Utility functionsSetup and Installation
- Clone the repository
- Install dependencies:
pip install -r requirements.txt - Run the application:
streamlit run app.py
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
Support
For support and questions, please open an issue on the GitHub repository.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
