ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.15k stars 307 forks source link

Example test case for testing speech detection TF-lite model #614

Closed supratimc239 closed 2 years ago

supratimc239 commented 2 years ago

Hi All,

I am trying to port my speech detection TF lite model on arm-NN for CPU acceleration. But unfortunately there is no existing example test case on v21.05 that could be modified for testing/profiling my speech detection model.

Could anyone point me to a test case that use any speech detection TF-lite model?

Thanks

morgolock commented 2 years ago

Hi @supratimc239

You can run tflite models with ArmNN's ExecuteNetwork and use the -e option enable the profiler.

Please see https://github.com/ARM-software/ComputeLibrary/issues/950

Have you tried running your model with ExecuteNetwork?

supratimc239 commented 2 years ago

Hi @morgolock ,

Thank you very much for your response. I could see that the vision.py tool provides a very good insight about kernels while executing a mode.

The model I am working on takes as input a ".wav" file and provides txt output. Will the ExecuteNetwork work for such requirements? If so, is there a test case similar TfLiteMnasNet-Armnn/TfLiteMnasNet-Armnn.cpp that could be used for testing my speech model?

Thanks

SadikARM commented 2 years ago

Hi @supratimc239,

We have a how-to-guide for speech recognition. Please see Perform Automatic Speech Recognition (ASR) with Wav2Letter using PyArmNN and Debian Packages Tutorial

Best Regards, Sadik

supratimc239 commented 2 years ago

Hi Sadik,

Thank you for your response. But this guide is not using Tflite model for ASR. Do you have guide for Tflite model of ASR?

Kind regards Supratim

SadikARM commented 2 years ago

Hi @supratimc239,

The Perform Automatic Speech Recognition (ASR) with Wav2Letter using PyArmNN and Debian Packages guide is using the wav2letter TfLite model from Arm Model Zoo, please see the page Initializing-the-project. On Run-the-example page it is detailing how to run the inference using the TfLite model on Arm NN.

Best Regards, Sadik

supratimc239 commented 2 years ago

Hi Sadik,

Sorry for the late follow-up. I looked at the links you have sent and they seem to be relevant to python. I am trying to find a framework in C++ that will take input as .wav or any other format for getting raw speech data and after executing network provide output that will indicate if there is any voice activity on the received speech input.

Please let me know if there is any such example framework I could refer to for my implementation.

Kind regards Supratim

Burton2000 commented 2 years ago

@supratimc239 Here is the link to the same example above but the c++ version: https://github.com/ARM-software/armnn/tree/branches/armnn_22_02/samples/SpeechRecognition

TeresaARM commented 2 years ago

Hi @supratimc239 ,

Thank you for your question! please let us know if the link from @Burton2000 answers it. We will close this issue if we do not receive an answer from you, but you will always be able to reopen.

Kindest Regards. Thank you

supratimc239 commented 2 years ago

Hi @TeresaARM , Yes I could use the ExecuteNetwork framework for executing my TF-lite model. Sorry for the late response.

Kind regards Supratim

TeresaARM commented 2 years ago

Hi @supratimc239

thank you to you!! I will close this ticket. Please let us know if you find any other difficulties.

Kind Regards