-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ml-eval-kit: Update to version 23.11
* Improved tensorflow.cmake * Model URLs file location has changed * Some patches have been merged upstream Signed-off-by: Gabor Abonyi <[email protected]>
- Loading branch information
1 parent
c4b2e83
commit 80e220f
Showing
9 changed files
with
65 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 56 additions & 91 deletions
147
...n_kit/integration/patches/0001-resources-Replace-model-wav2letter-with-tiny_wav2let.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,66 @@ | ||
From e691803e130d1aced38c21e98c41ce40bda44ffe Mon Sep 17 00:00:00 2001 | ||
From: Hugues Kamba-Mpiana <hugues.kambampiana@arm.com> | ||
Date: Tue, 19 Dec 2023 14:09:27 +0000 | ||
Subject: [PATCH 1/4] resources: Replace model wav2letter with tiny_wav2letter | ||
From 202176ddd60d709372bd4dd05fd5d6490fc2559e Mon Sep 17 00:00:00 2001 | ||
From: Gabor Abonyi <gabor.abonyi@arm.com> | ||
Date: Mon, 22 Jan 2024 14:55:03 +0100 | ||
Subject: [PATCH 1/2] resources: Replace model wav2letter with tiny_wav2letter | ||
|
||
`wav2letter` model needs singificant amount of memory (around 14Mb), | ||
where as `tiny_wav2letter` needs around 4Mb. | ||
Update the location of the resource where referenced for | ||
the `asr` and `kws` use cases. | ||
the `asr` and `kws_asr` use cases. | ||
|
||
Signed-off-by: Hugues Kamba-Mpiana <hugues.kambampiana@arm.com> | ||
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com> | ||
--- | ||
set_up_default_resources.py | 16 ++++++++-------- | ||
source/use_case/asr/usecase.cmake | 4 ++-- | ||
source/use_case/kws_asr/usecase.cmake | 4 ++-- | ||
3 files changed, 12 insertions(+), 12 deletions(-) | ||
scripts/py/use_case_resources.json | 16 ++++++++-------- | ||
1 file changed, 8 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/set_up_default_resources.py b/set_up_default_resources.py | ||
index b442432..2cb987d 100755 | ||
--- a/set_up_default_resources.py | ||
+++ b/set_up_default_resources.py | ||
@@ -51,16 +51,16 @@ json_uc_res = [ | ||
{ | ||
"use_case_name": "asr", | ||
"url_prefix": [ | ||
- "https://github.com/ARM-software/ML-zoo/raw/1a92aa08c0de49a7304e0a7f3f59df6f4fd33ac8/models/speech_recognition/wav2letter/tflite_pruned_int8/" | ||
+ "https://github.com/ARM-software/ML-zoo/raw/eb2170aac1317f00b128ab82bdb159cfcca36ea6/models/speech_recognition/tiny_wav2letter/tflite_pruned_int8/" | ||
], | ||
"resources": [ | ||
{ | ||
- "name": "wav2letter_pruned_int8.tflite", | ||
- "url": "{url_prefix:0}wav2letter_pruned_int8.tflite", | ||
+ "name": "tiny_wav2letter_pruned_int8.tflite", | ||
+ "url": "{url_prefix:0}tiny_wav2letter_pruned_int8.tflite", | ||
}, | ||
{ | ||
"name": "ifm0.npy", | ||
- "url": "{url_prefix:0}testing_input/input_2_int8/0.npy", | ||
+ "url": "{url_prefix:0}testing_input/input_1_int8/0.npy", | ||
}, | ||
{ | ||
"name": "ofm0.npy", | ||
@@ -131,18 +131,18 @@ json_uc_res = [ | ||
{ | ||
"use_case_name": "kws_asr", | ||
"url_prefix": [ | ||
- "https://github.com/ARM-software/ML-zoo/raw/1a92aa08c0de49a7304e0a7f3f59df6f4fd33ac8/models/speech_recognition/wav2letter/tflite_pruned_int8/", | ||
+ "https://github.com/ARM-software/ML-zoo/raw/eb2170aac1317f00b128ab82bdb159cfcca36ea6/models/speech_recognition/tiny_wav2letter/tflite_pruned_int8/", | ||
"https://github.com/ARM-software/ML-zoo/raw/9f506fe52b39df545f0e6c5ff9223f671bc5ae00/models/keyword_spotting/micronet_medium/tflite_int8/", | ||
], | ||
"resources": [ | ||
{ | ||
- "name": "wav2letter_pruned_int8.tflite", | ||
- "url": "{url_prefix:0}wav2letter_pruned_int8.tflite", | ||
+ "name": "tiny_wav2letter_pruned_int8.tflite", | ||
+ "url": "{url_prefix:0}tiny_wav2letter_pruned_int8.tflite", | ||
}, | ||
{ | ||
"sub_folder": "asr", | ||
"name": "ifm0.npy", | ||
- "url": "{url_prefix:0}testing_input/input_2_int8/0.npy", | ||
+ "url": "{url_prefix:0}testing_input/input_1_int8/0.npy", | ||
}, | ||
{ | ||
"sub_folder": "asr", | ||
diff --git a/source/use_case/asr/usecase.cmake b/source/use_case/asr/usecase.cmake | ||
index fc3f2b5..3ce2c0a 100644 | ||
--- a/source/use_case/asr/usecase.cmake | ||
+++ b/source/use_case/asr/usecase.cmake | ||
@@ -75,9 +75,9 @@ USER_OPTION(${use_case}_ACTIVATION_BUF_SZ "Activation buffer size for the chosen | ||
STRING) | ||
|
||
if (ETHOS_U_NPU_ENABLED) | ||
- set(DEFAULT_MODEL_PATH ${DEFAULT_MODEL_DIR}/wav2letter_pruned_int8_vela_${ETHOS_U_NPU_CONFIG_ID}.tflite) | ||
+ set(DEFAULT_MODEL_PATH ${DEFAULT_MODEL_DIR}/tiny_wav2letter_pruned_int8_vela_${ETHOS_U_NPU_CONFIG_ID}.tflite) | ||
else() | ||
- set(DEFAULT_MODEL_PATH ${DEFAULT_MODEL_DIR}/wav2letter_pruned_int8.tflite) | ||
+ set(DEFAULT_MODEL_PATH ${DEFAULT_MODEL_DIR}/tiny_wav2letter_pruned_int8.tflite) | ||
endif() | ||
|
||
set(EXTRA_MODEL_CODE | ||
diff --git a/source/use_case/kws_asr/usecase.cmake b/source/use_case/kws_asr/usecase.cmake | ||
index de84bfd..9bfbbd0 100644 | ||
--- a/source/use_case/kws_asr/usecase.cmake | ||
+++ b/source/use_case/kws_asr/usecase.cmake | ||
@@ -68,10 +68,10 @@ USER_OPTION(${use_case}_MODEL_SCORE_THRESHOLD_ASR "Specify the score threshold [ | ||
|
||
if (ETHOS_U_NPU_ENABLED) | ||
set(DEFAULT_MODEL_PATH_KWS ${DEFAULT_MODEL_DIR}/kws_micronet_m_vela_${ETHOS_U_NPU_CONFIG_ID}.tflite) | ||
- set(DEFAULT_MODEL_PATH_ASR ${DEFAULT_MODEL_DIR}/wav2letter_pruned_int8_vela_${ETHOS_U_NPU_CONFIG_ID}.tflite) | ||
+ set(DEFAULT_MODEL_PATH_ASR ${DEFAULT_MODEL_DIR}/tiny_wav2letter_pruned_int8_vela_${ETHOS_U_NPU_CONFIG_ID}.tflite) | ||
else() | ||
set(DEFAULT_MODEL_PATH_KWS ${DEFAULT_MODEL_DIR}/kws_micronet_m.tflite) | ||
- set(DEFAULT_MODEL_PATH_ASR ${DEFAULT_MODEL_DIR}/wav2letter_pruned_int8.tflite) | ||
+ set(DEFAULT_MODEL_PATH_ASR ${DEFAULT_MODEL_DIR}/tiny_wav2letter_pruned_int8.tflite) | ||
endif() | ||
|
||
USER_OPTION(${use_case}_MODEL_TFLITE_PATH_KWS "NN models file to be used for KWS in the evaluation application. Model files must be in tflite format." | ||
diff --git a/scripts/py/use_case_resources.json b/scripts/py/use_case_resources.json | ||
index 80fa28d..9e50fb6 100644 | ||
--- a/scripts/py/use_case_resources.json | ||
+++ b/scripts/py/use_case_resources.json | ||
@@ -16,16 +16,16 @@ | ||
{ | ||
"name": "asr", | ||
"url_prefix": [ | ||
- "https://github.com/ARM-software/ML-zoo/raw/1a92aa08c0de49a7304e0a7f3f59df6f4fd33ac8/models/speech_recognition/wav2letter/tflite_pruned_int8/" | ||
+ "https://github.com/ARM-software/ML-zoo/raw/eb2170aac1317f00b128ab82bdb159cfcca36ea6/models/speech_recognition/tiny_wav2letter/tflite_pruned_int8/" | ||
], | ||
"resources": [ | ||
{ | ||
- "name": "wav2letter_pruned_int8.tflite", | ||
- "url": "{url_prefix:0}wav2letter_pruned_int8.tflite" | ||
+ "name": "tiny_wav2letter_pruned_int8.tflite", | ||
+ "url": "{url_prefix:0}tiny_wav2letter_pruned_int8.tflite" | ||
}, | ||
{ | ||
"name": "ifm0.npy", | ||
- "url": "{url_prefix:0}testing_input/input_2_int8/0.npy" | ||
+ "url": "{url_prefix:0}testing_input/input_1_int8/0.npy" | ||
}, | ||
{ | ||
"name": "ofm0.npy", | ||
@@ -96,18 +96,18 @@ | ||
{ | ||
"name": "kws_asr", | ||
"url_prefix": [ | ||
- "https://github.com/ARM-software/ML-zoo/raw/1a92aa08c0de49a7304e0a7f3f59df6f4fd33ac8/models/speech_recognition/wav2letter/tflite_pruned_int8/", | ||
+ "https://github.com/ARM-software/ML-zoo/raw/eb2170aac1317f00b128ab82bdb159cfcca36ea6/models/speech_recognition/tiny_wav2letter/tflite_pruned_int8/", | ||
"https://github.com/ARM-software/ML-zoo/raw/9f506fe52b39df545f0e6c5ff9223f671bc5ae00/models/keyword_spotting/micronet_medium/tflite_int8/" | ||
], | ||
"resources": [ | ||
{ | ||
- "name": "wav2letter_pruned_int8.tflite", | ||
- "url": "{url_prefix:0}wav2letter_pruned_int8.tflite" | ||
+ "name": "tiny_wav2letter_pruned_int8.tflite", | ||
+ "url": "{url_prefix:0}tiny_wav2letter_pruned_int8.tflite" | ||
}, | ||
{ | ||
"sub_folder": "asr", | ||
"name": "ifm0.npy", | ||
- "url": "{url_prefix:0}testing_input/input_2_int8/0.npy" | ||
+ "url": "{url_prefix:0}testing_input/input_1_int8/0.npy" | ||
}, | ||
{ | ||
"sub_folder": "asr", | ||
-- | ||
2.40.1 | ||
|
4 changes: 2 additions & 2 deletions
4
..._header-instead-of-RTE_Components.h.patch → ..._header-instead-of-RTE_Components.h.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 75e29cf7fd59978d06d8594efd2c883c40cd56e1 Mon Sep 17 00:00:00 2001 | ||
From ba95da37dcc0b41a14e7c8bc1ea707e0b1d99a79 Mon Sep 17 00:00:00 2001 | ||
From: Gabor Abonyi <[email protected]> | ||
Date: Tue, 16 Jan 2024 14:48:44 +0100 | ||
Subject: [PATCH 3/4] Use CMSIS_device_header instead of RTE_Components.h | ||
Subject: [PATCH 2/2] Use CMSIS_device_header instead of RTE_Components.h | ||
|
||
Signed-off-by: Gabor Abonyi <[email protected]> | ||
--- | ||
|
69 changes: 0 additions & 69 deletions
69
...n_kit/integration/patches/0002-toolchain-Fix-Arm-GNU-Toolchain-13.2-Rel1-compatibil.patch
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...mbedded_evaluation_kit/integration/patches/0004-Fix-tensorflow.cmake-env-var-escape.patch
This file was deleted.
Oops, something went wrong.
Submodule library
updated
from f1b28b to c56eed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ml-eval-kit: Update to version 23.11 |