diff options
author | Richard Burton <richard.burton@arm.com> | 2022-04-27 17:24:36 +0100 |
---|---|---|
committer | Richard Burton <richard.burton@arm.com> | 2022-04-27 17:24:36 +0100 |
commit | ef90497eccf48bd725a96eb79e062ebfd4e2d618 (patch) | |
tree | 055ac754d4f057baead14f723ac759cf0136a3c7 /tests | |
parent | b40ecf8522052809d2351677a96195d69e4d0c16 (diff) | |
download | ml-embedded-evaluation-kit-ef90497eccf48bd725a96eb79e062ebfd4e2d618.tar.gz |
MLECO-3076: Add use case API for object detection
* Removed unused prototype for box drawing
Signed-off-by: Richard Burton <richard.burton@arm.com>
Change-Id: I1b03b88e710a5efb1ff8e107859d2245b1fead26
Diffstat (limited to 'tests')
-rw-r--r-- | tests/use_case/object_detection/InferenceTestYoloFastest.cc | 9 | ||||
-rw-r--r-- | tests/use_case/object_detection/ObjectDetectionUCTest.cc | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/tests/use_case/object_detection/InferenceTestYoloFastest.cc b/tests/use_case/object_detection/InferenceTestYoloFastest.cc index 8ef012d..2c035e7 100644 --- a/tests/use_case/object_detection/InferenceTestYoloFastest.cc +++ b/tests/use_case/object_detection/InferenceTestYoloFastest.cc @@ -94,13 +94,8 @@ void TestInferenceDetectionResults(int imageIdx, arm::app::Model& model, T toler REQUIRE(tflite::GetTensorData<T>(output_arr[i])); } - arm::app::object_detection::DetectorPostprocessing postp; - postp.RunPostProcessing( - nRows, - nCols, - output_arr[0], - output_arr[1], - results); + arm::app::DetectorPostProcess postp{output_arr[0], output_arr[1], results, nRows, nCols}; + postp.DoPostProcess(); std::vector<std::vector<arm::app::object_detection::DetectionResult>> expected_results; GetExpectedResults(expected_results); diff --git a/tests/use_case/object_detection/ObjectDetectionUCTest.cc b/tests/use_case/object_detection/ObjectDetectionUCTest.cc index a7e4f33..023b893 100644 --- a/tests/use_case/object_detection/ObjectDetectionUCTest.cc +++ b/tests/use_case/object_detection/ObjectDetectionUCTest.cc @@ -58,8 +58,6 @@ TEST_CASE("Inference by index") caseContext.Set<arm::app::Profiler&>("profiler", profiler); caseContext.Set<arm::app::Model&>("model", model); caseContext.Set<uint32_t>("imgIndex", 0); - arm::app::object_detection::DetectorPostprocessing postp; - caseContext.Set<arm::app::object_detection::DetectorPostprocessing&>("postprocess", postp); REQUIRE(arm::app::ObjectDetectionHandler(caseContext, 0, false)); } @@ -83,8 +81,6 @@ TEST_CASE("Inference run all images") caseContext.Set<arm::app::Profiler&>("profiler", profiler); caseContext.Set<arm::app::Model&>("model", model); caseContext.Set<uint32_t>("imgIndex", 0); - arm::app::object_detection::DetectorPostprocessing postp; - caseContext.Set<arm::app::object_detection::DetectorPostprocessing&>("postprocess", postp); REQUIRE(arm::app::ObjectDetectionHandler(caseContext, 0, true)); } |