Code Monkey home page Code Monkey logo

ml-zoo's Introduction

Model Zoo

version

A collection of machine learning models optimized for Arm IP.

Anomaly Detection

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (AUC)
MicroNet Large INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.968
MicroNet Medium INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.963
MicroNet Small INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.955

Dataset: Dcase 2020 Task 2 Slide Rail

Image Classification

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (Top 1 Accuracy)
MobileNet v2 1.0 224 INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.697
MobileNet v2 1.0 224 UINT8 UINT8 TensorFlow Lite ✖️ ✖️ ✔️ ✔️ 0.708

Dataset: ILSVRC 2012

Keyword Spotting

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (Accuracy)
CNN Large INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.923
CNN Medium INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.905
CNN Small INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.902
DNN Large INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.860
DNN Medium INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.839
DNN Small INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.821
DS-CNN Large Clustered FP32 * FP32 TensorFlow Lite ✔️ ✔️ ✔️ ✖️ 0.948
DS-CNN Large Clustered INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.939
DS-CNN Large INT8 * INT8 TensorFlow Lite ✔️ ✔️ HERO ✔️ ✔️ 0.945
DS-CNN Medium INT8 * INT8 TensorFlow Lite ✔️ ✔️ HERO ✔️ ✔️ 0.939
DS-CNN Small INT8 * INT8 TensorFlow Lite ✔️ ✔️ HERO ✔️ ✔️ 0.931
DS-CNN Small INT16 * INT16 TensorFlow Lite ✔️ ✔️ HERO ✔️ ✔️ 0.934
CNN Large FP32 * FP32 TensorFlow Lite ✔️ ✔️ ✔️ ✖️ 0.934
CNN Medium FP32 * FP32 TensorFlow Lite ✔️ ✔️ ✔️ ✖️ 0.918
CNN Small FP32 * FP32 TensorFlow Lite ✔️ ✔️ ✔️ ✖️ 0.922
DNN Large FP32 * FP32 TensorFlow Lite ✔️ ✔️ ✔️ ✖️ 0.867
DNN Medium FP32 * FP32 TensorFlow Lite ✔️ ✔️ ✔️ ✖️ 0.850
DNN Small FP32 * FP32 TensorFlow Lite ✔️ ✔️ ✔️ ✖️ 0.836
DS-CNN Large FP32 * FP32 TensorFlow Lite ✔️ ✔️ HERO ✔️ ✖️ 0.950
DS-CNN Medium FP32 * FP32 TensorFlow Lite ✔️ ✔️ HERO ✔️ ✖️ 0.943
DS-CNN Small FP32 * FP32 TensorFlow Lite ✔️ ✔️ HERO ✔️ ✖️ 0.939
MicroNet Large INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.965
MicroNet Medium INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.958
MicroNet Small INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.953

Dataset: Google Speech Commands Test Set

Noise Suppression

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (Average Pesq)
RNNoise INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 2.945

Dataset: Noisy Speech Database For Training Speech Enhancement Algorithms And Tts Models

Object Detection

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (mAP)
SSD MobileNet v1 FP32 * FP32 TensorFlow Lite ✔️ ✖️ ✔️ ✖️ 0.210
SSD MobileNet v1 INT8 * INT8 TensorFlow Lite ✔️ ✖️ ✔️ ✖️ 0.234
SSD MobileNet v1 UINT8 * UINT8 TensorFlow Lite ✖️ ✖️ ✔️ ✖️ 0.180
YOLO v3 Tiny FP32 * FP32 TensorFlow Lite ✔️ ✖️ ✔️ ✖️ 0.331

Dataset: COCO Validation 2017

Speech Recognition

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (LER)
Wav2letter INT8 INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.0877
Wav2letter Pruned INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✔️ ✔️ 0.0783
Tiny Wav2letter INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✖️ ✔️ 0.0348
Tiny Wav2letter Pruned INT8 * INT8 TensorFlow Lite ✔️ ✔️ ✖️ ✔️ 0.0283

Dataset: LibriSpeech, Fluent Speech

Superresolution

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (PSNR)
SESR INT8 ** INT8 TensorFlow Lite ✔️ ✖️ ✔️ HERO ✖️ 35.00dB

Dataset: DIV2K

Visual Wake Words

Network Type Framework Cortex-A Cortex-M Mali GPU Ethos U Score (Accuracy)
MicroNet VWW-2 INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.768
MicroNet VWW-3 INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.855
MicroNet VWW-4 INT8 INT8 TensorFlow Lite ✖️ ✔️ ✔️ ✔️ 0.822

Dataset: Visual Wake Words

Key

  • ✔️ - Will run on this platform.
  • ✖️ - Will not run on this platform.
  • * - Code to recreate model available.
  • ** - This model has a large memory footprint – it will not run on all platforms.

License

Apache-2.0 unless otherwise explicitly stated.

ml-zoo's People

Contributors

burton2000 avatar chenhayat avatar gregory-bronstain avatar idan-arm avatar johan-alfven-arm avatar leandron avatar orly-arm avatar phorsman-arm avatar robell avatar tom-arm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ml-zoo's Issues

Cannot checkout the repo due to invalid path

Hi All ,
It appears that we cannot clone the repo
https://github.com/ARM-software/ML-zoo.git

$ git clone https://github.com/ARM-software/ML-zoo.git
Cloning into 'ML-zoo'...
remote: Enumerating objects: 1320, done.
remote: Counting objects: 100% (66/66), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 1320 (delta 27), reused 22 (delta 22), pack-reused 1254
Receiving objects: 100% (1320/1320), 413.77 KiB | 721.00 KiB/s, done.
Resolving deltas: 100% (480/480), done.
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_fp32/testing_output/TFLite_Detection_PostProcess:1/0.npy'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

The path that git checks is models/object_detection/ssd_mobilenet_v1/tflite_fp32/testing_output/TFLite_Detection_PostProcess:1/

But the actual path seems to be,
/models/object_detection/ssd_mobilenet_v1/tflite_fp32/testing_input/normalized_input_image_tensor/

#git checkout master
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_fp32/testing_output/TFLite_Detection_PostProcess:1/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_fp32/testing_output/TFLite_Detection_PostProcess:2/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_fp32/testing_output/TFLite_Detection_PostProcess:3/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_int8/testing_output/TFLite_Detection_PostProcess:01/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_int8/testing_output/TFLite_Detection_PostProcess:02/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_int8/testing_output/TFLite_Detection_PostProcess:03/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_int8/testing_output/TFLite_Detection_PostProcess:04/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_uint8/testing_output/TFLite_Detection_PostProcess:1/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_uint8/testing_output/TFLite_Detection_PostProcess:2/0.npy'
error: invalid path 'models/object_detection/ssd_mobilenet_v1/tflite_uint8/testing_output/TFLite_Detection_PostProcess:3/0.npy'

Thanks,

Anomaly Detection Model

In your paper titled "MICRONETS: NEURAL NETWORK ARCHITECTURES FOR DEPLOYING TINYML APPLICATIONS ON COMMODITY MICROCONTROLLERS" you also mention an anomaly detection model. However I am not able to spot it. Is it included in this repo?

Cannot download SSD MobileNet v1 FP32

Perhaps I'm missing something obvious, but the repository actually doesn't contain model files.
https://github.com/ARM-software/ML-zoo/blob/master/models/object_detection/ssd_mobilenet_v1/tflite_fp32/ssd_mobilenet_v1.tflite

This is just plan text file with the following content
version https://git-lfs.github.com/spec/v1
oid sha256:d15f8495fce308b774fd25cf4584e6f682f2d9d1b7cb6aa81cea2d784874c51b
size 27286108

The size 26 MB, but even when I press on Raw it only shows the same information as above.

I'm testing ARM NN and trying to understand the performance difference between FP32 and INT8 models. Having official models for the comparison would help greatly.

Test code for QAT model

Hi,
I tried to test the QAT tflite model, but error reported.
ValueError: Cannot set tensor: Got value of type FLOAT32 but expected type INT8 for input 0, name: serving_default_input_1

Based on my understanding, input tensor should be 0.~1., but the model need INT8 input.
Would you give some introduction about test code for QAT model?
Thanks a lot.

I can't reproduce the result for rnnoise Pesq 2.9

I run your github code with following command:
python test.py --clean_wav_folder=clean_testset_wav/ --noisy_wav_folder=noisy_testset_wav/ --tflite_path=rnnoise_INT8.tflite

The document said Avg pesq is 2.9 but I on get 2.664
image
I download test dataset with provided script file.

tiny_wav2letter inference

Hi @idan-arm @phorsman-arm ,
I try to use the inference code and the tiny_wav2letter_int8.tflte to inference the same audio file, but the result is different with yours.
Your result which LER is 0.03123
Screenshot from 2023-05-12 09-42-06

My result which LER is 0.390625
Screenshot from 2023-05-12 09-43-57

My error rate is significant greater than yours.
Do you have any idea?

Thanks in advance,

OS:
Ubuntu 20.04.4 LTS

package version:
Python 3.8.10
librosa 0.8.1
numpy 1.21.0
tensorflow 2.4.1
jiwer 2.3.0

H5/hdf5/pb/onnx/pt files

Instead of just the frozen tflite files, is it possible to upload h5 or hdf5 or pb or onnx or pt files?

Label Files for models

Hey there,

It would be really helpful if these models had the appropriate label files to go with.

Thanks,

Cannot load input file 0.pny, complained "Failed to interpret file '0.npy' as a pickle" or "invalid load key, 'v'."

Hi there,

I have been working to test the model CNN Large INT8 model of Keyword Spotting in a Tensorflow Lite for Micro (TFLM) program. I got some issues when loading the input file.

When I tried to use numpy to load 0.npy, I got some errors as follows.

>>> import numpy as np
>>> np.load('0.npy')

Traceback (most recent call last):
  File "/Applications/MBEDCLI.app/Contents/Resources/miniconda/envs/ml-zoo/lib/python3.6/site-packages/numpy/lib/npyio.py", line 426, in load
    return pickle.load(fid, **pickle_kwargs)
_pickle.UnpicklingError: invalid load key, 'v'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/MBEDCLI.app/Contents/Resources/miniconda/envs/ml-zoo/lib/python3.6/site-packages/numpy/lib/npyio.py", line 429, in load
    "Failed to interpret file %s as a pickle" % repr(file))
OSError: Failed to interpret file '0.npy' as a pickle

>>> np.load('0.npy', allow_pickle=True)

Traceback (most recent call last):
  File "/Applications/MBEDCLI.app/Contents/Resources/miniconda/envs/ml-zoo/lib/python3.6/site-packages/numpy/lib/npyio.py", line 426, in load
    return pickle.load(fid, **pickle_kwargs)
_pickle.UnpicklingError: invalid load key, 'v'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/MBEDCLI.app/Contents/Resources/miniconda/envs/ml-zoo/lib/python3.6/site-packages/numpy/lib/npyio.py", line 429, in load
    "Failed to interpret file %s as a pickle" % repr(file))
OSError: Failed to interpret file '0.npy' as a pickle

I'm using Python 3.6.13 and numpy 1.12.1.

I did some research and checked 0.npy's version using command xxd:

$ xxd 0.npy
00000000: 7665 7273 696f 6e20 6874 7470 733a 2f2f  version https://
00000010: 6769 742d 6c66 732e 6769 7468 7562 2e63  git-lfs.github.c
00000020: 6f6d 2f73 7065 632f 7631 0a6f 6964 2073  om/spec/v1.oid s
00000030: 6861 3235 363a 3661 6239 3364 3438 3263  ha256:6ab93d482c
00000040: 3035 6365 3533 6664 3436 3766 3431 3964  05ce53fd467f419d
00000050: 3637 3635 3333 3531 6330 6236 6136 6434  67653351c0b6a6d4
00000060: 3436 3634 3834 6139 3034 3138 3363 3936  466484a904183c96
00000070: 3764 3736 3135 0a73 697a 6520 3230 3838  7d7615.size 2088
00000080: 0a

It seems to be v1 npy file. I'm not sure if this was the problem.

Would you mind give me some advice about how to read the input file? Also by any chance could you tell me how to load this npy file into the TFLM project which is using C/C++?

Thank you so much!

Difference between Keyword spotting Models

What's the performance differences between the different key word spotting models? I see accuracy differences, but no performance metrics. Would be helpful to pick a model before running it.

Model Validation Script

Hello and thanks for your work. I need to run model for Keyword Spotting from this zoo, but there is no any validation script with preprocessing for my .wav files. How should i prepare my data to apply models?

wav2letter inference

Hello,

I am trying to evaluate the quantized wav2letter model provided at:

project link

It also includes an input sample and its corresponding output:

Also, it is suggested to decode the class probabilities (output) using algorithms like beam search and explicitly it is refereed to
ctc_beam_search_decoder from tensorflow.

Accordingly, as the model is already quantized, the output tensor is dequantized using the the scales and zero_points.

  • scales: 0.00390625
  • zero_points: -128

Then, the dequntized output is generated as below:

deq_output = (output.astype(np.float32)-zero_points) * scales

And finally, it is passed to the decoder in order to create the sequence of letters:

# batch size: 1
# deq_output.shape after reshaping: (148, 1, 29) ==> (sequence length, batch size, # classes/characters)
# sequence_length : 148

(decoded, log_probabilities) = tf.nn.ctc_beam_search_decoder(inputs=deq_output,
                          sequence_length=[sequence_length],
                          beam_width=25,
                          top_paths=5)

tf versions: tested on both 2.4 and 2.5

However here is a sample decoded array:

(as a reminder, the alphabet is equal to "abcdefghijklmnopqrstuvwxyz' @")

 print("".join([alphabet[ch_ind] for ch_ind in np.array(decoded[0].values)])) :


 oe aie bm'abaqabaiebajakyiepaubacacua ara 

P.S. the provided model is correct as the model prediction for the provided input matches to the provided output.

====================================================================================
And here are my questions:

  1. is the decoding process correct from your side?
  2. what's your idea about decoded output?
  3. is the given input a fake generated tensor?
  4. could you please share your validated decoding process?
  5. could you please share your feature extraction process and its corresponding preprocessing steps (i.e., normalization, etc.), in case that a raw audio wave is being used for inference.

Thanks in advance,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.