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.
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.
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_ucihar
In 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.onnx as the model file. The panel loads har_cnn1d_ucihar_train.npz (calibration) and har_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 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 |
| 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.
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.
| 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 |
apache-2.0; see LICENSE. The training data keeps its own licence (see Training Data).55b14550ba2e.har_cnn1d_ucihar_test.npz 923.7 kBhar_cnn1d_ucihar_train.npz 591.3 kBhar_cnn1d_ucihar.onnx 63.9 kBsample_input.npz 14.3 kB