ArmNN
 20.02
YoloDatabase.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 #include <array>
10 #include <string>
11 #include <memory>
12 
14 {
15  float m_X;
16  float m_Y;
17  float m_W;
18  float m_H;
19 };
20 
22 {
23  YoloDetectedObject(unsigned int yoloClass,
24  const YoloBoundingBox& box,
25  float confidence)
26  : m_Class(yoloClass)
27  , m_Box(box)
28  , m_Confidence(confidence)
29  {}
30 
31  unsigned int m_Class;
33  float m_Confidence;
34 };
35 
37 {
38 public:
39  YoloTestCaseData(std::vector<float> inputImage,
40  std::vector<YoloDetectedObject> topObjectDetections)
41  : m_InputImage(std::move(inputImage))
42  , m_TopObjectDetections(std::move(topObjectDetections))
43  {
44  }
45 
46  std::vector<float> m_InputImage;
47  std::vector<YoloDetectedObject> m_TopObjectDetections;
48 };
49 
50 constexpr unsigned int YoloImageWidth = 448;
51 constexpr unsigned int YoloImageHeight = 448;
52 
54 {
55 public:
57 
58  explicit YoloDatabase(const std::string& imageDir);
59  std::unique_ptr<TTestCaseData> GetTestCaseData(unsigned int testCaseId);
60 
61 private:
62  std::string m_ImageDir;
63 };
constexpr unsigned int YoloImageHeight
YoloTestCaseData(std::vector< float > inputImage, std::vector< YoloDetectedObject > topObjectDetections)
YoloDetectedObject(unsigned int yoloClass, const YoloBoundingBox &box, float confidence)
YoloBoundingBox m_Box
std::vector< float > m_InputImage
constexpr unsigned int YoloImageWidth
unsigned int m_Class
std::vector< YoloDetectedObject > m_TopObjectDetections