Egyptian Museum Statue Classifier
ResNet50 fine-tuned to classify 30 artifacts from the Egyptian Museum.
Load
import torch, torch.nn as nn, json
from torchvision import models
from huggingface_hub import hf_hub_download
repo_id = "ahmedelqady88/egyptian-museum-statue-classifier"
weights_path = hf_hub_download(repo_id, "statue_classifier.pth")
classes_path = hf_hub_download(repo_id, "classes.txt")
config_path = hf_hub_download(repo_id, "config.json")
config = json.load(open(config_path))
class_names = [l.strip() for l in open(classes_path)]
model = models.resnet50()
model.fc = nn.Linear(model.fc.in_features, len(class_names))
model.load_state_dict(torch.load(weights_path, map_location="cpu"))
model.eval()