diff options
author | Richard Burton <richard.burton@arm.com> | 2023-12-06 17:13:10 +0000 |
---|---|---|
committer | alex.tawse <alex.tawse@arm.com> | 2024-01-23 17:26:45 +0000 |
commit | cefc7e1cacdd3028b46325b3a1f6c15416914b2f (patch) | |
tree | d0353f7775d18a207d8a9fd352a3b716ea7b9773 /scripts/py/templates | |
parent | 001a8ff315dc766a206b05a3e00e831e3f972b0d (diff) | |
download | ml-embedded-evaluation-kit-experimental/vsi.tar.gz |
MLECO-4503: Adding video VSI for object detectionexperimental/vsi
* Added Board support - Arm Corstone 300 and 310
* Added Python Scripts for Video VSI
* Added source files for Video VSI
* Add new usecase handler for OD use case
* Bumped resampy version to resolve issue with slowdown
Signed-off-by: Idriss Chaouch <idriss.chaouch@arm.com>
Signed-off-by: Richard Burton <richard.burton@arm.com>
Change-Id: Ie59ae955d4d85f672a49c63733052624542aec85
Diffstat (limited to 'scripts/py/templates')
-rw-r--r-- | scripts/py/templates/Images.cc.template | 20 | ||||
-rw-r--r-- | scripts/py/templates/Images.hpp.template | 11 |
2 files changed, 29 insertions, 2 deletions
diff --git a/scripts/py/templates/Images.cc.template b/scripts/py/templates/Images.cc.template index 2620ab4..c5b051a 100644 --- a/scripts/py/templates/Images.cc.template +++ b/scripts/py/templates/Images.cc.template @@ -1,5 +1,5 @@ {# - SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <open-source-office@arm.com> + SPDX-FileCopyrightText: Copyright 2021, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,6 +24,14 @@ static const char* imgFilenames[] = { {% endfor %} }; +{% if source_directory %} +static const char* imgFilePaths[] = { +{% for name in img_names %} + "{{source_directory}}/{{name}}", +{% endfor %} +}; +{% endif %} + static const uint8_t* imgArrays[] = { {{ var_names|join(',\n ') }} }; @@ -36,6 +44,16 @@ const char* GetFilename(const uint32_t idx) return nullptr; } +{% if source_directory %} +const char* GetFilePath(const uint32_t idx) +{ + if (idx < NUMBER_OF_FILES) { + return imgFilePaths[idx]; + } + return nullptr; +} +{% endif %} + const uint8_t* GetImgArray(const uint32_t idx) { if (idx < NUMBER_OF_FILES) { diff --git a/scripts/py/templates/Images.hpp.template b/scripts/py/templates/Images.hpp.template index d39fc49..1f0a70e 100644 --- a/scripts/py/templates/Images.hpp.template +++ b/scripts/py/templates/Images.hpp.template @@ -1,5 +1,5 @@ {# - SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates <open-source-office@arm.com> + SPDX-FileCopyrightText: Copyright 2021, 2024 Arm Limited and/or its affiliates <open-source-office@arm.com> SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); @@ -35,6 +35,15 @@ extern const uint8_t {{var_name}}[IMAGE_DATA_SIZE]; **/ const char* GetFilename(const uint32_t idx); +{% if source_directory %} +/** + * @brief Gets the file path for the image on the local filesystem + * @param[in] idx Index of the input. + * @return const C string pointer to the file path. + **/ +const char* GetFilePath(const uint32_t idx); +{% endif %} + /** * @brief Gets the pointer to image data. * @param[in] idx Index of the input. |