optdigits_cnn: Verified on the ECS-DoT EVB
Tiny two-convolution CNN for the UCI Optical Recognition of Handwritten Digits dataset (8x8 pixel blocks, 0-16 intensity). Conv3x3 (8x8) then a strided Conv3x3 (4x4), one Linear classifier. Validated on the ECS-DoT EVB.
Compiled with ECS-Compiler in ECS-Studio 1.140.0 and verified on a physical ECS-DoT EVB.
Getting Started
This repository is a ready-to-use model folder for ECS-Compiler, the AI pipeline of ECS-Studio. It holds the ONNX model and its calibration and evaluation data. The verified result was built with the default ECS-Compiler settings; keep them unchanged to reproduce it.
Compile the model
Download the model folder, either from the Files tab of this page or with the Hugging Face CLI:
hf download emass-ai/optdigits_cnn --local-dir optdigits_cnnIn ECS-Studio (1.140.0 or later), open a project for the ECS-DoT EVB, open the ECS-Compiler panel and choose
optdigits_cnn.onnxas the model file. The panel loadsoptdigits_cnn_train.npz(calibration) andoptdigits_cnn_test.npz(evaluation) from the same folder automatically.Click Start Pipeline, then Build and Upload to run the model on the board. The ECS-Compiler User Guide describes each step.
Model Details
| Model type | digit_classification |
| Architecture | Conv3x3 p1 1->16 + BN + ReLU (8x8); Conv3x3 s2 p1 16->32 + BN + ReLU (4x4); Flatten(512); Linear 512->10; Softmax |
| Input | input [1, 1, 8, 8] float32 (8x8 greyscale digit block, 1x8x8 (NCHW)) |
| Preprocessing | x = (count - 4.88) / 6.0 where count is the 0..16 integer pixel value of optdigits; layout NCHW [1,1,8,8] |
| Output | output [1, 10] float32 |
| Labels | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| Model size (float) | 39.7 KB |
| Parameters | 9,930 |
Performance Summary
| Model | Precision | Board | Inference Time | Library Size | Compute Unit |
|---|---|---|---|---|---|
| optdigits_cnn | int8 | ECS-DoT EVB | 1.48 ms | 34.3 KB | DLA + CPU |
Inference time is the measured time of one dla_infer() call on the board (median of 204 runs, ECS-DoT at 50 MHz). Library size is the compiled model library libdla.a (5 layers on the DLA, 1 on the CPU).
On-board verification: Run on 3 real samples. The board's output matched the compiler's expected output exactly, and its prediction matched ONNX Runtime on every sample (cosine similarity 1.0000 or higher). On the 200-sample evaluation set the board (int8) scored 98.50% against 99.00% for the float model on the same samples, and agreed with ONNX Runtime on 199 of 200 samples.
Accuracy
98.78% top-1 accuracy on Optical Recognition of Handwritten Digits (optdigits), official optdigits.tra (3,823) train / optdigits.tes (1,797) test; float accuracy on full 1,797 test (1,797 samples, CC BY 4.0), measured with ONNX Runtime on the float model.
Training Data
- Optical Recognition of Handwritten Digits (optdigits), UCI ML Repository, 1998: https://archive.ics.uci.edu/dataset/80/optical+recognition+of+handwritten+digits (licence: CC BY 4.0).
- Citation: Alpaydin, E. & Kaynak, C. (1998). Optical Recognition of Handwritten Digits. UCI Machine Learning Repository. https://doi.org/10.24432/C50P49
Files
| File | Contents | Download |
|---|---|---|
optdigits_cnn.onnx |
The ONNX model | Download |
optdigits_cnn_train.npz |
Calibration set the board build quantizes with | Download |
optdigits_cnn_test.npz |
Evaluation set | Download |
sample_input.npz |
The real samples run on the board (x, with labels y) |
Download |
LICENSE |
License | Download |
README.md |
This model card | Download |
Intended Use
- This model is provided to evaluate and validate ECS-Compiler and the ECS-DoT. It is not a product and has not been tested for any particular end use.
License
- This model is released under
apache-2.0; seeLICENSE. The training data keeps its own licence (see Training Data).
Provenance
- Verified with ECS-Studio 1.140.0 (ECS-Compiler engine 0.6.0) on the ECS-DoT EVB, 2026-11-17. Build fingerprint
210279fe53f5.