Marxulia/asl_sign_languages_alphabets_v03
Viewer • Updated • 10.9k • 74 • 9
How to use abdollahhh/asl-sign-language-efficientnet-b0 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="abdollahhh/asl-sign-language-efficientnet-b0")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("abdollahhh/asl-sign-language-efficientnet-b0")
model = AutoModelForImageClassification.from_pretrained("abdollahhh/asl-sign-language-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.
| Property | Value |
|---|---|
| Base Model | google/efficientnet-b0 (ImageNet pretrained) |
| Parameters | 4,040,854 (~15.6MB) |
| Input Size | 224×224 RGB images |
| Classes | 26 (A-Z ASL alphabet letters) |
| Inference Speed | <10ms/frame on GPU, ~30ms on CPU |
| Hyperparameter | Value |
|---|---|
| Learning Rate | 2e-4 |
| Batch Size | 16 |
| Epochs | 5 |
| Optimizer | AdamW |
| LR Scheduler | Cosine |
| Weight Decay | 1e-4 |
| Warmup Ratio | 5% |
| Epoch | Eval Accuracy | Eval Loss |
|---|---|---|
| 1 | 89.45% | 0.405 |
| 2 | 97.67% | 0.096 |
| 3 | 98.28% | 0.056 |
| 4 | 98.71% | 0.047 |
| 5 | 99.02% | 0.036 |
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}, ...]
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}")
Try the real-time webcam demo: ASL Sign Language Recognition Space
Trained on Marxulia/asl_sign_languages_alphabets_v03:
Base model
google/efficientnet-b0