Skip to content

Latest commit

Β 

History

History
109 lines (65 loc) Β· 2.28 KB

File metadata and controls

109 lines (65 loc) Β· 2.28 KB

ASL Hand Sign Recognition

This project uses MediaPipe to extract hand landmarks and a Random Forest model to recognize American Sign Language (ASL) alphabet letters. It also includes real-time sign recognition using your webcam.


πŸ“Œ Features

  • Uses the ASL Alphabet dataset from Kaggle
  • Extracts hand landmarks using MediaPipe
  • Trains a Random Forest classifier on landmark data
  • Tests accuracy on validation data
  • Predicts ASL hand signs in real-time via webcam

πŸ›  Requirements

Install the required Python libraries:

pip install mediapipe opencv-python scikit-learn joblib tqdm

πŸš€ How to Use

πŸ“₯ Step 1: Download Dataset

  1. Download the ASL Alphabet Dataset from Kaggle:
    https://www.kaggle.com/datasets/grassknoted/asl-alphabet
  2. Extract it and place it inside a folder named dataset in the root of this project.

Step 2 : Extract the labels from Dataset

python data_extractor.py   

Step 3: Train the Model

Run the training script:

python train.py   

This will train and save the model as asl_model.pkl.

Step 4: Test the Model

Evaluate the model:

python test.py

Step 5: Real-Time Prediction

Start real-time webcam recognition:

python predict.py
  • Ensure your webcam is working.
  • Show your hand clearly in front of the camera.
  • Press q to quit.

βš™οΈ How It Works

  • MediaPipe detects 21 hand landmarks (x, y, z coordinates).
  • These landmarks are used as features.
  • A Random Forest classifier is trained on this feature set to predict ASL letters.
  • OpenCV manages real-time webcam access and display.

πŸ“ Notes

  • The model uses landmark coordinates, not raw images, for better efficiency.
  • For best results: use a clean background and keep your hand visible and centered.
  • Supports static ASL letters (A–Z), excluding motion-based gestures like "J" and "Z".

🀝 Contributing

Pull requests are welcome! Feel free to fork or open an issue.


πŸ“„ License

This project is open-source under the MIT License.


πŸ‘¨β€πŸ’» Author

Vivan Rajath
GitHub: https://github.com/VivanRajath