Skip to content

Commit

Permalink
Merge pull request #7 from ARM-software/ds_cnn_large_clustered
Browse files Browse the repository at this point in the history
Added DS-CNN Large Clustered
  • Loading branch information
tom-arm authored Jan 28, 2021
2 parents f1dd452 + d636ceb commit 9f8f356
Show file tree
Hide file tree
Showing 11 changed files with 214 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MODEL_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
| [DNN Large INT8](models/keyword_spotting/dnn_large/tflite_int8) | INT8 | TensorFlow Lite |
| [DNN Medium INT8](models/keyword_spotting/dnn_medium/tflite_int8) | INT8 | TensorFlow Lite |
| [DNN Small INT8](models/keyword_spotting/dnn_small/tflite_int8) | INT8 | TensorFlow Lite |
| [DS-CNN Clustered FP32](models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32) | FP32 | TensorFlow Lite |
| [DS-CNN Clustered INT8](models/keyword_spotting/ds_cnn_large/tflite_clustered_int8) | INT8 | TensorFlow Lite |
| [DS-CNN Large INT8](models/keyword_spotting/ds_cnn_large/tflite_int8) | INT8 | TensorFlow Lite |
| [DS-CNN Medium INT8](models/keyword_spotting/ds_cnn_medium/tflite_int8) | INT8 | TensorFlow Lite |
| [DS-CNN Small INT8](models/keyword_spotting/ds_cnn_small/tflite_int8) | INT8 | TensorFlow Lite |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# DS-CNN Clustered FP32

## Description
This is a clustered (32 clusters, kmeans++ centroid initialization) and retrained (fine-tuned) FP32 version of the DS-CNN Large model developed by Arm from the Hello Edge paper. Code for the original DS-CNN implementation can be found here: https://github.com/ARM-software/ML-KWS-for-MCU. The original model was converted to Keras and optimized using the Clustering API in TensorFlow Model Optimization Toolkit.

## License
[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html)

## Network Information
| Network Information | Value |
|---------------------|------------------|
| Framework | TensorFlow Lite |
| SHA-1 Hash | a6f4fa3e253125499a1e77aa1010c943e72af568 |
| Size (Bytes) | 1649816 |
| Provenance | The original model (before clustering and quantization) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU |
| Paper | https://arxiv.org/abs/1711.07128 |

## Accuracy
Dataset: Google Speech Commands

| Metric | Value |
|--------|-------|
| Top 1 Accuracy | 0.9506 |

## Performance
| Platform | Optimized |
| -------- | ---------- |
| CPU | :heavy_check_mark: |
| GPU | :heavy_check_mark: |

### Key
- :heavy_check_mark: - Optimized for the platform.
- :heavy_minus_sign: - Not optimized, but will run on the platform.
- :heavy_multiplication_x: - Not optimized and will not run on the platform.

## Optimizations
| Optimization | Value |
|-----------------|---------|
| Number of Clusters | 32 |
| Cluster Initialization | K-Means |

## Network Inputs
| Input Node Name | Shape | Description |
|-----------------|---------|-------------|
| input_4 | (1, 1, 49, 10) | The input is a processed MFCCs of shape (1,1,49,10) |

## Network Outputs
| Output Node Name | Shape | Description |
|------------------|---------|-------------|
| Identity | (1, 12) | The probability on 12 keywords. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
benchmark:
SpeechCommands:
top_1_accuracy: 0.9506
description: 'This is a clustered (32 clusters, kmeans++ centroid initialization) and
retrained (fine-tuned) FP32 version of the DS-CNN Large model developed by Arm from the Hello Edge paper.
Code for the original DS-CNN implementation can be found here: https://github.com/ARM-software/ML-KWS-for-MCU.
The original model was converted to Keras and optimized using the Clustering API in TensorFlow Model Optimization Toolkit.'
license:
- Apache-2.0
network:
file_size_bytes: 1649816
filename: ds_cnn_clustered_fp32.tflite
framework: TensorFlow Lite
hash:
algorithm: sha1
value: a6f4fa3e253125499a1e77aa1010c943e72af568
provenance: The original model (before clustering and quantization) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU
network_parameters:
input_nodes:
- description: The input is a processed MFCCs of shape (1,1,49,10)
example_input:
path: models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/testing_input/input_4
name: input_4
shape:
- 1
- 1
- 49
- 10
type: float32
output_nodes:
- description: The probability on 12 keywords.
name: Identity
shape:
- 1
- 12
test_output_path: models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/testing_output/Identity
operators:
TensorFlow Lite:
- AVERAGE_POOL_2D
- CONV_2D
- DEPTHWISE_CONV_2D
- FULLY_CONNECTED
- RELU
- RESHAPE
- SOFTMAX
paper: https://arxiv.org/abs/1711.07128
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# DS-CNN Clustered INT8

## Description
This is a clustered (32 clusters, kmeans++ centroid initialization), retrained (fine-tuned) and fully quantized version (INT8) of the DS-CNN Large model developed by Arm from the Hello Edge paper. Code for the original DS-CNN implementation can be found here: https://github.com/ARM-software/ML-KWS-for-MCU.
The original model was converted to Keras, optimized using the Clustering API in TensorFlow Model Optimization Toolkit, and quantized using post-training quantization in the TF Lite Converter.

## License
[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html)

## Network Information
| Network Information | Value |
|---------------------|------------------|
| Framework | TensorFlow Lite |
| SHA-1 Hash | 367391990618e4e9a821a847dcbf3fe129212282 |
| Size (Bytes) | 526192 |
| Provenance | The original model (before clustering) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU |
| Paper | https://arxiv.org/abs/1711.07128 |

## Accuracy
Dataset: Google Speech Commands

| Metric | Value |
|--------|-------|
| Top 1 Accuracy | 0.94701 |

## Performance
| Platform | Optimized |
| -------- | ---------- |
| CPU | :heavy_check_mark: |
| GPU | :heavy_check_mark: |

### Key
- :heavy_check_mark: - Optimized for the platform.
- :heavy_minus_sign: - Not optimized, but will run on the platform.
- :heavy_multiplication_x: - Not optimized and will not run on the platform.

## Optimizations
| Optimization | Value |
|-----------------|---------|
| Quantization | INT8 |
| Number of Clusters | 32 |
| Cluster Initialization | K-Means |

## Network Inputs
| Input Node Name | Shape | Description |
|-----------------|---------|-------------|
| input_2 | (1, 1, 49, 10) | The input is a processed MFCCs of shape (1,1,49,10) |

## Network Outputs
| Output Node Name | Shape | Description |
|------------------|---------|-------------|
| Identity | (1, 12) | The probability on 12 keywords. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
benchmark:
SpeechCommands:
top_1_accuracy: 0.94701
description: 'This is a clustered (32 clusters, kmeans++ centroid initialization), retrained (fine-tuned) and fully quantized version (INT8)
of the DS-CNN Large model developed by Arm from the Hello Edge paper. Code for the original DS-CNN implementation
can be found here: https://github.com/ARM-software/ML-KWS-for-MCU.
The original model was converted to Keras, optimized using the Clustering API in TensorFlow Model Optimization Toolkit, and quantized using post-training quantization in the TF Lite Converter.'
license:
- Apache-2.0
network:
file_size_bytes: 526192
filename: ds_cnn_clustered_int8.tflite
framework: TensorFlow Lite
hash:
algorithm: sha1
value: 367391990618e4e9a821a847dcbf3fe129212282
provenance: The original model (before clustering) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU
network_parameters:
input_nodes:
- description: The input is a processed MFCCs of shape (1,1,49,10)
example_input:
path: models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/testing_input/input_2
name: input_2
shape:
- 1
- 1
- 49
- 10
type: int8
output_nodes:
- description: The probability on 12 keywords.
name: Identity
shape:
- 1
- 12
test_output_path: models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/testing_output/Identity
operators:
TensorFlow Lite:
- AVERAGE_POOL_2D
- CONV_2D
- DEPTHWISE_CONV_2D
- FULLY_CONNECTED
- RELU
- RESHAPE
- SOFTMAX
paper: https://arxiv.org/abs/1711.07128
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown

0 comments on commit 9f8f356

Please sign in to comment.