|
Download README.md from AIOmarRehan/PyTorch_Unified_CNN_Model: direct link, hf CLI and curl.
- Browser
- Download file 1.81 kB
-
https://huggingface.co/AIOmarRehan/PyTorch_Unified_CNN_Model/resolve/main/README.md
- Command line
-
hf download hf://AIOmarRehan/PyTorch_Unified_CNN_Model/README.md
-
curl -L -o README.md https://huggingface.co/AIOmarRehan/PyTorch_Unified_CNN_Model/resolve/main/README.md
1.81 kB
metadata
langauge: en
license: mit
tags:
- image-classification
- PyTorch
- VehiclesClassification
- image preprocessing
- Xception
inference: true
datasets:
- AIOmarRehan/Vehicles
spaces:
- AIOmarRehan/CV_Model_Comparison_in_PyTorch
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()