Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

American Sign Language Alphabet Detection in Real Time using OpenCV-Mediapipe with EfficientNetB0 in PyTorch

License

Notifications You must be signed in to change notification settings

LuluW8071/ASL-Alphabet-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

American Sign Language Detection using EfficientNetB0

This project uses the EfficientNetB0 CNN architecture for image classification of the American Sign Language (ASL) alphabet and 0-9 digits, with real-time detection support.

Usage

1. Install Dependencies

Install all required libraries from the requirements.txt file:

pip install -r requirements.txt

2. Download Dataset

Download and extract the ASL dataset using the following command:

gdown https://drive.google.com/uc\?id\=1b0-MLad_AcVvbocCk7RUB2XH5Xbr7L3x
sudo apt install rar
unrar asl.rar

3. Train the Model

Before training, set up the COMET_API_KEY in a .env file inside the neuralnet directory to log metrics.

To train the model, run:

python3 ASL-Alphabet-Detection/neuralnet/train.py

Hyperparameter configurations are available in train.py.

4. Run the Demo

To run the real-time detection demo:

python3 detect.py

Note: If you don't have a webcam, you can use the DroidCam app to turn your mobile phone into a webcam. Logs will be saved in the action_handler.log file.

5. Pre-trained Model

You can use the pre-trained model best_model.pth located in the assets/ directory to perform inference.

Experiment Results

Loss Curves Accuracy Curves
Loss Accuracy

The best model was selected based on the highest test accuracy and was trained for 25 epochs, with the best results at epoch 22.

Train Loss Test Loss Train Accuracy Test Accuracy
0.052 0.028 0.984 0.990

Note

Since the number of class labels was large and the test set was randomly sampled, not all labels were included in the evaluation. As a result, some labels may be missing from the confusion matrix.

Confusion Matrix
alt text

Feel free to report any issues you encounter.
Don't forget to ⭐ the repo!

About

American Sign Language Alphabet Detection in Real Time using OpenCV-Mediapipe with EfficientNetB0 in PyTorch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published