Downloads · 30 days
0
Irgenija/sign_language_resnet50
sign_language_resnet50 is a image classification model from Irgenija. Use it when you need a label for an image.
This model with transfer learning is trained to recognise Sign Language. The model was trained on the basis of ResNet50. The dataset was used for training https://huggingface.co/datasets/aliciiavs/signlanguageimagedat…
Downloads · 30 days
0
Access
Public
Updated Sep 2, 2024
Repo size
94.6 MB
Likes
0
Public
Click a slice to open those files.
.pth94.6 MB · 100%
From the Hugging Face model README
This model with transfer learning is trained to recognise Sign Language. The model was trained on the basis of ResNet50. The dataset was used for training https://huggingface.co/datasets/aliciiavs/sign_language_image_dataset
In model.py file you can find class of custom model.
For using model you need download model.py, import from it class CustomResNetModel,
create an example of this class and load and apply model weight from file
sign_language_resnet50.pth
Model's metrics: loss: 0.5739429252889922 accuracy: 0.901717
import torch
from huggingface_hub import hf_hub_download
from model import CustomResNetModel
device = "cuda" if torch.cuda.is_available() else "cpu"
model = CustomResNetModel(num_classes=24)
weight_path = hf_hub_download(
repo_id="Irgenija/sign_language_resnet50",
filename="sign_language_resnet50.pth",
)
if cls.device == "cpu":
checkpoint = torch.load(
weight_path, map_location=torch.device("cpu")
)
else:
checkpoint = torch.load(weight_path)
model.load_state_dict(checkpoint)
model = model.to(device) # Optional
model.eval()