diff options
author | Liam Barry <liam.barry@arm.com> | 2022-05-09 17:06:19 +0100 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-05-12 16:10:06 +0000 |
commit | 213a543dd0d07b2f8d51a9c7e2055fd99291c960 (patch) | |
tree | 7357c9961f395131140f8937e732fee68963dc63 /tests/use_case/object_detection/ObjectDetectionUCTest.cc | |
parent | dd44d29775e53ad311e1997bb8a7670d0ee6383e (diff) | |
download | ml-embedded-evaluation-kit-213a543dd0d07b2f8d51a9c7e2055fd99291c960.tar.gz |
MLECO-3186: Each use case should same namespace convention as KWS and ASR
Certain UCs required additional work due to case context variables which also
became part of a namespace in generated files.
Solution was to declare these extra variables as part of the UC namespace in the respective model.hpp files.
Additional changes to standardise use of namespaces may be required - proposing new task.
Minor typo and rewording of customizing.md in relevant sections included.
Signed-off-by: Liam Barry <liam.barry@arm.com>
Change-Id: Ie78f82a30be252cb841136ea5115f21fc8d762cb
Diffstat (limited to 'tests/use_case/object_detection/ObjectDetectionUCTest.cc')
-rw-r--r-- | tests/use_case/object_detection/ObjectDetectionUCTest.cc | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/use_case/object_detection/ObjectDetectionUCTest.cc b/tests/use_case/object_detection/ObjectDetectionUCTest.cc index ffb4976..c21a416 100644 --- a/tests/use_case/object_detection/ObjectDetectionUCTest.cc +++ b/tests/use_case/object_detection/ObjectDetectionUCTest.cc @@ -27,12 +27,13 @@ namespace arm { namespace app { static uint8_t tensorArena[ACTIVATION_BUF_SZ] ACTIVATION_BUF_ATTRIBUTE; + namespace object_detection { + extern uint8_t* GetModelPointer(); + extern size_t GetModelLen(); + } /* namespace object_detection */ } /* namespace app */ } /* namespace arm */ -extern uint8_t* GetModelPointer(); -extern size_t GetModelLen(); - TEST_CASE("Model info") { /* Model wrapper object. */ @@ -40,9 +41,9 @@ TEST_CASE("Model info") /* Load the model. */ REQUIRE(model.Init(arm::app::tensorArena, - sizeof(arm::app::tensorArena), - GetModelPointer(), - GetModelLen())); + sizeof(arm::app::tensorArena), + arm::app::object_detection::GetModelPointer(), + arm::app::object_detection::GetModelLen())); /* Instantiate application context. */ arm::app::ApplicationContext caseContext; @@ -63,9 +64,9 @@ TEST_CASE("Inference by index") /* Load the model. */ REQUIRE(model.Init(arm::app::tensorArena, - sizeof(arm::app::tensorArena), - GetModelPointer(), - GetModelLen())); + sizeof(arm::app::tensorArena), + arm::app::object_detection::GetModelPointer(), + arm::app::object_detection::GetModelLen())); /* Instantiate application context. */ arm::app::ApplicationContext caseContext; @@ -89,9 +90,9 @@ TEST_CASE("Inference run all images") /* Load the model. */ REQUIRE(model.Init(arm::app::tensorArena, - sizeof(arm::app::tensorArena), - GetModelPointer(), - GetModelLen())); + sizeof(arm::app::tensorArena), + arm::app::object_detection::GetModelPointer(), + arm::app::object_detection::GetModelLen())); /* Instantiate application context. */ arm::app::ApplicationContext caseContext; @@ -115,9 +116,9 @@ TEST_CASE("List all images") /* Load the model. */ REQUIRE(model.Init(arm::app::tensorArena, - sizeof(arm::app::tensorArena), - GetModelPointer(), - GetModelLen())); + sizeof(arm::app::tensorArena), + arm::app::object_detection::GetModelPointer(), + arm::app::object_detection::GetModelLen())); /* Instantiate application context. */ arm::app::ApplicationContext caseContext; |