HeartKit Task Modes
Introduction
Rather than offering a handful of static models, HeartKit provides a complete framework designed to cover the entire design process of creating customized ML models well-suited for low-power, wearable applications. Each mode serves a specific purpose and is engineered to offer you the flexibility and efficiency required for different tasks and use-cases.
Each Task
implementes routines for each of the modes: download, train, evaluate, export, and demo. These modes are designed to streamline the process of training, evaluating, exporting, and running task-level demonstrations on the trained models.
Available Modes
- Download: Download specified datasets
- Train: Train a model for specified task and datasets
- Evaluate: Evaluate a model for specified task and datasets
- Export: Export a trained model to TensorFlow Lite and TFLM
- Demo: Run task-level demo on PC or remotely on Ambiq EVB
Download
Download mode is used to download the specified datasets for the task. The routine can be customized via the configuration file or by setting the parameters directly in the code. The download process involves fetching the dataset(s) from the specified source and storing them in the specified directory.
Train
Train mode is used to train a model for the specified task and dataset. In this mode, the model is trained for a given task using the specified dataset(s), model architecture, and hyperparameters. The training process involves optimizing the model's parameters to maximize its performance on the training data.
Evaluate
Evaluate mode is used to test the performance of the model on the reserved test set for the specified task. The routine can be customized via the configuration file or by setting the parameters directly in the code. The evaluation process involves testing the model's performance on the test data to measure its accuracy, precision, recall, and F1 score.
Export
Export mode is used to convert the trained model into a format that can be used for deployment onto Ambiq's family of SoCs. Currently, the command will convert the TensorFlow model into both TensorFlow Lite (TFL) and TensorFlow Lite for micro-controller (TFLM) variants. The command will also verify the models' outputs match.
Demo
Demo mode is used to run a task-level demonstration on the trained model using the specified backend inference engine (e.g. PC or EVB). This is useful to showcase the model's performance in real-time and to verify its accuracy in a real-world scenario.
At-a-Glance
Download specified datasets.
Refer to Download Mode for more details.
Train a model for specified task and dataset(s).
Refer to Train Mode for more details.
Evaluate a model for specified task and dataset(s).
Refer to Evaluate Mode for more details.
Export a trained model to TensorFlow Lite and TFLM.
Refer to Export Mode for more details.
Run task-level demo on PC or EVB.
Refer to Demo Mode for more details.