Skip to main content

Baseline CNN

SimpleCNN is the from-scratch reference: if a pretrained model cannot beat it, transfer learning is not helping.

Key results​

59.5%
Balanced accuracy
test set, 2,660 images
67.2%
Accuracy
test set
651,946
Trainable parameters
four conv blocks + MLP head
Provenance. Model scores in this section are copied from the output cells of the AstroVision notebooks (and, for DINOv2 per-class recall, read from an exported figure). The documentation data pack contains no metrics file for them, so they cannot be re-derived from the pack; the cell of origin is listed for each value in _facts/astrovision/FACTS_INDEX.md §3 and shown when hovering over a number.

Architecture​

Input (3, 256, 256)
conv_block(3→32) 2×[Conv3×3 · BN · ReLU] · MaxPool · Dropout2d(0.1) → 128×128
conv_block(32→64) idem → 64×64
conv_block(64→128) idem, Dropout2d(0.2) → 32×32
Conv3×3(128→256) · BN · ReLU · MaxPool → 16×16
AdaptiveAvgPool → Linear(256→256) · ReLU · Dropout(0.4) → Linear(256→10)

The Grad-CAM target layer (gradcam_target) is the 128→256 convolution before global pooling.

Training​

Loss: cross-entropy with label smoothing 0.1; optimiser AdamW (weight decay 1e-4) with a cosine schedule (trainer.train). The notebook trains for 30 epochs at a learning rate of 1e-3; the recorded output is a final 5-epoch continuation at 1e-4 from an epoch-25 checkpoint, whose best validation balanced accuracy is 0.610. The best-validation checkpoint is kept.

Behaviour by class​

SimpleCNN recall per class (test)
0 · Disturbed11%
1 · Merging55%
2 · Round Smooth90%
3 · In-between Round Smooth86%
4 · Cigar Shaped Smooth12%
5 · Barred Spiral68%
6 · Unbarred Tight Spiral63%
7 · Unbarred Loose Spiral61%
8 · Edge-on without Bulge75%
9 · Edge-on with Bulge76%

Smooth and edge-on classes are recognised well, but the model almost ignores two classes: Disturbed (recall 0.11) and Cigar Shaped Smooth (0.12) — the rarest classes. With 651k parameters trained on about 12,400 images, the network cannot learn the minority classes without class re-weighting.

◎
Grad-CAM — SimpleCNN
Grad-CAM — SimpleCNN
Heat maps from the last convolution.
◎
Grad-CAM on test images
Grad-CAM on test images
Results notebook.
◎
Confusion matrices
Confusion matrices
SimpleCNN and EfficientNet-B0, test set.
◎
Worst errors
Worst errors
Most confident misclassifications.