har_cnn1d_ucihar: Verified on the ECS-DoT EVB
A small 1-D convolutional network (three Conv-BN-ReLU blocks with stride 2, then one Linear classifier) that recognises six daily activities from the raw 9-channel inertial signals of the UCI HAR smartphone dataset (128-sample windows at 50 Hz). It is trained with zero-mean (weight-standardised) filters and compiled with ECS-Compiler for the EVB DLA; board int8 results match the float model on the 200-sample evaluation set.
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/har_cnn1d_ucihar --local-dir har_cnn1d_uciharIn ECS-Studio (1.140.0 or later), open a project for the ECS-DoT EVB, open the ECS-Compiler panel and choose
har_cnn1d_ucihar.onnxas the model file. The panel loadshar_cnn1d_ucihar_train.npz(calibration) andhar_cnn1d_ucihar_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 | activity_classification |
| Architecture | input [1,9,1,128] -> Conv(9->16,k=(1,5),s=(1,2)) BN ReLU -> Conv(16->32,(1,5),s2) BN ReLU -> Conv(32->48,(1,5),s2) BN ReLU -> Flatten(768) -> Linear(768->6) [Softmax optional on CPU] |
| Input | input [1, 9, 1, 128] float32 (9 inertial channels (body_acc xyz, body_gyro xyz, total_acc xyz) x 128 time steps, laid out as [N,C,1,T]) |
| Preprocessing | Use the dataset's pre-windowed Inertial Signals as is (50 Hz, 2.56 s, 50% overlap; acc in g, gyro in rad/s, already low-pass filtered). Normalise per channel: x=(x-mean)/std with mean=[-0.000636,-0.000292,-0.000275,0.000506,-0.000824,0.000113,0.804750,0.028755,0.086498], std=[0.194846,0.122428,0.106878,0.406814,0.381854,0.255742,0.414112,0.390995,0.357768] (train-set statistics, channel order as listed) |
| Output | output [1, 6, 1, 1] float32 |
| Labels | WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING |
| Model size (float) | 62.4 KB |
| Parameters | 15,670 |
Performance Summary
| Model | Precision | Board | Inference Time | Library Size | Compute Unit |
|---|---|---|---|---|---|
| har_cnn1d_ucihar | int8 | ECS-DoT EVB | 1.81 ms | 40.4 KB | DLA |
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 (7 layers on the DLA, 0 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 0.9990 or higher). On the 200-sample evaluation set the board (int8) scored 95.50% against 95.50% for the float model on the same samples, and agreed with ONNX Runtime on 200 of 200 samples.
Accuracy
93.59% top-1 accuracy on Human Activity Recognition Using Smartphones (UCI HAR), official subject-wise split: 7352 train windows (21 subjects), 2947 test windows (9 subjects) (2,947 samples, CC BY 4.0), measured with ONNX Runtime on the float model.
Training Data
- Human Activity Recognition Using Smartphones (UCI HAR), UCI ML Repository id 240: https://archive.ics.uci.edu/dataset/240/human+activity+recognition+using+smartphones (licence: CC BY 4.0).
- Citation: Anguita, D., Ghio, A., Oneto, L., Parra, X., Reyes-Ortiz, J.L. (2013). A Public Domain Dataset for Human Activity Recognition Using Smartphones. 21st European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN 2013), Bruges, Belgium.
Files
| File | Contents | Download |
|---|---|---|
har_cnn1d_ucihar.onnx |
The ONNX model | Download |
har_cnn1d_ucihar_train.npz |
Calibration set the board build quantizes with | Download |
har_cnn1d_ucihar_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
55b14550ba2e.