3.1. Quickstart

This guide gets you from zero to a trained model in 5 minutes.

3.1.1. Prerequisites

  • Python 3.10.x installed

  • Tiny ML Tensorlab installed (see Installation)

3.1.2. Step 1: Navigate to ModelZoo

cd tinyml-tensorlab/tinyml-modelzoo

3.1.3. Step 2: Run Hello World Example

./run_tinyml_modelzoo.sh examples/generic_timeseries_classification/config.yaml

This example:

  1. Downloads a simple waveform dataset (sine, square, sawtooth waves)

  2. Applies FFT-based feature extraction

  3. Trains a small classification model (~1K parameters)

  4. Quantizes the model for MCU deployment

  5. Compiles for F28P55 (NPU device)

3.1.4. Step 3: View Results

Training outputs are saved to:

../tinyml-modelmaker/data/projects/generic_timeseries_classification/run/<timestamp>/

Directory Contents:

<timestamp>/
├── training/
│   ├── base/                    # Float32 training
│   │   ├── best_model.pt        # Best model checkpoint
│   │   ├── training_log.csv     # Loss/accuracy history
│   │   └── *.png                # Visualizations
│   └── quantization/            # Quantized model
│       ├── best_model.onnx      # Final ONNX model
│       └── golden_vectors/      # Test data for device
├── testing/                     # Test results
└── compilation/
    └── artifacts/               # Device-ready files
        ├── mod.a                # Compiled model library
        └── tvmgen_default.h     # API header

3.1.5. Step 4: Understand the Config

Open examples/generic_timeseries_classification/config.yaml:

common:
  task_type: generic_timeseries_classification
  target_device: F28P55

dataset:
  dataset_name: generic_timeseries_classification

data_processing_feature_extraction:
  feature_extraction_name: Generic_1024Input_FFTBIN_64Feature_8Frame
  variables: 1

training:
  model_name: CLS_1k_NPU
  batch_size: 256
  training_epochs: 20

testing: {}
compilation: {}

Key parameters:

  • task_type: What ML task to perform

  • target_device: Which MCU to compile for

  • model_name: Which model architecture to use

  • feature_extraction_name: How to preprocess data

3.1.6. Step 5: Try a Different Example

Run the arc fault detection example:

./run_tinyml_modelzoo.sh examples/dc_arc_fault/config.yaml

3.1.7. Expected Results

For the hello world example, you should see:

  • Training accuracy: ~98-100%

  • Quantized accuracy: ~95-100%

  • Model size: ~1K parameters

  • Training time: 1-5 minutes (CPU)

3.1.8. Next Steps