This repository contains code for training and evaluating a Convolutional Neural Network (CNN) model to recognize American Sign Language (ASL) signs in real-time using a webcam.
- Introduction
- Setup
- Training the Model
- Evaluating the Model
- Real-time Detection
- Google Colab Notebook
This project uses a CNN to recognize ASL signs from images. The model is trained on a dataset of ASL images and can be used for real-time recognition through a webcam.
- Python 3.x
- Virtual environment tool (optional but recommended)
- Clone the Repository:
git clone https://github.com/madhu-sv/asl-sign-language-recognition.git cd asl-sign-language-recognition```
- Set Up a Virtual Environment:
python -m venv venv venv\Scripts\activate
- Install Dependencies:
pip install -r requirements.txt
- Clone the Repository:
git clone https://github.com/madhu-sv/asl-sign-language-recognition.git cd asl-sign-language-recognition\
- Set Up a Virtual Environment:
python -m venv venv venv\Scripts\activate
- Install Dependencies:
pip install -r requirements.txt
-
Prepare the Dataset:
- Download the ASL dataset and place it in the
data
directory. - Ensure the directory structure is as follows:
data/ ├── asl_alphabet_train/ └── asl_alphabet_test/
- Download the ASL dataset and place it in the
-
Run the Training Script:
python src/train.py
-
Output:
- The trained model will be saved in the
models
directoryas asl_model.h5
.
- The trained model will be saved in the
-
Run the Evaluation Script:
python src/evaluate.py
-
Output:
- The script will print the test accuracy of the model.
- Run the Real-time Detection Script:
python src/real_time_detection.py
- Note:
- This script uses OpenCV to access the webcam and perform real-time ASL recognition.
- Ensure your webcam is connected and accessible.