#Generated using ChatGPT


tags: - image-classification - vision - pytorch - resnet - cifar10 - transfer-learning license: mit library_name: timm

ResNet18 Fine-Tuned on CIFAR-10

Model Overview

This is a fine-tuned ResNet18 model for classifying images into 10 categories from the CIFAR-10 dataset. It was trained using transfer learning on a subset of ImageNet-pretrained weights and optimized for small image classification tasks.

Model Details

  • Model Architecture: ResNet18
  • Pre-trained on: ImageNet
  • Fine-tuned on: CIFAR-10 dataset
  • Number of Classes: 10
  • Input Image Size: 32x32 (resized to 224x224)
  • Framework: PyTorch

Intended Use

This model is intended for:

  • Image classification tasks related to CIFAR-10 categories.
  • Transfer learning demonstration for students and researchers.
  • Educational purposes in computer vision.

Training Data

  • Dataset: CIFAR-10
  • Classes:
    • Airplane
    • Automobile
    • Bird
    • Cat
    • Deer
    • Dog
    • Frog
    • Horse
    • Ship
    • Truck
  • Train/Test Split: 50,000 training images, 10,000 test images.

Training Procedure

  • Preprocessing:
    • Images resized to 224x224
    • Normalized with mean [0.5, 0.5, 0.5] and std [0.5, 0.5, 0.5]
  • Loss Function: CrossEntropyLoss
  • Optimizer: Adam (learning rate: 0.001)
  • Epochs: 5
  • Batch Size: 32
  • Hardware Used: Google Colab GPU (Tesla T4)

Performance

Metric Score
Test Accuracy XX% (Replace with actual)
Loss YY (Replace with actual)

How to Use

You can load the model using torch.hub:

import torch
import torchvision.models as models
import torch.nn as nn

# Load fine-tuned ResNet18 model
model = models.resnet18(pretrained=False)
num_ftrs = model.fc.in_features
model.fc = nn.Linear(num_ftrs, 10)

# Load saved model weights
model.load_state_dict(torch.hub.load_state_dict_from_url(
    'https://huggingface.co/your_username/resnet18-cifar10/resolve/main/resnet18_cifar10.pth',
    map_location=torch.device("cpu")
))
model.eval()
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

Space using raptor1/resnet18-cifar10 1