ResNet50 trained on Tiny ImageNet

This model is a ResNet50 trained on the Tiny ImageNet dataset (200 classes).

Model Details

  • Architecture: ResNet50
  • Dataset: Tiny ImageNet (200 classes)
  • Best Validation Accuracy: 44.54%
  • Input Size: 224x224
  • Framework: PyTorch

Usage

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()

Training Details

  • Optimizer: Adam
  • Learning Rate: 0.001
  • Batch Size: 64
  • Epochs: 10
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support