From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/class_yolo_database.xhtml | 219 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 20.02/class_yolo_database.xhtml (limited to '20.02/class_yolo_database.xhtml') diff --git a/20.02/class_yolo_database.xhtml b/20.02/class_yolo_database.xhtml new file mode 100644 index 0000000000..e08126f143 --- /dev/null +++ b/20.02/class_yolo_database.xhtml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + +ArmNN: YoloDatabase Class Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
YoloDatabase Class Reference
+
+
+ +

#include <YoloDatabase.hpp>

+ + + + +

+Public Types

using TTestCaseData = YoloTestCaseData
 
+ + + + + +

+Public Member Functions

 YoloDatabase (const std::string &imageDir)
 
std::unique_ptr< TTestCaseDataGetTestCaseData (unsigned int testCaseId)
 
+

Detailed Description

+
+

Definition at line 53 of file YoloDatabase.hpp.

+

Member Typedef Documentation

+ +

◆ TTestCaseData

+ +
+
+ + + + +
using TTestCaseData = YoloTestCaseData
+
+ +

Definition at line 56 of file YoloDatabase.hpp.

+ +
+
+

Constructor & Destructor Documentation

+ +

◆ YoloDatabase()

+ +
+
+ + + + + +
+ + + + + + + + +
YoloDatabase (const std::string & imageDir)
+
+explicit
+
+ +

Definition at line 70 of file YoloDatabase.cpp.

+
71  : m_ImageDir(imageDir)
72 {
73 }
+
+
+

Member Function Documentation

+ +

◆ GetTestCaseData()

+ +
+
+ + + + + + + + +
std::unique_ptr< YoloDatabase::TTestCaseData > GetTestCaseData (unsigned int testCaseId)
+
+ +

Definition at line 75 of file YoloDatabase.cpp.

+ +

References ARMNN_LOG, CHECK_LOCATION, GetImageDataInArmNnLayoutAsNormalizedFloats(), armnn::numeric_cast(), InferenceTestImage::Resize(), Rgb, Exception::what(), YoloImageHeight, and YoloImageWidth.

+
76 {
77  testCaseId = testCaseId % boost::numeric_cast<unsigned int>(g_PerTestCaseInputOutput.size());
78  const auto& testCaseInputOutput = g_PerTestCaseInputOutput[testCaseId];
79  const std::string imagePath = m_ImageDir + testCaseInputOutput.first;
80 
81  // Loads test case input image.
82  std::vector<float> imageData;
83  try
84  {
85  InferenceTestImage image(imagePath.c_str());
86  if (YoloImageWidth != image.GetWidth() || YoloImageHeight != image.GetHeight())
87  {
89  }
91  }
92  catch (const InferenceTestImageException& e)
93  {
94  ARMNN_LOG(fatal) << "Failed to load test case " << testCaseId << " with error: " << e.what();
95  return nullptr;
96  }
97 
98  // Prepares test case output.
99  std::vector<YoloDetectedObject> topObjectDetections;
100  topObjectDetections.reserve(1);
101  topObjectDetections.push_back(testCaseInputOutput.second);
102 
103  return std::make_unique<YoloTestCaseData>(std::move(imageData), std::move(topObjectDetections));
104 }
constexpr unsigned int YoloImageHeight
+
virtual const char * what() const noexcept override
Definition: Exceptions.cpp:32
+
#define ARMNN_LOG(severity)
Definition: Logging.hpp:163
+ +
std::vector< float > GetImageDataInArmNnLayoutAsNormalizedFloats(ImageChannelLayout layout, const InferenceTestImage &image)
+
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
Definition: NumericCast.hpp:33
+
#define CHECK_LOCATION()
Definition: Exceptions.hpp:192
+ +
constexpr unsigned int YoloImageWidth
+ +
std::vector< float > Resize(unsigned int newWidth, unsigned int newHeight, const armnn::CheckLocation &location, const ResizingMethods meth=ResizingMethods::STB, const std::array< float, 3 > &mean={{0.0, 0.0, 0.0}}, const std::array< float, 3 > &stddev={{1.0, 1.0, 1.0}}, const float scale=255.0f)
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + + -- cgit v1.2.1