diverWayne commited on
Commit
5280dd4
·
verified ·
1 Parent(s): 384cc73

Release v0.1.0 CIFAR-10 CNN baseline

Browse files

Upload v0.1.0 PyTorch checkpoint, metrics, plots, logs, TensorBoard event, and model card. Test accuracy: 0.7857 on uoft-cs/cifar10 plain_text test split.

.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ outputs/confusion_matrix.png filter=lfs diff=lfs merge=lfs -text
37
+ outputs/demo_predictions.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ pipeline_tag: image-classification
4
+ datasets:
5
+ - uoft-cs/cifar10
6
+ metrics:
7
+ - accuracy
8
+ tags:
9
+ - pytorch
10
+ - cnn
11
+ - cifar10
12
+ - image-classification
13
+ - computer-vision
14
+ model-index:
15
+ - name: cnn-cifar10-classifier-v0.1.0
16
+ results:
17
+ - task:
18
+ type: image-classification
19
+ name: Image Classification
20
+ dataset:
21
+ name: CIFAR-10
22
+ type: uoft-cs/cifar10
23
+ config: plain_text
24
+ split: test
25
+ metrics:
26
+ - type: accuracy
27
+ value: 0.7857
28
+ name: Test Accuracy
29
+ ---
30
+
31
+ # cnn-cifar10-classifier v0.1.0
32
+
33
+ Small PyTorch CNN baseline for CIFAR-10 image classification.
34
+
35
+ This release contains the trained v0.1.0 checkpoint from the GitHub project:
36
+
37
+ https://github.com/diverHansun/cnn-cifar10-classifier
38
+
39
+ ## Results
40
+
41
+ | Split | Metric | Value |
42
+ | --- | --- | ---: |
43
+ | test | accuracy | 0.7857 |
44
+
45
+ The checkpoint was selected by best validation/test accuracy during a 20 epoch run.
46
+
47
+ Training summary:
48
+
49
+ - Dataset: `uoft-cs/cifar10`
50
+ - Config: `plain_text`
51
+ - Epochs: 20
52
+ - Batch size: 256
53
+ - Optimizer: SGD, momentum 0.9, weight decay 0.0005
54
+ - Learning rate: 0.01
55
+ - Augmentation: random crop with padding 4, random horizontal flip
56
+ - AMP: enabled
57
+ - GPU used: NVIDIA GeForce RTX 5070 Ti
58
+ - PyTorch: 2.11.0+cu128
59
+
60
+ ## Files
61
+
62
+ ```text
63
+ checkpoints/best_model.pth
64
+ checkpoints/last_model.pth
65
+ outputs/training_metrics.json
66
+ outputs/training_curves.png
67
+ outputs/confusion_matrix.png
68
+ outputs/demo_predictions.png
69
+ logs/train_20260602_044856.log
70
+ logs/evaluate_20260602_045254.log
71
+ logs/demo_20260602_045311.log
72
+ runs/cifar10_cnn_20260602_044901/events.out.tfevents...
73
+ release_summary.json
74
+ manifest.sha256
75
+ ```
76
+
77
+ ## Usage
78
+
79
+ Clone the project code first:
80
+
81
+ ```bash
82
+ git clone git@github.com:diverHansun/cnn-cifar10-classifier.git
83
+ cd cnn-cifar10-classifier
84
+ ```
85
+
86
+ Install dependencies with a CUDA-compatible PyTorch build for your machine, then download this checkpoint:
87
+
88
+ ```bash
89
+ hf download diverWayne/cnn-cifar10-classifier checkpoints/best_model.pth --local-dir .
90
+ ```
91
+
92
+ Evaluate:
93
+
94
+ ```bash
95
+ python evaluate.py --checkpoint checkpoints/best_model.pth --device cuda
96
+ ```
97
+
98
+ Run the demo grid:
99
+
100
+ ```bash
101
+ python demo.py --checkpoint checkpoints/best_model.pth --samples 16 --device cuda
102
+ ```
103
+
104
+ Predict one image:
105
+
106
+ ```bash
107
+ python predict.py --image demo_images/your_image.png --checkpoint checkpoints/best_model.pth --device cuda
108
+ ```
109
+
110
+ ## Limitations
111
+
112
+ This is a simple hand-written CNN baseline trained on CIFAR-10 32x32 images. It supports the 10 CIFAR-10 classes only:
113
+
114
+ ```text
115
+ airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
116
+ ```
117
+
118
+ It can classify arbitrary images after resizing to 32x32, but reliability outside CIFAR-10-like images is limited.
119
+
120
+ The strongest observed confusions are between visually similar categories such as `cat` and `dog`, `bird` and `deer/dog`, and `airplane` and `ship`.
121
+
122
+ ## Dataset
123
+
124
+ The training data is not redistributed in this model repository. It is loaded from the public Hugging Face dataset `uoft-cs/cifar10`.
125
+
checkpoints/best_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0d179becbbe9ec354d73018e8279b546a8fd423e1ae70be99af1fc62dc1ffe6
3
+ size 4972277
checkpoints/last_model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34911e56f2fe22f84ca9f4f384166a15c407658f6b285e1942f1ad4a94cbb3b3
3
+ size 4972277
logs/demo_20260602_045311.log ADDED
@@ -0,0 +1 @@
 
 
1
+ saved demo predictions: /workspace/projects/cnn-cifar10-classifier/outputs/demo_predictions.png
logs/evaluate_20260602_045254.log ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ checkpoint: checkpoints/best_model.pth
2
+ checkpoint epoch: 19
3
+ checkpoint best_acc: 0.7855
4
+ test accuracy: 0.7857
5
+ saved confusion matrix: /workspace/projects/cnn-cifar10-classifier/outputs/confusion_matrix.png
logs/train_20260602_044856.log ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ torch: 2.11.0+cu128
2
+ cuda available: True
3
+ cuda version: 12.8
4
+ selected device: cuda
5
+ gpu count: 1
6
+ gpu 0: NVIDIA GeForce RTX 5070 Ti
7
+ gpu compute capability: sm_120
8
+ torch CUDA arch list: ['sm_75', 'sm_80', 'sm_86', 'sm_90', 'sm_100', 'sm_120']
9
+ cuda probe result: 8.0
10
+ parameters: 620,362
11
+ run: /workspace/projects/cnn-cifar10-classifier/runs/cifar10_cnn_20260602_044901
12
+ best checkpoint: /workspace/projects/cnn-cifar10-classifier/checkpoints/best_model.pth
13
+ last checkpoint: /workspace/projects/cnn-cifar10-classifier/checkpoints/last_model.pth
14
+ epoch 1/20 train_loss=2.1013 train_acc=0.2129 test_loss=1.7602 test_acc=0.3562 best=0.3562
15
+ epoch 2/20 train_loss=1.6477 train_acc=0.3943 test_loss=1.4481 test_acc=0.4711 best=0.4711
16
+ epoch 3/20 train_loss=1.4371 train_acc=0.4795 test_loss=1.2667 test_acc=0.5494 best=0.5494
17
+ epoch 4/20 train_loss=1.3097 train_acc=0.5281 test_loss=1.1753 test_acc=0.5855 best=0.5855
18
+ epoch 5/20 train_loss=1.1900 train_acc=0.5767 test_loss=1.0543 test_acc=0.6230 best=0.6230
19
+ epoch 6/20 train_loss=1.1005 train_acc=0.6092 test_loss=1.0158 test_acc=0.6357 best=0.6357
20
+ epoch 7/20 train_loss=1.0239 train_acc=0.6383 test_loss=0.9475 test_acc=0.6683 best=0.6683
21
+ epoch 8/20 train_loss=0.9602 train_acc=0.6616 test_loss=0.8667 test_acc=0.7035 best=0.7035
22
+ epoch 9/20 train_loss=0.9007 train_acc=0.6841 test_loss=0.8255 test_acc=0.7066 best=0.7066
23
+ epoch 10/20 train_loss=0.8600 train_acc=0.7009 test_loss=0.7960 test_acc=0.7294 best=0.7294
24
+ epoch 11/20 train_loss=0.8172 train_acc=0.7119 test_loss=0.8018 test_acc=0.7216 best=0.7294
25
+ epoch 12/20 train_loss=0.7871 train_acc=0.7234 test_loss=0.7545 test_acc=0.7424 best=0.7424
26
+ epoch 13/20 train_loss=0.7600 train_acc=0.7345 test_loss=0.7226 test_acc=0.7495 best=0.7495
27
+ epoch 14/20 train_loss=0.7326 train_acc=0.7429 test_loss=0.7281 test_acc=0.7494 best=0.7495
28
+ epoch 15/20 train_loss=0.7085 train_acc=0.7540 test_loss=0.7082 test_acc=0.7533 best=0.7533
29
+ epoch 16/20 train_loss=0.6916 train_acc=0.7579 test_loss=0.6807 test_acc=0.7633 best=0.7633
30
+ epoch 17/20 train_loss=0.6694 train_acc=0.7654 test_loss=0.7073 test_acc=0.7568 best=0.7633
31
+ epoch 18/20 train_loss=0.6508 train_acc=0.7712 test_loss=0.6440 test_acc=0.7770 best=0.7770
32
+ epoch 19/20 train_loss=0.6381 train_acc=0.7747 test_loss=0.6354 test_acc=0.7811 best=0.7811
33
+ epoch 20/20 train_loss=0.6157 train_acc=0.7846 test_loss=0.6217 test_acc=0.7855 best=0.7855
34
+ saved training curves: /workspace/projects/cnn-cifar10-classifier/outputs/training_curves.png
35
+ saved metrics: /workspace/projects/cnn-cifar10-classifier/outputs/training_metrics.json
manifest.sha256 ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0b4da6d1f6b6e914fa9d525b857b685dd9a23395c0ce6a12230b33b8a26bcdcd ./README.md
2
+ c0d179becbbe9ec354d73018e8279b546a8fd423e1ae70be99af1fc62dc1ffe6 ./checkpoints/best_model.pth
3
+ 34911e56f2fe22f84ca9f4f384166a15c407658f6b285e1942f1ad4a94cbb3b3 ./checkpoints/last_model.pth
4
+ ff0fc6f2aa3543488448a1c691568dd23a1a24bbc330b307d37489078c4675f2 ./logs/demo_20260602_045311.log
5
+ d70b7ed43f0d2a87d5ba52d6b66fffc32b4b91aa1bfd2bdd32a58ffcfe0eb898 ./logs/evaluate_20260602_045254.log
6
+ afd50fb0dc8bf4a73378d177cb43f253e72fc4e3493627765f9ffb4a69e44378 ./logs/train_20260602_044856.log
7
+ 2886ec553338e6da1bafa3861ef63e45c3de80fff9b2e271f6631b37b68ced85 ./outputs/confusion_matrix.png
8
+ 5a5499e95347c0897cdcc7db798680b7dbb9f186aac94fb80fe7dad928c72a3f ./outputs/demo_predictions.png
9
+ db90ee688d37349b9c32b49bf17751002483977a1a99b9ff18400b8ea76ab4ca ./outputs/training_curves.png
10
+ 44bfd23238c3852e0f95521b3eaf4b63f9526023202e2789a74be240ea4a2176 ./outputs/training_metrics.json
11
+ cc8542a55b06abd39b2c96a944825089dd3684707f3984ee754025eb46ab47f2 ./release_summary.json
12
+ 9e264f7342f7d5dfc2ccbc766de2b475b3f343a5f9d1d166306bf6bc5e95bd13 ./runs/cifar10_cnn_20260602_044901/events.out.tfevents.1780375741.8765c0e10ff8.8624.0
outputs/confusion_matrix.png ADDED

Git LFS Details

  • SHA256: 2886ec553338e6da1bafa3861ef63e45c3de80fff9b2e271f6631b37b68ced85
  • Pointer size: 131 Bytes
  • Size of remote file: 137 kB
outputs/demo_predictions.png ADDED

Git LFS Details

  • SHA256: 5a5499e95347c0897cdcc7db798680b7dbb9f186aac94fb80fe7dad928c72a3f
  • Pointer size: 131 Bytes
  • Size of remote file: 133 kB
outputs/training_curves.png ADDED
outputs/training_metrics.json ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "train_loss": [
3
+ 2.1012727269744875,
4
+ 1.647732571334839,
5
+ 1.4371476556777953,
6
+ 1.3097175415802003,
7
+ 1.1899514984321595,
8
+ 1.1004877404022217,
9
+ 1.0239286506843568,
10
+ 0.9602188570785523,
11
+ 0.9007160757827759,
12
+ 0.8599612341499329,
13
+ 0.8172409128952026,
14
+ 0.7870971046638489,
15
+ 0.7600001029586791,
16
+ 0.7325775894546509,
17
+ 0.7085187640762329,
18
+ 0.6916227349090576,
19
+ 0.669356112689972,
20
+ 0.6508153208732605,
21
+ 0.6380657346725463,
22
+ 0.6156930644035339
23
+ ],
24
+ "train_acc": [
25
+ 0.21292,
26
+ 0.39432,
27
+ 0.47946,
28
+ 0.52808,
29
+ 0.5767,
30
+ 0.60918,
31
+ 0.63826,
32
+ 0.66158,
33
+ 0.6841,
34
+ 0.70088,
35
+ 0.7119,
36
+ 0.72342,
37
+ 0.73452,
38
+ 0.7429,
39
+ 0.75396,
40
+ 0.75792,
41
+ 0.76542,
42
+ 0.77122,
43
+ 0.77468,
44
+ 0.7846
45
+ ],
46
+ "val_loss": [
47
+ 1.760174755859375,
48
+ 1.4480891510009766,
49
+ 1.266711572265625,
50
+ 1.1753166015625,
51
+ 1.054260662841797,
52
+ 1.0157690048217773,
53
+ 0.9475269454956055,
54
+ 0.8667480499267578,
55
+ 0.8255449432373047,
56
+ 0.796046971130371,
57
+ 0.8017741333007813,
58
+ 0.754474397277832,
59
+ 0.7225680871963501,
60
+ 0.7281325637817383,
61
+ 0.7082156867980957,
62
+ 0.6806870323181152,
63
+ 0.7072956486701966,
64
+ 0.6440230610847473,
65
+ 0.6354327146530151,
66
+ 0.6217316284179687
67
+ ],
68
+ "val_acc": [
69
+ 0.3562,
70
+ 0.4711,
71
+ 0.5494,
72
+ 0.5855,
73
+ 0.623,
74
+ 0.6357,
75
+ 0.6683,
76
+ 0.7035,
77
+ 0.7066,
78
+ 0.7294,
79
+ 0.7216,
80
+ 0.7424,
81
+ 0.7495,
82
+ 0.7494,
83
+ 0.7533,
84
+ 0.7633,
85
+ 0.7568,
86
+ 0.777,
87
+ 0.7811,
88
+ 0.7855
89
+ ]
90
+ }
release_summary.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "v0.1.0",
3
+ "repo": "diverWayne/cnn-cifar10-classifier",
4
+ "github": "https://github.com/diverHansun/cnn-cifar10-classifier",
5
+ "dataset": {
6
+ "name": "uoft-cs/cifar10",
7
+ "config": "plain_text",
8
+ "split": "train/test"
9
+ },
10
+ "model": {
11
+ "architecture": "SimpleCNN",
12
+ "parameters": 620362,
13
+ "classes": [
14
+ "airplane",
15
+ "automobile",
16
+ "bird",
17
+ "cat",
18
+ "deer",
19
+ "dog",
20
+ "frog",
21
+ "horse",
22
+ "ship",
23
+ "truck"
24
+ ]
25
+ },
26
+ "training": {
27
+ "epochs": 20,
28
+ "batch_size": 256,
29
+ "optimizer": "SGD",
30
+ "learning_rate": 0.01,
31
+ "momentum": 0.9,
32
+ "weight_decay": 0.0005,
33
+ "seed": 42,
34
+ "amp": true,
35
+ "augment": true
36
+ },
37
+ "environment": {
38
+ "gpu": "NVIDIA GeForce RTX 5070 Ti",
39
+ "torch": "2.11.0+cu128",
40
+ "cuda": "12.8"
41
+ },
42
+ "metrics": {
43
+ "train_loss": 0.6156930644035339,
44
+ "train_accuracy": 0.7846,
45
+ "test_loss": 0.6217316284179687,
46
+ "test_accuracy_from_training": 0.7855,
47
+ "test_accuracy_from_evaluate": 0.7857,
48
+ "best_checkpoint_epoch": 19
49
+ }
50
+ }
runs/cifar10_cnn_20260602_044901/events.out.tfevents.1780375741.8765c0e10ff8.8624.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e264f7342f7d5dfc2ccbc766de2b475b3f343a5f9d1d166306bf6bc5e95bd13
3
+ size 4040