aboutsummaryrefslogtreecommitdiff
path: root/tests/ObjectDetectionCommon.hpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-02-25 17:26:05 +0000
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-02-26 17:41:15 +0000
commit4628d05455dfc179f0437913185e76888115a98a (patch)
treea8eac68ee5aee88a7071ac6f13af7932b98caa87 /tests/ObjectDetectionCommon.hpp
parent452869973b9a45c9c44820d16f92f7dfc96e9aef (diff)
downloadarmnn-4628d05455dfc179f0437913185e76888115a98a.tar.gz
IVGCVSW-2560 Verify Inference test for TensorFlow Lite MobileNet SSD
* Assign output shape of MobileNet SSD to ArmNN network * Add m_OverridenOutputShapes to TfLiteParser to set shape in GetNetworkOutputBindingInfo * Use input quantization instead of output quantization params * Correct data and datatype in Inference test Change-Id: I01ac2e07ed08e8928ba0df33a4847399e1dd8394 Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Diffstat (limited to 'tests/ObjectDetectionCommon.hpp')
-rw-r--r--tests/ObjectDetectionCommon.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/ObjectDetectionCommon.hpp b/tests/ObjectDetectionCommon.hpp
index 85b54c255f..ee3afb5788 100644
--- a/tests/ObjectDetectionCommon.hpp
+++ b/tests/ObjectDetectionCommon.hpp
@@ -31,7 +31,7 @@ struct BoundingBox
struct DetectedObject
{
- DetectedObject(unsigned int detectedClass,
+ DetectedObject(float detectedClass,
const BoundingBox& boundingBox,
float confidence)
: m_Class(detectedClass)
@@ -39,11 +39,17 @@ struct DetectedObject
, m_Confidence(confidence)
{}
- unsigned int m_Class;
+ bool operator<(const DetectedObject& other) const
+ {
+ return m_Confidence < other.m_Confidence ||
+ (m_Confidence == other.m_Confidence && m_Class < other.m_Class);
+ }
+
+ float m_Class;
BoundingBox m_BoundingBox;
float m_Confidence;
};
-using ObjectDetectionInput = std::pair<std::string, DetectedObject>;
+using ObjectDetectionInput = std::pair<std::string, std::vector<DetectedObject>>;
} // anonymous namespace \ No newline at end of file