stl10-resnet18 / README.md
kingkenche's picture
Upload README.md with huggingface_hub
0c0a210 verified
metadata
license: mit
tags:
  - image-classification
  - stl10
  - resnet18
  - pytorch
datasets:
  - Chiranjeev007/STL-10_Subset
metrics:
  - accuracy

STL-10 ResNet-18 Classification Model

This model is a fine-tuned ResNet-18 for STL-10 image classification.

Model Details

  • Base Model: ResNet-18 (pretrained on ImageNet)
  • Dataset: STL-10 Subset
  • Classes: 10
  • Accuracy: 0.8400

Class Names

airplane, bird, car, cat, deer, dog, horse, monkey, ship, truck

Usage

import torch
from torchvision import transforms
from PIL import Image

# Load model (implement loading logic)
# model = load_model()

# Define transform
transform = transforms.Compose([
    transforms.Resize((224, 224)),
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
])

# Inference
image = Image.open("path/to/image.jpg")
input_tensor = transform(image).unsqueeze(0)
with torch.no_grad():
    outputs = model(input_tensor)
    predicted_class = torch.argmax(outputs, dim=1)