CoolFace
Modelpublic

abdollahhh/asl-sign-language-efficientnet-b0

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
1likes221downloads
Model Card

๐ŸคŸ ASL Sign Language Recognition โ€” EfficientNet-B0

A fine-tuned EfficientNet-B0 model for recognizing American Sign Language (ASL) alphabet letters from images. Achieves 99.02% accuracy on the evaluation set.

Model Details

PropertyValue
Base Modelgoogle/efficientnet-b0 (ImageNet pretrained)
Parameters4,040,854 (~15.6MB)
Input Size224ร—224 RGB images
Classes26 (A-Z ASL alphabet letters)
Inference Speed<10ms/frame on GPU, ~30ms on CPU

Training

HyperparameterValue
Learning Rate2e-4
Batch Size16
Epochs5
OptimizerAdamW
LR SchedulerCosine
Weight Decay1e-4
Warmup Ratio5%

Training Results

EpochEval AccuracyEval Loss
189.45%0.405
297.67%0.096
398.28%0.056
498.71%0.047
599.02%0.036

Data Augmentation

  • โ€”RandomResizedCrop (scale 0.8-1.0)
  • โ€”RandomHorizontalFlip (p=0.3)
  • โ€”RandomRotation (ยฑ15ยฐ)
  • โ€”ColorJitter (brightness=0.3, contrast=0.3, saturation=0.2, hue=0.1)

Usage

python
from transformers import pipeline

classifier = pipeline("image-classification", model="abdollahhh/asl-sign-language-efficientnet-b0")
result = classifier("path/to/hand_sign.jpg")
print(result)
# [{'label': 'A', 'score': 0.98}, ...]

Manual inference

python
from transformers import AutoImageProcessor, AutoModelForImageClassification
from PIL import Image
import torch

processor = AutoImageProcessor.from_pretrained("abdollahhh/asl-sign-language-efficientnet-b0")
model = AutoModelForImageClassification.from_pretrained("abdollahhh/asl-sign-language-efficientnet-b0")
model.eval()

image = Image.open("hand_sign.jpg")
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits

predicted_class = logits.argmax(-1).item()
label = model.config.id2label[str(predicted_class)]
print(f"Predicted: {label}")

Live Demo

Try the real-time webcam demo: ASL Sign Language Recognition Space

Dataset

Trained on Marxulia/asl_sign_languages_alphabets_v03:

  • โ€”10,873 images total (9,242 train / 1,631 eval)
  • โ€”26 classes: A through Z
  • โ€”Stratified 85/15 train/eval split

Limitations

  • โ€”Trained on controlled studio images โ€” may have reduced accuracy with varied backgrounds/lighting
  • โ€”Only recognizes static letter signs (A-Z), not dynamic gestures (J, Z involve motion)
  • โ€”Works best with a clean hand against a neutral background