Skip to content

Commit

Permalink
Merge pull request #20 from ARM-software/add_micronets
Browse files Browse the repository at this point in the history
Add MicroNets
  • Loading branch information
tom-arm authored May 5, 2021
2 parents b4d9c02 + aec70be commit 35040a9
Show file tree
Hide file tree
Showing 37 changed files with 941 additions and 0 deletions.
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<table>
<tr>
<th width="250">Network</th>
<th width="100">Type</th>
<th width="160">Framework</th>
<th width="100">Cortex-A</th>
<th width="100">Cortex-M</th>
<th width="100">Mali GPU</th>
<th width="100">Ethos U</th>
</tr>
<tr>
<td><a href = "models/anomaly_detection/micronet_large/tflite_int8">MicroNet Large INT8</a></td>
<td align="center">INT8</td>
<td align="center">TensorFlow Lite</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
</tr>
<tr>
<td><a href = "models/anomaly_detection/micronet_medium/tflite_int8">MicroNet Medium INT8</a></td>
<td align="center">INT8</td>
<td align="center">TensorFlow Lite</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
</tr>
<tr>
<td><a href = "models/anomaly_detection/micronet_small/tflite_int8">MicroNet Small INT8</a></td>
<td align="center">INT8</td>
<td align="center">TensorFlow Lite</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
</tr>
</table>

## Image Classification

Expand Down Expand Up @@ -137,6 +177,33 @@
<td align="center">:heavy_check_mark:</td>
<td align="center">:heavy_check_mark:</td>
</tr>
<tr>
<td><a href = "models/keyword_spotting/micronet_large/tflite_int8">MicroNet Large INT8</a></td>
<td align="center">INT8</td>
<td align="center">TensorFlow Lite</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
</tr>
<tr>
<td><a href = "models/keyword_spotting/micronet_medium/tflite_int8">MicroNet Medium INT8</a></td>
<td align="center">INT8</td>
<td align="center">TensorFlow Lite</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
</tr>
<tr>
<td><a href = "models/keyword_spotting/micronet_small/tflite_int8">MicroNet Small INT8</a></td>
<td align="center">INT8</td>
<td align="center">TensorFlow Lite</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
<td align="center">:heavy_multiplication_x:</td>
<td align="center">:heavy_check_mark:</td>
</tr>
</table>

## Object Detection
Expand Down Expand Up @@ -203,6 +270,7 @@
</tr>
</table>


### Key
* :heavy_check_mark: - Will run on this platform.
* :heavy_multiplication_x: - Will not run on this platform.
Expand Down
72 changes: 72 additions & 0 deletions models/anomaly_detection/micronet_large/tflite_int8/README.md
Original file line number Diff line number Diff line change
@@ -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
<table>
<tr>
<th width="200">Input Node Name</th>
<th width="100">Shape</th>
<th width="300">Description</th>
</tr>
<tr>
<td>input</td>
<td>(1, 32, 32, 1)</td>
<td>Input is 64 steps of a Log Mel Spectrogram using 64 mels resized to 32x32.</td>
</tr>
</table>

## Network Outputs
<table>
<tr>
<th width="200">Output Node Name</th>
<th width="100">Shape</th>
<th width="300">Description</th>
</tr>
<tr>
<td>Identity</td>
<td>(1, 8)</td>
<td>Raw logits corresponding to different machine IDs being anomalous</td>
</tr>
</table>
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Git LFS file not shown
Git LFS file not shown
72 changes: 72 additions & 0 deletions models/anomaly_detection/micronet_medium/tflite_int8/README.md
Original file line number Diff line number Diff line change
@@ -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
<table>
<tr>
<th width="200">Input Node Name</th>
<th width="100">Shape</th>
<th width="300">Description</th>
</tr>
<tr>
<td>input</td>
<td>(1, 32, 32, 1)</td>
<td>Input is 64 steps of a Log Mel Spectrogram using 64 mels resized to 32x32.</td>
</tr>
</table>

## Network Outputs
<table>
<tr>
<th width="200">Output Node Name</th>
<th width="100">Shape</th>
<th width="300">Description</th>
</tr>
<tr>
<td>Identity</td>
<td>(1, 8)</td>
<td>Raw logits corresponding to different machine IDs being anomalous</td>
</tr>
</table>
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Git LFS file not shown
Git LFS file not shown
Loading

0 comments on commit 35040a9

Please sign in to comment.