aboutsummaryrefslogtreecommitdiff
path: root/tests/ObjectDetectionCommon.hpp
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2019-01-29 11:09:51 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-01-30 13:05:58 +0000
commitd089b74bebbcc8518fb0f4eacb7e6569ae170199 (patch)
treea86f9ec054d4daad3d20446ced27555768a84862 /tests/ObjectDetectionCommon.hpp
parent7cf0eaa26c1fb29ca9df97e4734ec7c1e10f81c4 (diff)
downloadarmnn-d089b74bebbcc8518fb0f4eacb7e6569ae170199.tar.gz
IVGCVSW-2437 Inference test for TensorFlow Lite MobileNet SSD
Change-Id: If7ee1efa3ee79d9eca41c5a6219b3fc42e740efe
Diffstat (limited to 'tests/ObjectDetectionCommon.hpp')
-rw-r--r--tests/ObjectDetectionCommon.hpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/ObjectDetectionCommon.hpp b/tests/ObjectDetectionCommon.hpp
new file mode 100644
index 0000000000..85b54c255f
--- /dev/null
+++ b/tests/ObjectDetectionCommon.hpp
@@ -0,0 +1,49 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#include <string>
+#include <utility>
+
+namespace
+{
+
+struct BoundingBox
+{
+ BoundingBox()
+ : BoundingBox(0.0f, 0.0f, 0.0f, 0.0f)
+ {}
+
+ BoundingBox(float xMin, float yMin, float xMax, float yMax)
+ : m_XMin(xMin)
+ , m_YMin(yMin)
+ , m_XMax(xMax)
+ , m_YMax(yMax)
+ {}
+
+ float m_XMin;
+ float m_YMin;
+ float m_XMax;
+ float m_YMax;
+};
+
+struct DetectedObject
+{
+ DetectedObject(unsigned int detectedClass,
+ const BoundingBox& boundingBox,
+ float confidence)
+ : m_Class(detectedClass)
+ , m_BoundingBox(boundingBox)
+ , m_Confidence(confidence)
+ {}
+
+ unsigned int m_Class;
+ BoundingBox m_BoundingBox;
+ float m_Confidence;
+};
+
+using ObjectDetectionInput = std::pair<std::string, DetectedObject>;
+
+} // anonymous namespace \ No newline at end of file