diff --git a/README.md b/README.md index 68da2a8..372619c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,46 @@ ![version](https://img.shields.io/badge/version-20.12-0091BD) > A collection of machine learning models optimized for Arm IP. +## Anomaly Detection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NetworkTypeFrameworkCortex-ACortex-MMali GPUEthos U
MicroNet Large INT8INT8TensorFlow Lite:heavy_multiplication_x::heavy_check_mark::heavy_multiplication_x::heavy_check_mark:
MicroNet Medium INT8INT8TensorFlow Lite:heavy_multiplication_x::heavy_check_mark::heavy_multiplication_x::heavy_check_mark:
MicroNet Small INT8INT8TensorFlow Lite:heavy_multiplication_x::heavy_check_mark::heavy_multiplication_x::heavy_check_mark:
## Image Classification @@ -137,6 +177,33 @@ :heavy_check_mark: :heavy_check_mark: + + MicroNet Large INT8 + INT8 + TensorFlow Lite + :heavy_multiplication_x: + :heavy_check_mark: + :heavy_multiplication_x: + :heavy_check_mark: + + + MicroNet Medium INT8 + INT8 + TensorFlow Lite + :heavy_multiplication_x: + :heavy_check_mark: + :heavy_multiplication_x: + :heavy_check_mark: + + + MicroNet Small INT8 + INT8 + TensorFlow Lite + :heavy_multiplication_x: + :heavy_check_mark: + :heavy_multiplication_x: + :heavy_check_mark: + ## Object Detection @@ -203,6 +270,7 @@ + ### Key * :heavy_check_mark: - Will run on this platform. * :heavy_multiplication_x: - Will not run on this platform. diff --git a/models/anomaly_detection/micronet_large/tflite_int8/README.md b/models/anomaly_detection/micronet_large/tflite_int8/README.md new file mode 100644 index 0000000..4dd02ae --- /dev/null +++ b/models/anomaly_detection/micronet_large/tflite_int8/README.md @@ -0,0 +1,72 @@ +# MicroNet Large INT8 + +## Description +This is a fully quantized version (asymmetrical int8) of the MicroNet Large model developed by Arm, from the MicroNets paper. It is trained on the 'slide rail' task from http://dcase.community/challenge2020/task-unsupervised-detection-of-anomalous-sounds. + +## License +[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) + +## Related Materials +### Class Labels +The class labels associated with this model can be created by running the script `get_class_labels.sh`. + +## Network Information +| Network Information | Value | +|---------------------|----------------| +| Framework | TensorFlow Lite | +| SHA-1 Hash | 0b7e7776c79fac28c186b2ba00314a05b7faadbf | +| Size (Bytes) | 442000 | +| Provenance | https://arxiv.org/pdf/2010.11267.pdf | +| Paper | https://arxiv.org/pdf/2010.11267.pdf | + +## Performance +| Platform | Optimized | +|----------|:---------:| +| Cortex-A |:heavy_multiplication_x: | +| Cortex-M |:heavy_check_mark: | +| Mali GPU |:heavy_multiplication_x: | +| Ethos U |:heavy_check_mark: | + +### Key +* :heavy_check_mark: - Will run on this platform. +* :heavy_multiplication_x: - Will not run on this platform. + +## Accuracy +Dataset: Dcase 2020 Task 2 Slide Rail + +| Metric | Value | +|--------|-------| +| AUC | 0.968 | + +## Optimizations +| Optimization | Value | +|--------------|---------| +| Quantization | INT8 | + +## Network Inputs + + + + + + + + + + + +
Input Node NameShapeDescription
input(1, 32, 32, 1)Input is 64 steps of a Log Mel Spectrogram using 64 mels resized to 32x32.
+ +## Network Outputs + + + + + + + + + + + +
Output Node NameShapeDescription
Identity(1, 8)Raw logits corresponding to different machine IDs being anomalous
diff --git a/models/anomaly_detection/micronet_large/tflite_int8/ad_large_int8.tflite b/models/anomaly_detection/micronet_large/tflite_int8/ad_large_int8.tflite new file mode 100644 index 0000000..63957c3 --- /dev/null +++ b/models/anomaly_detection/micronet_large/tflite_int8/ad_large_int8.tflite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1cd8dabc12adb91b89d936bdac3eb3ebff6770bf9b9c449cb800d08fcb160a8 +size 442000 diff --git a/models/anomaly_detection/micronet_large/tflite_int8/definition.yaml b/models/anomaly_detection/micronet_large/tflite_int8/definition.yaml new file mode 100644 index 0000000..226f350 --- /dev/null +++ b/models/anomaly_detection/micronet_large/tflite_int8/definition.yaml @@ -0,0 +1,43 @@ +benchmark: + DCASE 2020 Task 2 Slide rail: + AUC: 0.968 +description: This is a fully quantized version (asymmetrical int8) of the MicroNet + Large model developed by Arm, from the MicroNets paper. It is trained on the 'slide + rail' task from http://dcase.community/challenge2020/task-unsupervised-detection-of-anomalous-sounds. +license: +- Apache-2.0 +network: + file_size_bytes: 442000 + filename: ad_large_int8.tflite + framework: TensorFlow Lite + hash: + algorithm: sha1 + value: 0b7e7776c79fac28c186b2ba00314a05b7faadbf + provenance: https://arxiv.org/pdf/2010.11267.pdf +network_parameters: + input_nodes: + - description: Input is 64 steps of a Log Mel Spectrogram using 64 mels resized + to 32x32. + example_input: + path: models/anomaly_detection/micronet_large/tflite_int8/testing_input/input + name: input + shape: + - 1 + - 32 + - 32 + - 1 + output_nodes: + - description: Raw logits corresponding to different machine IDs being anomalous + name: Identity + shape: + - 1 + - 8 + test_output_path: models/anomaly_detection/micronet_large/tflite_int8/testing_output/Identity +operators: + TensorFlow Lite: + - AVERAGE_POOL_2D + - CONV_2D + - DEPTHWISE_CONV_2D + - RELU6 + - RESHAPE +paper: https://arxiv.org/pdf/2010.11267.pdf diff --git a/models/anomaly_detection/micronet_large/tflite_int8/get_class_labels.sh b/models/anomaly_detection/micronet_large/tflite_int8/get_class_labels.sh new file mode 100755 index 0000000..55f63d4 --- /dev/null +++ b/models/anomaly_detection/micronet_large/tflite_int8/get_class_labels.sh @@ -0,0 +1,23 @@ +# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the License); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/usr/bin/env bash + +touch ./labelmappings.txt +echo "id0" >> labelmappings.txt +echo "id2" >> labelmappings.txt +echo "id4" >> labelmappings.txt +echo "id6" >> labelmappings.txt diff --git a/models/anomaly_detection/micronet_large/tflite_int8/testing_input/input/0.npy b/models/anomaly_detection/micronet_large/tflite_int8/testing_input/input/0.npy new file mode 100644 index 0000000..95d209e --- /dev/null +++ b/models/anomaly_detection/micronet_large/tflite_int8/testing_input/input/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f525bddd8c5c521d2ac3e1a8fcf7c28f1fe113f620852121b5498fa0a2f2f617 +size 1152 diff --git a/models/anomaly_detection/micronet_large/tflite_int8/testing_output/Identity/0.npy b/models/anomaly_detection/micronet_large/tflite_int8/testing_output/Identity/0.npy new file mode 100644 index 0000000..bb9338b --- /dev/null +++ b/models/anomaly_detection/micronet_large/tflite_int8/testing_output/Identity/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fadbd73ca3b52e1f6c15c857a1681d3b29bb7c1b1ab29cd5ab4e311b0134c59 +size 136 diff --git a/models/anomaly_detection/micronet_medium/tflite_int8/README.md b/models/anomaly_detection/micronet_medium/tflite_int8/README.md new file mode 100644 index 0000000..00bb3bf --- /dev/null +++ b/models/anomaly_detection/micronet_medium/tflite_int8/README.md @@ -0,0 +1,72 @@ +# MicroNet Medium INT8 + +## Description +This is a fully quantized version (asymmetrical int8) of the MicroNet Medium model developed by Arm, from the MicroNets paper. It is trained on the 'slide rail' task from http://dcase.community/challenge2020/task-unsupervised-detection-of-anomalous-sounds. + +## License +[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) + +## Related Materials +### Class Labels +The class labels associated with this model can be created by running the script `get_class_labels.sh`. + +## Network Information +| Network Information | Value | +|---------------------|----------------| +| Framework | TensorFlow Lite | +| SHA-1 Hash | ed709fccb1d57393cbc88f36da38a4ab70f97b4a | +| Size (Bytes) | 463792 | +| Provenance | https://arxiv.org/pdf/2010.11267.pdf | +| Paper | https://arxiv.org/pdf/2010.11267.pdf | + +## Performance +| Platform | Optimized | +|----------|:---------:| +| Cortex-A |:heavy_multiplication_x: | +| Cortex-M |:heavy_check_mark: | +| Mali GPU |:heavy_multiplication_x: | +| Ethos U |:heavy_check_mark: | + +### Key +* :heavy_check_mark: - Will run on this platform. +* :heavy_multiplication_x: - Will not run on this platform. + +## Accuracy +Dataset: Dcase 2020 Task 2 Slide Rail + +| Metric | Value | +|--------|-------| +| AUC | 0.9632 | + +## Optimizations +| Optimization | Value | +|--------------|---------| +| Quantization | INT8 | + +## Network Inputs + + + + + + + + + + + +
Input Node NameShapeDescription
input(1, 32, 32, 1)Input is 64 steps of a Log Mel Spectrogram using 64 mels resized to 32x32.
+ +## Network Outputs + + + + + + + + + + + +
Output Node NameShapeDescription
Identity(1, 8)Raw logits corresponding to different machine IDs being anomalous
diff --git a/models/anomaly_detection/micronet_medium/tflite_int8/ad_medium_int8.tflite b/models/anomaly_detection/micronet_medium/tflite_int8/ad_medium_int8.tflite new file mode 100644 index 0000000..833eac4 --- /dev/null +++ b/models/anomaly_detection/micronet_medium/tflite_int8/ad_medium_int8.tflite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a1265f67367f238c4ccc4c2ccd9c280908a9d5f98a6f88d512c147b1f1309a8 +size 463792 diff --git a/models/anomaly_detection/micronet_medium/tflite_int8/definition.yaml b/models/anomaly_detection/micronet_medium/tflite_int8/definition.yaml new file mode 100644 index 0000000..019d583 --- /dev/null +++ b/models/anomaly_detection/micronet_medium/tflite_int8/definition.yaml @@ -0,0 +1,43 @@ +benchmark: + DCASE 2020 Task 2 Slide rail: + AUC: 0.9632 +description: This is a fully quantized version (asymmetrical int8) of the MicroNet + Medium model developed by Arm, from the MicroNets paper. It is trained on the 'slide + rail' task from http://dcase.community/challenge2020/task-unsupervised-detection-of-anomalous-sounds. +license: +- Apache-2.0 +network: + file_size_bytes: 463792 + filename: ad_medium_int8.tflite + framework: TensorFlow Lite + hash: + algorithm: sha1 + value: ed709fccb1d57393cbc88f36da38a4ab70f97b4a + provenance: https://arxiv.org/pdf/2010.11267.pdf +network_parameters: + input_nodes: + - description: Input is 64 steps of a Log Mel Spectrogram using 64 mels resized + to 32x32. + example_input: + path: models/anomaly_detection/micronet_medium/tflite_int8/testing_input/input + name: input + shape: + - 1 + - 32 + - 32 + - 1 + output_nodes: + - description: Raw logits corresponding to different machine IDs being anomalous + name: Identity + shape: + - 1 + - 8 + test_output_path: models/anomaly_detection/micronet_medium/tflite_int8/testing_output/Identity +operators: + TensorFlow Lite: + - AVERAGE_POOL_2D + - CONV_2D + - DEPTHWISE_CONV_2D + - RELU6 + - RESHAPE +paper: https://arxiv.org/pdf/2010.11267.pdf diff --git a/models/anomaly_detection/micronet_medium/tflite_int8/get_class_labels.sh b/models/anomaly_detection/micronet_medium/tflite_int8/get_class_labels.sh new file mode 100755 index 0000000..55f63d4 --- /dev/null +++ b/models/anomaly_detection/micronet_medium/tflite_int8/get_class_labels.sh @@ -0,0 +1,23 @@ +# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the License); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/usr/bin/env bash + +touch ./labelmappings.txt +echo "id0" >> labelmappings.txt +echo "id2" >> labelmappings.txt +echo "id4" >> labelmappings.txt +echo "id6" >> labelmappings.txt diff --git a/models/anomaly_detection/micronet_medium/tflite_int8/testing_input/input/0.npy b/models/anomaly_detection/micronet_medium/tflite_int8/testing_input/input/0.npy new file mode 100644 index 0000000..b0ff4d4 --- /dev/null +++ b/models/anomaly_detection/micronet_medium/tflite_int8/testing_input/input/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44441994fb518152099ba058456a899e382482e2d95b39ef71b0c7dddbbbcd68 +size 1152 diff --git a/models/anomaly_detection/micronet_medium/tflite_int8/testing_output/Identity/0.npy b/models/anomaly_detection/micronet_medium/tflite_int8/testing_output/Identity/0.npy new file mode 100644 index 0000000..5bceb36 --- /dev/null +++ b/models/anomaly_detection/micronet_medium/tflite_int8/testing_output/Identity/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31d857b41292cd8c6ed2902e1a0e0dd2da8ffc66ae067bbee25d4e1a336d0e22 +size 136 diff --git a/models/anomaly_detection/micronet_small/tflite_int8/README.md b/models/anomaly_detection/micronet_small/tflite_int8/README.md new file mode 100644 index 0000000..8e8386c --- /dev/null +++ b/models/anomaly_detection/micronet_small/tflite_int8/README.md @@ -0,0 +1,72 @@ +# MicroNet Small INT8 + +## Description +This is a fully quantized version (asymmetrical int8) of the MicroNet Small model developed by Arm, from the MicroNets paper. It is trained on the 'slide rail' task from http://dcase.community/challenge2020/task-unsupervised-detection-of-anomalous-sounds. + +## License +[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) + +## Related Materials +### Class Labels +The class labels associated with this model can be created by running the script `get_class_labels.sh`. + +## Network Information +| Network Information | Value | +|---------------------|----------------| +| Framework | TensorFlow Lite | +| SHA-1 Hash | 6dc73515caea226065c3408d82d857b9908e3ffa | +| Size (Bytes) | 252848 | +| Provenance | https://arxiv.org/pdf/2010.11267.pdf | +| Paper | https://arxiv.org/pdf/2010.11267.pdf | + +## Performance +| Platform | Optimized | +|----------|:---------:| +| Cortex-A |:heavy_multiplication_x: | +| Cortex-M |:heavy_check_mark: | +| Mali GPU |:heavy_multiplication_x: | +| Ethos U |:heavy_check_mark: | + +### Key +* :heavy_check_mark: - Will run on this platform. +* :heavy_multiplication_x: - Will not run on this platform. + +## Accuracy +Dataset: Dcase 2020 Task 2 Slide Rail + +| Metric | Value | +|--------|-------| +| AUC | 0.9548 | + +## Optimizations +| Optimization | Value | +|--------------|---------| +| Quantization | INT8 | + +## Network Inputs + + + + + + + + + + + +
Input Node NameShapeDescription
input(1, 32, 32, 1)Input is 64 steps of a Log Mel Spectrogram using 64 mels resized to 32x32.
+ +## Network Outputs + + + + + + + + + + + +
Output Node NameShapeDescription
Identity(1, 8)Raw logits corresponding to different machine IDs being anomalous
diff --git a/models/anomaly_detection/micronet_small/tflite_int8/ad_small_int8.tflite b/models/anomaly_detection/micronet_small/tflite_int8/ad_small_int8.tflite new file mode 100644 index 0000000..d6fce10 --- /dev/null +++ b/models/anomaly_detection/micronet_small/tflite_int8/ad_small_int8.tflite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73db15c7f1b3c2a3bec8431258be9724b269866645aabfe99eba016da35e5d40 +size 252848 diff --git a/models/anomaly_detection/micronet_small/tflite_int8/definition.yaml b/models/anomaly_detection/micronet_small/tflite_int8/definition.yaml new file mode 100644 index 0000000..d64ea2b --- /dev/null +++ b/models/anomaly_detection/micronet_small/tflite_int8/definition.yaml @@ -0,0 +1,43 @@ +benchmark: + DCASE 2020 Task 2 Slide rail: + AUC: 0.9548 +description: This is a fully quantized version (asymmetrical int8) of the MicroNet + Small model developed by Arm, from the MicroNets paper. It is trained on the 'slide + rail' task from http://dcase.community/challenge2020/task-unsupervised-detection-of-anomalous-sounds. +license: +- Apache-2.0 +network: + file_size_bytes: 252848 + filename: ad_small_int8.tflite + framework: TensorFlow Lite + hash: + algorithm: sha1 + value: 6dc73515caea226065c3408d82d857b9908e3ffa + provenance: https://arxiv.org/pdf/2010.11267.pdf +network_parameters: + input_nodes: + - description: Input is 64 steps of a Log Mel Spectrogram using 64 mels resized + to 32x32. + example_input: + path: models/anomaly_detection/micronet_small/tflite_int8/testing_input/input + name: input + shape: + - 1 + - 32 + - 32 + - 1 + output_nodes: + - description: Raw logits corresponding to different machine IDs being anomalous + name: Identity + shape: + - 1 + - 8 + test_output_path: models/anomaly_detection/micronet_small/tflite_int8/testing_output/Identity +operators: + TensorFlow Lite: + - AVERAGE_POOL_2D + - CONV_2D + - DEPTHWISE_CONV_2D + - RELU6 + - RESHAPE +paper: https://arxiv.org/pdf/2010.11267.pdf diff --git a/models/anomaly_detection/micronet_small/tflite_int8/get_class_labels.sh b/models/anomaly_detection/micronet_small/tflite_int8/get_class_labels.sh new file mode 100755 index 0000000..55f63d4 --- /dev/null +++ b/models/anomaly_detection/micronet_small/tflite_int8/get_class_labels.sh @@ -0,0 +1,23 @@ +# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the License); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/usr/bin/env bash + +touch ./labelmappings.txt +echo "id0" >> labelmappings.txt +echo "id2" >> labelmappings.txt +echo "id4" >> labelmappings.txt +echo "id6" >> labelmappings.txt diff --git a/models/anomaly_detection/micronet_small/tflite_int8/testing_input/input/0.npy b/models/anomaly_detection/micronet_small/tflite_int8/testing_input/input/0.npy new file mode 100644 index 0000000..5933462 --- /dev/null +++ b/models/anomaly_detection/micronet_small/tflite_int8/testing_input/input/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0f8e659165cc697946051f17c6f98266e89099979dcfe4b04bdd2209779f25e +size 1152 diff --git a/models/anomaly_detection/micronet_small/tflite_int8/testing_output/Identity/0.npy b/models/anomaly_detection/micronet_small/tflite_int8/testing_output/Identity/0.npy new file mode 100644 index 0000000..ed83c43 --- /dev/null +++ b/models/anomaly_detection/micronet_small/tflite_int8/testing_output/Identity/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f446574aa5b4dab717d4888aa74010e9d258bf8e9bce120f339c5429a7d0fd7 +size 136 diff --git a/models/keyword_spotting/micronet_large/tflite_int8/README.md b/models/keyword_spotting/micronet_large/tflite_int8/README.md new file mode 100644 index 0000000..4cacf2f --- /dev/null +++ b/models/keyword_spotting/micronet_large/tflite_int8/README.md @@ -0,0 +1,72 @@ +# MicroNet Large INT8 + +## Description +This is a fully quantized version (asymmetrical int8) of the MicroNet Large model developed by Arm, from the MicroNets paper. This model is trained on the 'Google Speech Commands' dataset. + +## License +[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) + +## Related Materials +### Class Labels +The class labels associated with this model can be downloaded by running the script `get_class_labels.sh`. + +## Network Information +| Network Information | Value | +|---------------------|----------------| +| Framework | TensorFlow Lite | +| SHA-1 Hash | 5ac522fadfc7d07e96e72e38c55650514ecef750 | +| Size (Bytes) | 658832 | +| Provenance | https://arxiv.org/pdf/2010.11267.pdf | +| Paper | https://arxiv.org/pdf/2010.11267.pdf | + +## Performance +| Platform | Optimized | +|----------|:---------:| +| Cortex-A |:heavy_multiplication_x: | +| Cortex-M |:heavy_check_mark: | +| Mali GPU |:heavy_multiplication_x: | +| Ethos U |:heavy_check_mark: | + +### Key +* :heavy_check_mark: - Will run on this platform. +* :heavy_multiplication_x: - Will not run on this platform. + +## Accuracy +Dataset: Google Speech Commands Test Set + +| Metric | Value | +|--------|-------| +| Accuracy | 96.48% | + +## Optimizations +| Optimization | Value | +|--------------|---------| +| Quantization | INT8 | + +## Network Inputs + + + + + + + + + + + +
Input Node NameShapeDescription
input(1, 49, 10, 1)A one second audio clip, converted to a 2D MFCC computed from a speech frame of length 40ms and stride 20ms.
+ +## Network Outputs + + + + + + + + + + + +
Output Node NameShapeDescription
Identity(1, 12)The probability on 12 keywords.
diff --git a/models/keyword_spotting/micronet_large/tflite_int8/definition.yaml b/models/keyword_spotting/micronet_large/tflite_int8/definition.yaml new file mode 100644 index 0000000..d7ff34a --- /dev/null +++ b/models/keyword_spotting/micronet_large/tflite_int8/definition.yaml @@ -0,0 +1,43 @@ +benchmark: + Google Speech Commands test set: + Accuracy: 96.48% +description: This is a fully quantized version (asymmetrical int8) of the MicroNet + Large model developed by Arm, from the MicroNets paper. This model is trained on + the 'Google Speech Commands' dataset. +license: +- Apache-2.0 +network: + file_size_bytes: 658832 + filename: kws_micronet_l.tflite + framework: TensorFlow Lite + hash: + algorithm: sha1 + value: 5ac522fadfc7d07e96e72e38c55650514ecef750 + provenance: https://arxiv.org/pdf/2010.11267.pdf +network_parameters: + input_nodes: + - description: A one second audio clip, converted to a 2D MFCC computed from a speech + frame of length 40ms and stride 20ms. + example_input: + path: models/keyword_spotting/micronet_large/tflite_int8/testing_input/input + name: input + shape: + - 1 + - 49 + - 10 + - 1 + output_nodes: + - description: The probability on 12 keywords. + name: Identity + shape: + - 1 + - 12 + test_output_path: models/keyword_spotting/micronet_large/tflite_int8/testing_output/Identity +operators: + TensorFlow Lite: + - AVERAGE_POOL_2D + - CONV_2D + - DEPTHWISE_CONV_2D + - RELU6 + - RESHAPE +paper: https://arxiv.org/pdf/2010.11267.pdf diff --git a/models/keyword_spotting/micronet_large/tflite_int8/get_class_labels.sh b/models/keyword_spotting/micronet_large/tflite_int8/get_class_labels.sh new file mode 100755 index 0000000..e59caf5 --- /dev/null +++ b/models/keyword_spotting/micronet_large/tflite_int8/get_class_labels.sh @@ -0,0 +1,20 @@ +# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the License); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/usr/bin/env bash + +wget https://raw.githubusercontent.com/ARM-software/ML-KWS-for-MCU/e9cf319e9aa2ff71d433e111477dd95329fb94cb/Pretrained_models/labels.txt +mv labels.txt labelmappings.txt \ No newline at end of file diff --git a/models/keyword_spotting/micronet_large/tflite_int8/kws_micronet_l.tflite b/models/keyword_spotting/micronet_large/tflite_int8/kws_micronet_l.tflite new file mode 100644 index 0000000..a501075 --- /dev/null +++ b/models/keyword_spotting/micronet_large/tflite_int8/kws_micronet_l.tflite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15723bcc7d73599546cfebd289632799393e329df84bba883205b08b666a1aa3 +size 658832 diff --git a/models/keyword_spotting/micronet_large/tflite_int8/testing_input/input/0.npy b/models/keyword_spotting/micronet_large/tflite_int8/testing_input/input/0.npy new file mode 100644 index 0000000..42a0e37 --- /dev/null +++ b/models/keyword_spotting/micronet_large/tflite_int8/testing_input/input/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:babed7a966e0901d59301080947e3f3b3a00d397ab2171bc2e917e1d67e38369 +size 618 diff --git a/models/keyword_spotting/micronet_large/tflite_int8/testing_output/Identity/0.npy b/models/keyword_spotting/micronet_large/tflite_int8/testing_output/Identity/0.npy new file mode 100644 index 0000000..62d4e94 --- /dev/null +++ b/models/keyword_spotting/micronet_large/tflite_int8/testing_output/Identity/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fa8e00b4d2adba3f9a9b1d239bb585d174a0c76292b9464d139165fea328935 +size 140 diff --git a/models/keyword_spotting/micronet_medium/tflite_int8/README.md b/models/keyword_spotting/micronet_medium/tflite_int8/README.md new file mode 100644 index 0000000..8cfa7f2 --- /dev/null +++ b/models/keyword_spotting/micronet_medium/tflite_int8/README.md @@ -0,0 +1,72 @@ +# MicroNet Medium INT8 + +## Description +This is a fully quantized version (asymmetrical int8) of the MicroNet Medium model developed by Arm, from the MicroNets paper. This model is trained on the 'Google Speech Commands' dataset. + +## License +[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) + +## Related Materials +### Class Labels +The class labels associated with this model can be downloaded by running the script `get_class_labels.sh`. + +## Network Information +| Network Information | Value | +|---------------------|----------------| +| Framework | TensorFlow Lite | +| SHA-1 Hash | fd03a6b24548ea99cf487dbd682937df5718cef1 | +| Size (Bytes) | 181968 | +| Provenance | https://arxiv.org/pdf/2010.11267.pdf | +| Paper | https://arxiv.org/pdf/2010.11267.pdf | + +## Performance +| Platform | Optimized | +|----------|:---------:| +| Cortex-A |:heavy_multiplication_x: | +| Cortex-M |:heavy_check_mark: | +| Mali GPU |:heavy_multiplication_x: | +| Ethos U |:heavy_check_mark: | + +### Key +* :heavy_check_mark: - Will run on this platform. +* :heavy_multiplication_x: - Will not run on this platform. + +## Accuracy +Dataset: Google Speech Commands Test Set + +| Metric | Value | +|--------|-------| +| Accuracy | 95.77% | + +## Optimizations +| Optimization | Value | +|--------------|---------| +| Quantization | INT8 | + +## Network Inputs + + + + + + + + + + + +
Input Node NameShapeDescription
input(1, 49, 10, 1)A one second audio clip, converted to a 2D MFCC computed from a speech frame of length 40ms and stride 20ms.
+ +## Network Outputs + + + + + + + + + + + +
Output Node NameShapeDescription
Identity(1, 12)The probability on 12 keywords.
diff --git a/models/keyword_spotting/micronet_medium/tflite_int8/definition.yaml b/models/keyword_spotting/micronet_medium/tflite_int8/definition.yaml new file mode 100644 index 0000000..60e49d5 --- /dev/null +++ b/models/keyword_spotting/micronet_medium/tflite_int8/definition.yaml @@ -0,0 +1,43 @@ +benchmark: + Google Speech Commands test set: + Accuracy: 95.77% +description: This is a fully quantized version (asymmetrical int8) of the MicroNet + Medium model developed by Arm, from the MicroNets paper. This model is trained on + the 'Google Speech Commands' dataset. +license: +- Apache-2.0 +network: + file_size_bytes: 181968 + filename: kws_micronet_m.tflite + framework: TensorFlow Lite + hash: + algorithm: sha1 + value: fd03a6b24548ea99cf487dbd682937df5718cef1 + provenance: https://arxiv.org/pdf/2010.11267.pdf +network_parameters: + input_nodes: + - description: A one second audio clip, converted to a 2D MFCC computed from a speech + frame of length 40ms and stride 20ms. + example_input: + path: models/keyword_spotting/micronet_medium/tflite_int8/testing_input/input + name: input + shape: + - 1 + - 49 + - 10 + - 1 + output_nodes: + - description: The probability on 12 keywords. + name: Identity + shape: + - 1 + - 12 + test_output_path: models/keyword_spotting/micronet_medium/tflite_int8/testing_output/Identity +operators: + TensorFlow Lite: + - AVERAGE_POOL_2D + - CONV_2D + - DEPTHWISE_CONV_2D + - RELU6 + - RESHAPE +paper: https://arxiv.org/pdf/2010.11267.pdf diff --git a/models/keyword_spotting/micronet_medium/tflite_int8/get_class_labels.sh b/models/keyword_spotting/micronet_medium/tflite_int8/get_class_labels.sh new file mode 100755 index 0000000..e59caf5 --- /dev/null +++ b/models/keyword_spotting/micronet_medium/tflite_int8/get_class_labels.sh @@ -0,0 +1,20 @@ +# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the License); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/usr/bin/env bash + +wget https://raw.githubusercontent.com/ARM-software/ML-KWS-for-MCU/e9cf319e9aa2ff71d433e111477dd95329fb94cb/Pretrained_models/labels.txt +mv labels.txt labelmappings.txt \ No newline at end of file diff --git a/models/keyword_spotting/micronet_medium/tflite_int8/kws_micronet_m.tflite b/models/keyword_spotting/micronet_medium/tflite_int8/kws_micronet_m.tflite new file mode 100644 index 0000000..8e15577 --- /dev/null +++ b/models/keyword_spotting/micronet_medium/tflite_int8/kws_micronet_m.tflite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1feed3af5dac44de7477fb4161670ba18a3fc06039e4a14da41b1c4dd454cb4 +size 181968 diff --git a/models/keyword_spotting/micronet_medium/tflite_int8/testing_input/input/0.npy b/models/keyword_spotting/micronet_medium/tflite_int8/testing_input/input/0.npy new file mode 100644 index 0000000..44deb4d --- /dev/null +++ b/models/keyword_spotting/micronet_medium/tflite_int8/testing_input/input/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afac928cb5a966030eac08a0943c169fe5e80d0ba0d5e97986c90aba1afd3fe2 +size 618 diff --git a/models/keyword_spotting/micronet_medium/tflite_int8/testing_output/Identity/0.npy b/models/keyword_spotting/micronet_medium/tflite_int8/testing_output/Identity/0.npy new file mode 100644 index 0000000..bae3e65 --- /dev/null +++ b/models/keyword_spotting/micronet_medium/tflite_int8/testing_output/Identity/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:302e3559ac7e867b477247d7625bc2408d6c27c27092c8b95f5e821a55652b72 +size 140 diff --git a/models/keyword_spotting/micronet_small/tflite_int8/README.md b/models/keyword_spotting/micronet_small/tflite_int8/README.md new file mode 100644 index 0000000..aaa3b26 --- /dev/null +++ b/models/keyword_spotting/micronet_small/tflite_int8/README.md @@ -0,0 +1,72 @@ +# MicroNet Small INT8 + +## Description +This is a fully quantized version (asymmetrical int8) of the MicroNet Small model developed by Arm, from the MicroNets paper. This model is trained on the 'Google Speech Commands' dataset. + +## License +[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) + +## Related Materials +### Class Labels +The class labels associated with this model can be downloaded by running the script `get_class_labels.sh`. + +## Network Information +| Network Information | Value | +|---------------------|----------------| +| Framework | TensorFlow Lite | +| SHA-1 Hash | d13a25dbe34a0f2758879b9d3e7c7bad94c68ec7 | +| Size (Bytes) | 114512 | +| Provenance | https://arxiv.org/pdf/2010.11267.pdf | +| Paper | https://arxiv.org/pdf/2010.11267.pdf | + +## Performance +| Platform | Optimized | +|----------|:---------:| +| Cortex-A |:heavy_multiplication_x: | +| Cortex-M |:heavy_check_mark: | +| Mali GPU |:heavy_multiplication_x: | +| Ethos U |:heavy_check_mark: | + +### Key +* :heavy_check_mark: - Will run on this platform. +* :heavy_multiplication_x: - Will not run on this platform. + +## Accuracy +Dataset: Google Speech Commands Test Set + +| Metric | Value | +|--------|-------| +| Accuracy | 95.32% | + +## Optimizations +| Optimization | Value | +|--------------|---------| +| Quantization | INT8 | + +## Network Inputs + + + + + + + + + + + +
Input Node NameShapeDescription
input(1, 49, 10, 1)A one second audio clip, converted to a 2D MFCC computed from a speech frame of length 40ms and stride 20ms.
+ +## Network Outputs + + + + + + + + + + + +
Output Node NameShapeDescription
Identity(1, 12)The probability on 12 keywords.
diff --git a/models/keyword_spotting/micronet_small/tflite_int8/definition.yaml b/models/keyword_spotting/micronet_small/tflite_int8/definition.yaml new file mode 100644 index 0000000..4217caa --- /dev/null +++ b/models/keyword_spotting/micronet_small/tflite_int8/definition.yaml @@ -0,0 +1,43 @@ +benchmark: + Google Speech Commands test set: + Accuracy: 95.32% +description: This is a fully quantized version (asymmetrical int8) of the MicroNet + Small model developed by Arm, from the MicroNets paper. This model is trained on + the 'Google Speech Commands' dataset. +license: +- Apache-2.0 +network: + file_size_bytes: 114512 + filename: kws_micronet_s.tflite + framework: TensorFlow Lite + hash: + algorithm: sha1 + value: d13a25dbe34a0f2758879b9d3e7c7bad94c68ec7 + provenance: https://arxiv.org/pdf/2010.11267.pdf +network_parameters: + input_nodes: + - description: A one second audio clip, converted to a 2D MFCC computed from a speech + frame of length 40ms and stride 20ms. + example_input: + path: models/keyword_spotting/micronet_small/tflite_int8/testing_input/input + name: input + shape: + - 1 + - 49 + - 10 + - 1 + output_nodes: + - description: The probability on 12 keywords. + name: Identity + shape: + - 1 + - 12 + test_output_path: models/keyword_spotting/micronet_small/tflite_int8/testing_output/Identity +operators: + TensorFlow Lite: + - AVERAGE_POOL_2D + - CONV_2D + - DEPTHWISE_CONV_2D + - RELU6 + - RESHAPE +paper: https://arxiv.org/pdf/2010.11267.pdf diff --git a/models/keyword_spotting/micronet_small/tflite_int8/get_class_labels.sh b/models/keyword_spotting/micronet_small/tflite_int8/get_class_labels.sh new file mode 100755 index 0000000..e59caf5 --- /dev/null +++ b/models/keyword_spotting/micronet_small/tflite_int8/get_class_labels.sh @@ -0,0 +1,20 @@ +# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the License); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/usr/bin/env bash + +wget https://raw.githubusercontent.com/ARM-software/ML-KWS-for-MCU/e9cf319e9aa2ff71d433e111477dd95329fb94cb/Pretrained_models/labels.txt +mv labels.txt labelmappings.txt \ No newline at end of file diff --git a/models/keyword_spotting/micronet_small/tflite_int8/kws_micronet_s.tflite b/models/keyword_spotting/micronet_small/tflite_int8/kws_micronet_s.tflite new file mode 100644 index 0000000..8f567ae --- /dev/null +++ b/models/keyword_spotting/micronet_small/tflite_int8/kws_micronet_s.tflite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b04ee059edf9e392bb9b744a051f19818a662453b0fb4af825267f1a1937dae +size 114512 diff --git a/models/keyword_spotting/micronet_small/tflite_int8/testing_input/input/0.npy b/models/keyword_spotting/micronet_small/tflite_int8/testing_input/input/0.npy new file mode 100644 index 0000000..841c462 --- /dev/null +++ b/models/keyword_spotting/micronet_small/tflite_int8/testing_input/input/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:854f466a4358f532f08ee5bfce2f2163b12ae6092b82545033a0e725d620988d +size 618 diff --git a/models/keyword_spotting/micronet_small/tflite_int8/testing_output/Identity/0.npy b/models/keyword_spotting/micronet_small/tflite_int8/testing_output/Identity/0.npy new file mode 100644 index 0000000..b92c8f2 --- /dev/null +++ b/models/keyword_spotting/micronet_small/tflite_int8/testing_output/Identity/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55e557d2c13ed59502f5b98265743347232c8402a38f133af44e046fc90824c9 +size 140