Downloads · 30 days
49
25% of all-time downloads
katyy2000/arabic-sign-language-recognition
arabic-sign-language-recognition is a machine learning model from katyy2000. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as mit.
This model recognizes Arabic Sign Language (ArSL) gestures using MediaPipe hand landmarks.
Downloads · 30 days
49
25% of all-time downloads
All-time downloads
194
Public
Repo size
302 KB
Likes
1
Public
Click a slice to open those files.
.keras259 KB · 85%
From the Hugging Face model README
This model recognizes Arabic Sign Language (ArSL) gestures using MediaPipe hand landmarks.
Input: 63 features (MediaPipe landmarks)
Dense: 128 units, ReLU, Dropout 0.2
Dense: 64 units, ReLU, Dropout 0.2
Output: Softmax activation
import tensorflow as tf
import numpy as np
import pickle
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(
repo_id="katyy2000/arabic-sign-language-recognition",
filename="asl_mediapipe_new_version.keras"
)
encoder_path = hf_hub_download(
repo_id="katyy2000/arabic-sign-language-recognition",
filename="encoder.pkl"
)
# Load model and encoder
model = tf.keras.models.load_model(model_path)
with open(encoder_path, "rb") as f:
encoder = pickle.load(f)
# Predict
landmarks = np.array([...]).reshape(1, -1) # Your 63 landmark values
prediction = model.predict(landmarks)
predicted_class = encoder.inverse_transform([np.argmax(prediction)])
print(f"Predicted: {predicted_class[0]}")
import tensorflow as tf
import numpy as np
from huggingface_hub import hf_hub_download
# Download TFLite model
tflite_path = hf_hub_download(
repo_id="katyy2000/arabic-sign-language-recognition",
filename="asl_mediapipe_new_version.tflite"
)
# Load interpreter
interpreter = tf.lite.Interpreter(model_path=tflite_path)
interpreter.allocate_tensors()
# Get I/O details
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
# Run inference
landmarks = np.array([...], dtype=np.float32).reshape(1, -1)
interpreter.set_tensor(input_details[0]['index'], landmarks)
interpreter.invoke()
output = interpreter.get_tensor(output_details[0]['index'])
predicted_class_idx = np.argmax(output)
asl_mediapipe_new_version.keras: Main Keras model (~250 KB)asl_mediapipe_new_version.tflite: TFLite model for mobile (~40 KB)encoder.pkl: Label encoder for class namestensorflow>=2.10.0
mediapipe>=0.10.0
numpy>=1.21.0
opencv-python>=4.5.0
MIT License