blob: eb34260e9078cd4647767d6dcc1906ed315b1bf1 [file] [log] [blame]
surmeh01bceff2f2018-03-29 16:29:27 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// See LICENSE file in the project root for full license information.
4//
5#pragma once
6
7#include "ClassifierTestCaseData.hpp"
8
9#include <array>
10#include <string>
11#include <vector>
12#include <memory>
13
14using ImageSet = std::pair<const std::string, unsigned int>;
15
16class MobileNetDatabase
17{
18public:
19 using TTestCaseData = ClassifierTestCaseData<float>;
20
21 explicit MobileNetDatabase(const std::string& binaryFileDirectory,
22 unsigned int width,
23 unsigned int height,
24 const std::vector<ImageSet>& imageSet);
25
26 std::unique_ptr<TTestCaseData> GetTestCaseData(unsigned int testCaseId);
27
28private:
29 unsigned int GetNumImageElements() const { return 3 * m_Width * m_Height; }
30 unsigned int GetNumImageBytes() const { return 4 * GetNumImageElements(); }
31
32 std::string m_BinaryDirectory;
33 unsigned int m_Height;
34 unsigned int m_Width;
35 const std::vector<ImageSet> m_ImageSet;
36};