rock_paper_scissors_cnn: Verified on the ECS-DoT EVB
Two-convolution strided CNN that classifies 32x32 greyscale images of a hand showing rock, paper or scissors. A 9x9 stride-2 first convolution brings the map to 12x12, a 3x3 stride-2 convolution to 6x6, then one Linear classifier. Zero-mean weights, BatchNorm folded, ReLU only. 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/rock_paper_scissors_cnn --local-dir rock_paper_scissors_cnnIn ECS-Studio (1.140.0 or later), open a project for the ECS-DoT EVB, open the ECS-Compiler panel and choose
rock_paper_scissors_cnn.onnxas the model file. The panel loadsrock_paper_scissors_cnn_train.npz(calibration) androck_paper_scissors_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 | image_classification |
| Architecture | Conv9x9 s2 1->16 (32->12) + BN + ReLU; Conv3x3 s2 p1 16->48 (12->6) + BN + ReLU; Flatten(1728); Linear 1728->3; Softmax |
| Input | input [1, 1, 32, 32] float32 (greyscale hand image, 1x32x32 (NCHW)) |
| Preprocessing | 300x300 RGB -> luma (PIL convert L) -> 32x32 box (area) downscale -> x = (pixel/255 - 0.4441) / 0.2421 (exact constants in training/vision/rps_train.py output); layout NCHW [1,1,32,32] |
| Output | output [1, 3] float32 |
| Labels | paper, rock, scissors |
| Model size (float) | 53.5 KB |
| Parameters | 13,459 |
Performance Summary
| Model | Precision | Board | Inference Time | Library Size | Compute Unit |
|---|---|---|---|---|---|
| rock_paper_scissors_cnn | int8 | ECS-DoT EVB | 4.44 ms | 37.9 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 100.00% against 100.00% for the float model on the same samples, and agreed with ONNX Runtime on 200 of 200 samples.
Accuracy
100.00% top-1 accuracy on the Rock Paper Scissors dataset, official test split (372 images, CC BY 2.0), measured with ONNX Runtime on the float model. The images are computer-generated hands on a plain white background, so this is an easy benchmark; real photographs with cluttered backgrounds will need more training data.
Training Data
- Rock Paper Scissors, rps.zip / rps-test-set.zip (2020): https://laurencemoroney.com/datasets.html (licence: CC BY 2.0).
- Citation: Laurence Moroney, Rock Paper Scissors Dataset (2019/2020), CC BY 2.0. https://laurencemoroney.com/datasets.html
Files
| File | Contents | Download |
|---|---|---|
rock_paper_scissors_cnn.onnx |
The ONNX model | Download |
rock_paper_scissors_cnn_train.npz |
Calibration set the board build quantizes with | Download |
rock_paper_scissors_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
d39e6394a000.