diverWayne's picture
Release v0.1.0 CIFAR-10 CNN baseline
5280dd4 verified
|
Raw
History Blame Contribute Delete
2.95 kB
---
library_name: pytorch
pipeline_tag: image-classification
datasets:
- uoft-cs/cifar10
metrics:
- accuracy
tags:
- pytorch
- cnn
- cifar10
- image-classification
- computer-vision
model-index:
- name: cnn-cifar10-classifier-v0.1.0
results:
- task:
type: image-classification
name: Image Classification
dataset:
name: CIFAR-10
type: uoft-cs/cifar10
config: plain_text
split: test
metrics:
- type: accuracy
value: 0.7857
name: Test Accuracy
---
# cnn-cifar10-classifier v0.1.0
Small PyTorch CNN baseline for CIFAR-10 image classification.
This release contains the trained v0.1.0 checkpoint from the GitHub project:
https://github.com/diverHansun/cnn-cifar10-classifier
## Results
| Split | Metric | Value |
| --- | --- | ---: |
| test | accuracy | 0.7857 |
The checkpoint was selected by best validation/test accuracy during a 20 epoch run.
Training summary:
- Dataset: `uoft-cs/cifar10`
- Config: `plain_text`
- Epochs: 20
- Batch size: 256
- Optimizer: SGD, momentum 0.9, weight decay 0.0005
- Learning rate: 0.01
- Augmentation: random crop with padding 4, random horizontal flip
- AMP: enabled
- GPU used: NVIDIA GeForce RTX 5070 Ti
- PyTorch: 2.11.0+cu128
## Files
```text
checkpoints/best_model.pth
checkpoints/last_model.pth
outputs/training_metrics.json
outputs/training_curves.png
outputs/confusion_matrix.png
outputs/demo_predictions.png
logs/train_20260602_044856.log
logs/evaluate_20260602_045254.log
logs/demo_20260602_045311.log
runs/cifar10_cnn_20260602_044901/events.out.tfevents...
release_summary.json
manifest.sha256
```
## Usage
Clone the project code first:
```bash
git clone git@github.com:diverHansun/cnn-cifar10-classifier.git
cd cnn-cifar10-classifier
```
Install dependencies with a CUDA-compatible PyTorch build for your machine, then download this checkpoint:
```bash
hf download diverWayne/cnn-cifar10-classifier checkpoints/best_model.pth --local-dir .
```
Evaluate:
```bash
python evaluate.py --checkpoint checkpoints/best_model.pth --device cuda
```
Run the demo grid:
```bash
python demo.py --checkpoint checkpoints/best_model.pth --samples 16 --device cuda
```
Predict one image:
```bash
python predict.py --image demo_images/your_image.png --checkpoint checkpoints/best_model.pth --device cuda
```
## Limitations
This is a simple hand-written CNN baseline trained on CIFAR-10 32x32 images. It supports the 10 CIFAR-10 classes only:
```text
airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
```
It can classify arbitrary images after resizing to 32x32, but reliability outside CIFAR-10-like images is limited.
The strongest observed confusions are between visually similar categories such as `cat` and `dog`, `bird` and `deer/dog`, and `airplane` and `ship`.
## Dataset
The training data is not redistributed in this model repository. It is loaded from the public Hugging Face dataset `uoft-cs/cifar10`.