- 1// GlyphCNN
- 2export const project = {
- 3 status: "completed",
- 4 timeline: "2025",
- 5 role: "Solo",
- 6 language: "Python",
- 7 stack: [
- 8 "Python",
- 9 "PyTorch",
- 10 "CNNs",
- 11 "pytest",
- 12 "GitHub Actions",
- 13 ],
- 14};
Pretrained model hits 93.4% accuracy / 0.929 macro-F1; the whole pipeline is reproducible, tested, and CI-checked.
- 93.4% accuracy, 0.929 macro-F1 (pretrained)
- Config-driven, installable, pytest + CI
- Dataset recovered from lost source via rendering
Overview
GlyphCNN classifies heavily-degraded 32×32 binary images of capital letters (21 classes: the alphabet minus D, H, K, X, Z) under random orientation, salt-and-pepper noise and out-of-range pixels. It is a full revamp of one of my first ML projects. The original was a single flat script with hard-coded paths, no tests and no reproducibility; this rebuild is a modular, tested, installable package with a config dataclass describing every run.
The pretrained model scores 93.4% accuracy / 0.929 macro-F1 on recovered glyphs. Because the original raw pixel files were lost, a reconstruction script recovers the 32×32 arrays from 151 surviving matplotlib renders, a convention validated empirically by the pretrained model's score. A single self-contained HTML dashboard renders hero metrics, class gallery, training curves, confusion matrix and every classified sample.
Key features
- 3-conv-block CNN with FC head
- Stratified split, augmentation, early stopping
- Empirically-validated dataset reconstruction
- Single-file interactive results dashboard
Notes
Shows the jump from 'a script that runs' to real ML engineering: reproducibility, testing, packaging and honest reporting.
A PyTorch CNN with a config-dataclass pipeline, plus a non-trivial dataset-recovery step that reconstructs the inputs from rendered images.
An installable package with clear modules (config, data, model, engine, metrics) and legacy code preserved untouched for comparison.