aboutsummaryrefslogtreecommitdiff
path: root/tests/YoloInferenceTest.hpp
diff options
context:
space:
mode:
authorColm Donelan <Colm.Donelan@arm.com>2020-10-29 11:39:14 +0000
committerJim Flynn <jim.flynn@arm.com>2020-10-29 19:24:16 +0000
commit9a5ce4ab5ce777ef683035a4d0f4fcac67847c88 (patch)
tree5989f29900208e1cbc12d7592824776fd6dfa992 /tests/YoloInferenceTest.hpp
parent06e0300ccf279c6b0fcbb5ef3b6fa36e00229492 (diff)
downloadarmnn-9a5ce4ab5ce777ef683035a4d0f4fcac67847c88.tar.gz
IVGCVSW-5265 Remove boost from core ArmNN CMake
* Remove all but Boost_UNIT_TEST_FRAMEWORK_LIBRARY from ArmNN Cmake files. * Remove references to boost::fpc from old test applications. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: Ibb1261dee4b971d1788d2805528aa800a8b883ce
Diffstat (limited to 'tests/YoloInferenceTest.hpp')
-rw-r--r--tests/YoloInferenceTest.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/YoloInferenceTest.hpp b/tests/YoloInferenceTest.hpp
index 4f391a84a5..cb1817a0bb 100644
--- a/tests/YoloInferenceTest.hpp
+++ b/tests/YoloInferenceTest.hpp
@@ -9,10 +9,9 @@
#include <armnn/utility/Assert.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
+#include <armnnUtils/FloatingPointComparison.hpp>
#include <boost/multi_array.hpp>
-#include <boost/test/tools/floating_point_comparison.hpp>
-
#include <algorithm>
#include <array>
#include <utility>
@@ -27,7 +26,6 @@ public:
unsigned int testCaseId,
YoloTestCaseData& testCaseData)
: InferenceModelTestCase<Model>(model, testCaseId, { std::move(testCaseData.m_InputImage) }, { YoloOutputSize })
- , m_FloatComparer(boost::math::fpc::percent_tolerance(1.0f))
, m_TopObjectDetections(std::move(testCaseData.m_TopObjectDetections))
{
}
@@ -155,11 +153,11 @@ public:
return TestCaseResult::Failed;
}
- if (!m_FloatComparer(detectedObject.m_Box.m_X, expectedDetection.m_Box.m_X) ||
- !m_FloatComparer(detectedObject.m_Box.m_Y, expectedDetection.m_Box.m_Y) ||
- !m_FloatComparer(detectedObject.m_Box.m_W, expectedDetection.m_Box.m_W) ||
- !m_FloatComparer(detectedObject.m_Box.m_H, expectedDetection.m_Box.m_H) ||
- !m_FloatComparer(detectedObject.m_Confidence, expectedDetection.m_Confidence))
+ if (!armnnUtils::within_percentage_tolerance(detectedObject.m_Box.m_X, expectedDetection.m_Box.m_X) ||
+ !armnnUtils::within_percentage_tolerance(detectedObject.m_Box.m_Y, expectedDetection.m_Box.m_Y) ||
+ !armnnUtils::within_percentage_tolerance(detectedObject.m_Box.m_W, expectedDetection.m_Box.m_W) ||
+ !armnnUtils::within_percentage_tolerance(detectedObject.m_Box.m_H, expectedDetection.m_Box.m_H) ||
+ !armnnUtils::within_percentage_tolerance(detectedObject.m_Confidence, expectedDetection.m_Confidence))
{
ARMNN_LOG(error) << "Detected bounding box for test case " << this->GetTestCaseId() <<
" is incorrect";
@@ -173,7 +171,6 @@ public:
}
private:
- boost::math::fpc::close_at_tolerance<float> m_FloatComparer;
std::vector<YoloDetectedObject> m_TopObjectDetections;
};