blob: af60be95eccfeab62e3499c235a90fc53e081e3e [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// See LICENSE file in the project root for full license information.
4//
5#include "../YoloInferenceTest.hpp"
6#include "armnnCaffeParser/ICaffeParser.hpp"
7#include "armnn/TypesUtils.hpp"
8
9int main(int argc, char* argv[])
10{
11 armnn::TensorShape inputTensorShape{ { 1, 3, YoloImageHeight, YoloImageWidth } };
12
13 using YoloInferenceModel = InferenceModel<armnnCaffeParser::ICaffeParser,
14 float>;
15
16 return InferenceTestMain(argc, argv, { 0 },
17 [&inputTensorShape]()
18 {
19 return make_unique<YoloTestCaseProvider<YoloInferenceModel>>(
20 [&]
21 (typename YoloInferenceModel::CommandLineOptions modelOptions)
22 {
23 if (!ValidateDirectory(modelOptions.m_ModelDir))
24 {
25 return std::unique_ptr<YoloInferenceModel>();
26 }
27
28 typename YoloInferenceModel::Params modelParams;
29 modelParams.m_ModelPath = modelOptions.m_ModelDir + "yolov1_tiny_voc2007_model.caffemodel";
30 modelParams.m_InputBinding = "data";
31 modelParams.m_OutputBinding = "fc12";
32 modelParams.m_InputTensorShape = &inputTensorShape;
33 modelParams.m_IsModelBinary = true;
34 modelParams.m_ComputeDevice = modelOptions.m_ComputeDevice;
35
36 return std::make_unique<YoloInferenceModel>(modelParams);
37 });
38 });
39}