Downloads · 30 days
0
ketiswp/mlcommons-Streaming-Wakeword-DS-CNN-SpeechCommands-fp32-onnx
mlcommons-Streaming-Wakeword-DS-CNN-SpeechCommands-fp32-onnx is a audio classification model from ketiswp. Use it for the audio classification task on the model card, and read the license before you ship it in a product. It is set up for onnx. The card lists the license as apache-2.0.
FP32 ONNX version of MLCommons Streaming Wakeword DS-CNN Speech Commands for keyword spotting.
Downloads · 30 days
0
Access
Public
Updated Aug 19, 2026
Repo size
1.3 MB
Likes
1
Public
Click a slice to open those files.
.h5684 KB · 37%
From the Hugging Face model README
FP32 ONNX version of MLCommons Streaming Wakeword DS-CNN Speech Commands for keyword spotting.
| File | Purpose | Format |
|---|---|---|
model.onnx | Downloadable converted model | ONNX |
source/model.h5 | Original model | Keras H5 |
graphs/netron.png | ONNX graph visualization | PNG |
mlir/onnx.mlir | ONNX-MLIR import result | MLIR text |
| Item | Value |
|---|---|
| Precision | FP32 |
| ONNX file size | 0.18 MiB |
| Initializer tensors | 16 |
| Stored initializer elements | 46,465 |
| External weight files | None |
| Original format | Keras H5 |
Stored initializer elements includes weights, biases, quantization scales,
zero-points, and other constant tensors. It is not a trainable-parameter count.
pip install huggingface_hub numpy tensorflow
import numpy as np
import tensorflow as tf
from huggingface_hub import hf_hub_download
class LegacyDepthwiseConv2D(tf.keras.layers.DepthwiseConv2D):
def __init__(self, groups=None, **kwargs):
if groups not in (None, 1):
raise ValueError(f"unsupported groups={{groups}}")
super().__init__(**kwargs)
repo_id = "ketiswp/mlcommons-Streaming-Wakeword-DS-CNN-SpeechCommands-fp32-onnx"
model_path = hf_hub_download(repo_id=repo_id, filename="source/model.h5")
model = tf.keras.models.load_model(
model_path,
compile=False,
custom_objects={"DepthwiseConv2D": LegacyDepthwiseConv2D},
)
input_value = np.zeros((1, 30, 1, 40), dtype=np.float32)
output = np.asarray(model(input_value, training=False))
print(output.shape, output.dtype)
pip install huggingface_hub numpy onnxruntime
import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
repo_id = "ketiswp/mlcommons-Streaming-Wakeword-DS-CNN-SpeechCommands-fp32-onnx"
model_path = hf_hub_download(repo_id=repo_id, filename="model.onnx")
options = ort.SessionOptions()
options.intra_op_num_threads = 1
options.inter_op_num_threads = 1
options.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
session = ort.InferenceSession(
model_path,
sess_options=options,
providers=["CPUExecutionProvider"],
)
dtype_by_ort_type = {
"tensor(float)": np.float32,
"tensor(double)": np.float64,
"tensor(float16)": np.float16,
"tensor(int64)": np.int64,
"tensor(int32)": np.int32,
"tensor(int16)": np.int16,
"tensor(int8)": np.int8,
"tensor(uint8)": np.uint8,
"tensor(bool)": np.bool_,
}
feeds = {}
for item in session.get_inputs():
shape = [dim if isinstance(dim, int) and dim > 0 else 1 for dim in item.shape]
feeds[item.name] = np.zeros(shape, dtype=dtype_by_ort_type[item.type])
outputs = session.run(None, feeds)
print([(item.name, value.shape, str(value.dtype))
for item, value in zip(session.get_outputs(), outputs)])
FP32/quantized comparison, conversion results, and reproduction code
This repository also includes the Netron graph, ONNX Dialect MLIR, and static MLIR dependency graph for this model variant.