Models Included

This repository provides three different trained PyTorch models for vehicle image classification:

File Name Type Description
best_model_finetuned_full.pt PyTorch .pt Xception model with two-phase transfer learning, fine-tuned on the full dataset. Best generalization and accuracy.
cnn_model_statedict_20260226_034332.pth PyTorch .pth Custom CNN trained from scratch. Baseline performance, high variance on unseen data.
model.safetensors PyTorch safetensors Lightweight unified CNN model, faster loading and inference, safe for sharing and reproducible deployment.

How to Load

PyTorch .pt or .pth:

import torch

# Load full model
model = torch.load("best_model_finetuned_full.pt")
model.eval()

# Or load CNN state dict
cnn_model = CustomCNN(num_classes=7)
cnn_model.load_state_dict(torch.load("cnn_model_statedict_20260226_034332.pth"))
cnn_model.eval()

Safetensors:

from safetensors.torch import load_file

state_dict = load_file("model.safetensors")
model.load_state_dict(state_dict)
model.eval()
Downloads last month

-

Downloads are not tracked for this model. How to track
Safetensors
Model size
5.53M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train AIOmarRehan/PyTorch_Unified_CNN_Model

Space using AIOmarRehan/PyTorch_Unified_CNN_Model 1