Downloads · 30 days
0
sharonn18/tgcn-wlasl
tgcn-wlasl is a machine learning model from sharonn18. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A Temporal Graph Convolutional Network (TGCN) model for word-level American Sign Language recognition, trained on the WLASL dataset.
Downloads · 30 days
0
Access
Public
Updated Dec 1, 2025
Repo size
59.2 MB
Likes
2
Public
Click a slice to open those files.
.bin59.2 MB · 100%
From the Hugging Face model README
A Temporal Graph Convolutional Network (TGCN) model for word-level American Sign Language recognition, trained on the WLASL dataset.
This model implements a Temporal Graph Convolutional Network with Multi-Head Attention (TGCN) for recognizing American Sign Language (ASL) signs from pose keypoints. The model processes temporal sequences of 55 body keypoints extracted from sign language videos.
The repository contains 4 pre-trained model variants:
| Model | Classes | Hidden Size | Stages | Checkpoint |
|---|---|---|---|---|
asl100 | 100 | 64 | 20 | checkpoints/asl100/pytorch_model.bin |
asl300 | 300 | 256 | 24 | checkpoints/asl300/pytorch_model.bin |
asl1000 | 1000 | 256 | 24 | checkpoints/asl1000/pytorch_model.bin |
asl2000 | 2000 | 256 | 24 | checkpoints/asl2000/pytorch_model.bin |
pip install torch torchvision numpy
pip install huggingface_hub
from load_from_huggingface import load_tgcn_from_hf
# Load the model
repo_id = "your-username/tgcn-wlasl" # Replace with your repo
model, config = load_tgcn_from_hf(repo_id, model_size="asl2000")
# Model is ready for inference
model.eval()
import torch
from tgcn_model import GCN_muti_att
from configs import Config
from huggingface_hub import hf_hub_download
# Download and load checkpoint
checkpoint_path = hf_hub_download(
repo_id="your-username/tgcn-wlasl",
filename="checkpoints/asl2000/pytorch_model.bin"
)
config_path = hf_hub_download(
repo_id="your-username/tgcn-wlasl",
filename="checkpoints/asl2000/config.ini"
)
# Load config
config = Config(config_path)
# Initialize model
model = GCN_muti_att(
input_feature=config.num_samples * 2, # 50 * 2 = 100
hidden_feature=config.hidden_size, # 256
num_class=2000,
p_dropout=config.drop_p, # 0.3
num_stage=config.num_stages # 24
)
# Load weights
checkpoint = torch.load(checkpoint_path, map_location='cpu')
state_dict = checkpoint.get('state_dict', checkpoint)
model.load_state_dict(state_dict, strict=False)
model.eval()
# Inference
# Input shape: (batch_size, 55, num_samples * 2)
# Example: (1, 55, 100) for 50 frames with x,y coordinates
x = torch.randn(1, 55, 100) # Example input
output = model(x)
predictions = torch.softmax(output, dim=1)
The model expects input in the following format:
Shape: (batch_size, 55, num_samples * 2)
batch_size: Number of samples in batch55: Number of body keypoints (MediaPipe pose format)num_samples * 2: Temporal frames × (x, y) coordinates(batch_size, 55, 100) for 50 framesKeypoint Order: MediaPipe pose keypoints (55 points)
Coordinate System: Normalized (x, y) coordinates per keypoint
The model was trained on the WLASL dataset with the following splits:
The model achieves high accuracy on the WLASL test set:
Note: Exact metrics depend on the specific model variant and test split.
.
├── tgcn_model.py # Model architecture
├── configs.py # Configuration loader
├── checkpoints/ # Pre-trained weights
│ ├── asl100/
│ │ ├── pytorch_model.bin
│ │ └── config.ini
│ ├── asl300/
│ ├── asl1000/
│ └── asl2000/
└── configs/ # Training configurations
├── asl100.ini
├── asl300.ini
├── asl1000.ini
└── asl2000.ini
If you use this model in your research, please cite:
@misc{tgcn-wlasl,
title={TGCN Model for WLASL Sign Language Recognition},
author={Your Name},
year={2024},
howpublished={\url{https://huggingface.co/your-username/tgcn-wlasl}}
}
This model is released under the MIT License.
For questions or issues, please open an issue on the Hugging Face model repository.