License Apache 2.0 Static Badge

Visual Wake Words

Overview

Visual Wake Words is a binary image-classification model from the MLPerf Tiny benchmark suite [2]. It addresses a common microcontroller vision use case: deciding whether a person is present in an image or not. The model is based on the MobileNet architecture and is trained by MLCommons on the Visual Wake Words variant of the COCO 2014 dataset. It takes a 96x96 RGB image as input and returns a 2-class probability vector (non-person / person).

This repository contains the pre-quantized int8 TFLite model as published by MLCommons, together with variants compiled for NXP i.MX 8M Plus, i.MX 93, i.MX 95, and i.MX 952 processors.

Key Features

  • Compact MobileNet-based network for 96x96 RGB image classification
  • Binary person / non-person classification
  • ~221.8K parameters, ~15 MOPS
  • int8 quantized (int8 input, int8 output) for accelerated NPU inference on NXP i.MX platforms

Model Description

This repository contains the MLPerf Tiny Visual Wake Words model quantized to int8 and compiled for NXP i.MX 8M Plus, i.MX 93, i.MX 95, and i.MX 952 processors.

Modifications

This model is a derivative work with the following changes from the original:

  • Quantization: The int8 TFLite model (int8 input, int8 output) is provided directly by MLCommons; no local re-quantization or calibration dataset is used.
  • Compilation: Compiled for i.MX 93 with the Arm Ethos-U65 NPU using Vela (tags lf-6.18.20_2.0.0 and lf-6.18.37_2.1.0).
  • Conversion: Converted for i.MX 95 and i.MX 952 with the eIQ Neutron NPU using eIQ Neutron SDK versions 3.1.3, 3.2.1, and 3.2.3.

Original model available at: MLPerf Tiny Visual Wake Words.

Model Information

Information Value
Input shape Color image (1, 96, 96, 3), dtype int8
Input example (Image from the vww_coco2014 dataset)
Output shape Vector of probabilities (1, 2), dtype int8 (dequantize with the output tensor's scale / zero point)
Output example [[0.309 0.691]] -> Top class: person
FLOPS 15 MOPS
Number of parameters 221,794
File size (int8) 326 KB

Output labels are [non-person, person]; see labels.py.

Supported Hardware and Software Configurations

The same information is available in machine-readable form in release_manifest.json.

Asset Runtime Precision HW target BSP & SDK versions Link to asset
i.MX 8M Plus Quantized LiteRT INT8 i.MX 8M Plus - Download
i.MX 93 Precompiled LiteRT INT8 i.MX 93 BSP lf-6.18.20_2.0.0, VELA_TAG = lf-6.18.20_2.0.0 Download
i.MX 93 Precompiled LiteRT INT8 i.MX 93 BSP lf-6.18.37_2.1.0, VELA_TAG = lf-6.18.37_2.1.0 Download
i.MX 95 Precompiled LiteRT INT8 i.MX 95 BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3 Download
i.MX 95 Precompiled LiteRT INT8 i.MX 95 BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1 Download
i.MX 95 Precompiled LiteRT INT8 i.MX 95 BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3 Download
i.MX 952 Precompiled LiteRT INT8 i.MX 952 BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3 Download
i.MX 952 Precompiled LiteRT INT8 i.MX 952 BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1 Download
i.MX 952 Precompiled LiteRT INT8 i.MX 952 BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3 Download

The assets/imx8mplus/vww_96_int8.tflite file is the same model as the host reference asset at assets/quantized_tflite_model/vww_96_int8.tflite (identical sha256); it is run on i.MX 8M Plus through the VeriSilicon NPU delegate without further compilation. The reference copy under assets/quantized_tflite_model/ is host-only (x86) and is used as the input to the Vela and Neutron compilation steps; it is not part of the HW/SW table above.

Limitations and Biases

  • Task scope: The model only performs binary person / non-person classification; it does not localize, count, or identify individual people.
  • Minimum person size: To be reliably detected, a person must occupy at least 2.5% of the overall image area, as specified by the MLPerf Tiny benchmark definition.
  • Input resolution: The model expects a fixed 96x96 RGB input; images must be resized before inference.
  • Dataset bias: The model is trained on the Visual Wake Words variant of COCO 2014, which may not be representative of all camera placements, lighting conditions, demographics, or environments, and can carry over any bias present in the COCO dataset.

Training

The model was trained by MLCommons on the Visual Wake Words variant of the COCO 2014 dataset. NXP did not retrain the model; the int8 TFLite weights are used as published upstream. Training scripts are available on the MLCommons Tiny GitHub page.

Evaluation

example.py is a single-image inference example and does not compute aggregate accuracy metrics. Any quantitative evaluation of this model should be performed with the scripts published on the MLCommons Tiny GitHub page, run against the Visual Wake Words validation split of COCO 2014, using the int8 TFLite model at assets/quantized_tflite_model/vww_96_int8.tflite.

Download and Run

The recipe installs the eIQ Neutron SDK from the NXP eIQ PyPI Distribution Portal. Configure pip once to use it:

python -m pip config --user set global.index https://eiq.nxp.com/repository
python -m pip config --user set global.index-url https://eiq.nxp.com/repository
python -m pip config --user set global.trusted-host eiq.nxp.com
python -m pip config --user set global.extra-index-url https://pypi.org/simple
python -m pip config --user set global.find-links https://eiq.nxp.com/repository/

To download the quantized int8 model and compile the platform-specific variants, run:

bash recipe.sh

The Vela tag and eIQ Neutron SDK version can be passed as positional arguments (defaulting to lf-6.18.20_2.0.0 and 3.2.3 respectively):

bash recipe.sh lf-6.18.37_2.1.0 3.2.3

This generates:

  • assets/quantized_tflite_model/vww_96_int8.tflite - the reference int8 TFLite model (also used on i.MX 8M Plus, at assets/imx8mplus/vww_96_int8.tflite).
  • assets/imx93/<VELA_TAG>/vww_96_int8_vela.tflite - Vela-compiled model for i.MX 93.
  • assets/imx95/<NEUTRON_SDK_VERSION>/vww_96_int8_converted.tflite - Neutron-converted model for i.MX 95.
  • assets/imx952/<NEUTRON_SDK_VERSION>/vww_96_int8_converted.tflite - Neutron-converted model for i.MX 952.

An example of how to run the model on a PC is in example.py:

python example.py -m assets/quantized_tflite_model/vww_96_int8.tflite -i example_input.jpg

example.py accepts -m/--model (default assets/quantized_tflite_model/vww_96_int8.tflite), -i/--input (default example_input.jpg), and an optional -o/--output path to also write the prediction as text. The output labels are listed in labels.py.

Please refer to the i.MX Machine Learning User Guide for details on how to run the models on each i.MX target.

License

This model is released under the Apache License 2.0, the same license as the original MLPerf Tiny Visual Wake Words model.

Citation

If you use this model, please cite both this work and the original model:

@article{chowdhery2019visual,
  title={Visual wake words dataset},
  author={Chowdhery, Aakanksha and Warden, Pete and Shlens, Jonathon and Howard, Andrew and Rhodes, Rocky},
  journal={arXiv preprint arXiv:1906.05721},
  year={2019}
}

@article{banbury2021mlperf,
  title={Mlperf tiny benchmark},
  author={Banbury, Colby and Reddi, Vijay Janapa and Torelli, Peter and Holleman, Jeremy and Jeffries, Nat and Kiraly, Csaba and Montino, Pietro and Kanter, David and Ahmed, Sebastian and Pau, Danilo and others},
  journal={arXiv preprint arXiv:2106.07597},
  year={2021}
}
Downloads last month
148
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collections including nxp/visual-wake-word-imx

Papers for nxp/visual-wake-word-imx