Downloads · 30 days
0
fysiki/resnet50-tiny-imagenet
resnet50-tiny-imagenet is a image classification model from fysiki. Use it when you need a label for an image. It is set up for pytorch.
This model is a ResNet50 trained on the Tiny ImageNet dataset (200 classes).
Downloads · 30 days
0
Access
Public
Updated Nov 10, 2025
Repo size
384 MB
Likes
0
Public
Click a slice to open those files.
.pth96 MB · 100%
From the Hugging Face model README
This model is a ResNet50 trained on the Tiny ImageNet dataset (200 classes).
import torch
from torchvision import models, transforms
from PIL import Image
# Load model
model = models.resnet50(pretrained=False)
model.fc = torch.nn.Linear(model.fc.in_features, 200)
checkpoint = torch.hub.load_state_dict_from_url('your-model-url')
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()
# Prepare image
transform = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
])
# Inference
image = Image.open('image.jpg')
input_tensor = transform(image).unsqueeze(0)
with torch.no_grad():
output = model(input_tensor)
predicted_class = output.argmax(1).item()