CoolFace
Modelpublic

Tanishrajput/Inception-v1

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Model Card

Inception-v1 (GoogLeNet) CIFAR-10

This repository contains the Inception-v1 (GoogLeNet) model trained on the CIFAR-10 dataset using PyTorch. It achieves 91.21% test accuracy and is ready for inference or fine-tuning.

I hope you find this model useful and easy to integrate into your projects.


Model Description

  • —Architecture: Inception-v1 (GoogLeNet) with auxiliary classifiers
  • —Dataset: CIFAR-10 (10 classes, 60,000 32x32 color images)
  • —Performance: 91.21% test accuracy
  • —Framework: PyTorch
  • —Input: 3x32x32 images (RGB)
  • —Output: Class probabilities for 10 classes: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck

🔗 Links


Usage

Feel free to download and use the model in your own projects. Here's a simple example:

python
import torch
from googlenet_model import GoogLeNetCIFAR  # Make sure this contains the model implementation

# Load the pretrained model
model = GoogLeNetCIFAR(num_classes=10)
model.load_state_dict(torch.load("Inception-v1.pth", map_location=torch.device('cpu')))
model.eval()

# Example inference
from torchvision import transforms
from PIL import Image

transform = transforms.Compose([
    transforms.Resize((32, 32)),
    transforms.ToTensor(),
    transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])

image = Image.open("example_image.png")
input_tensor = transform(image).unsqueeze(0)  # Add batch dimension

output, _, _ = model(input_tensor)  # Main output and auxiliary classifiers
predicted_class = output.argmax(1).item()
print("Predicted Class:", predicted_class)

Training Details

  • —Optimizer: Adam with weight decay 5e-4
  • —Learning Rate Scheduler: StepLR (step=15, gamma=0.1)
  • —Loss Function: CrossEntropyLoss with auxiliary loss weighting
  • —Weight Decay: 5e-4
  • —Batch Size: 128
  • —Epochs: 50
  • —Data Augmentation: Random horizontal flip, normalization

License

This model is released under the MIT License.