O1 -- Foundation Classification + Knowledge Distillation
97.87% Macro-F1 -- statistically ties its 27.87M-param teacher (p=0.52) at 1/7th the parameters. Multi-seed testing found teacher selection, not the loss-function tweak, drives most of the gain -- full story linked below.
What's in this folder
O1/
βββ og_models/ <- original PyTorch .pt checkpoints, organized by task
βββ onnx_models/ <- same checkpoints exported to ONNX (framework-independent)
βββ results_csv/ <- training history, significance testing, and summary CSVs from every Kaggle source
βββ sample_images/ <- a few real test images to try inference with
βββ mapping.json <- machine-readable index of every checkpoint
βββ MAPPING.md <- human-readable version of the same
βββ infer_example.py <- reference script: load an ONNX model, run a real prediction
βββ test_inference.py <- test harness: runs every ONNX model against the sample set,
β reports accuracy against ground truth
βββ requirements.txt <- minimal deps to run both scripts
102 checkpoints across 4 task categories: cnn_baselines, kd_students, vit_models (all from
the original fixed-5-epoch-budget study), and convergence_checkpoints (new, 2026-09/10 -- the same
recipes retrained to actual convergence with early stopping, to check whether 5 epochs had already
converged; not yet exported to ONNX). See MAPPING.md's convergence_checkpoints section for the
headline results: convergence training significantly beats the 5-epoch budget on every model tested
(9 of 10 comparisons significant, p<0.05 to p<1e-24), resolves this project's previously-open
SE-ResNet-50 anomaly (94.23% vs. 80.49% Macro-F1, McNemar p=1.8e-83, vs. GrainSet's own published
96.10%), and found the single largest convergence gain anywhere in the project on the plain
EfficientNet-B0 baseline (+10.41pp, 88.14% -> 98.55%, p=7.2e-25) -- a caution flag for any KD-method
comparison measured against that baseline.
Note: val_macro_f1 in MAPPING.md is only available for 57/82 of the original checkpoints -- not every training run saved it inside the checkpoint file itself. A missing value doesn't mean the checkpoint is untested, just that this one number isn't recorded in the file. The 10 convergence_checkpoints instead report test_macro_f1 in mapping.json (measured directly, not pulled from the checkpoint file).
Preprocessing (verified against the actual training notebooks, not assumed)
- Resize to 224x224, RGB
- Normalize with mean=[0.308562, 0.251994, 0.187898], std=[0.240441, 0.197289, 0.149387] (dataset-specific stats computed from GrainSet -- NOT generic ImageNet stats)
- Class order: ['NOR', 'F&S', 'SD', 'MY', 'AP', 'BN', 'HD', 'IM'] (index 0-7, argmax of the model output = this index)
Quick start
pip install -r requirements.txt
python infer_example.py # single model, single image demo
python test_inference.py # every model vs. the full sample set, with accuracy
See MAPPING.md for the full checkpoint list, architecture, and validation Macro-F1 per file.
Full results and discussion
../../O1 context folder/LAtest ccontext/05_o1_full_story_results_and_assessment.md -- the complete write-up this headline number comes from (plain path, not a clickable link -- the project's folder names have spaces in them).
../../SUMMARY.md has the whole project's overview across all 4 objectives.