// // Copyright © 2017 Arm Ltd. All rights reserved. // See LICENSE file in the project root for full license information. // #pragma once #include "ClassifierTestCaseData.hpp" #include #include #include struct YoloBoundingBox { float m_X; float m_Y; float m_W; float m_H; }; struct YoloDetectedObject { YoloDetectedObject(unsigned int yoloClass, const YoloBoundingBox& box, float confidence) : m_Class(yoloClass) , m_Box(box) , m_Confidence(confidence) {} unsigned int m_Class; YoloBoundingBox m_Box; float m_Confidence; }; class YoloTestCaseData { public: YoloTestCaseData(std::vector inputImage, std::vector topObjectDetections) : m_InputImage(std::move(inputImage)) , m_TopObjectDetections(std::move(topObjectDetections)) { } std::vector m_InputImage; std::vector m_TopObjectDetections; }; constexpr unsigned int YoloImageWidth = 448; constexpr unsigned int YoloImageHeight = 448; class YoloDatabase { public: using TTestCaseData = YoloTestCaseData; explicit YoloDatabase(const std::string& imageDir); std::unique_ptr GetTestCaseData(unsigned int testCaseId); private: std::string m_ImageDir; };