blob: 2c69057253130c32be1376f151aaabd2d549c05d [file] [log] [blame]
Michael Levit06fcf752022-01-12 11:53:46 +02001/*
2 * Copyright (c) 2022 Arm Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17#include "ExpectedObjectDetectionResults.hpp"
18
19
20/*
21//Reference results
22Got 2 boxes
230) (0.999246) -> Detection box: {x=89,y=17,w=41,h=56}
241) (0.995367) -> Detection box: {x=27,y=81,w=48,h=53}
25Entering TestInference
26Got 1 boxes
270) (0.998107) -> Detection box: {x=87,y=35,w=53,h=64}
28Entering TestInference
29Got 2 boxes
300) (0.999244) -> Detection box: {x=105,y=73,w=58,h=66}
311) (0.985984) -> Detection box: {x=34,y=40,w=70,h=95}
32Entering TestInference
33Got 2 boxes
340) (0.993294) -> Detection box: {x=22,y=43,w=39,h=53}
351) (0.992021) -> Detection box: {x=63,y=60,w=38,h=45}
36
37*/
38
39void get_expected_ut_results(std::vector<std::vector<arm::app::DetectionResult>> &expected_results)
40{
41
42 expected_results.resize(4);
43
44 std::vector<arm::app::DetectionResult> img_1(2);
45 std::vector<arm::app::DetectionResult> img_2(1);
46 std::vector<arm::app::DetectionResult> img_3(2);
47 std::vector<arm::app::DetectionResult> img_4(2);
48
49 img_1[0] = arm::app::DetectionResult(0.99,89,17,41,56);
50 img_1[1] = arm::app::DetectionResult(0.99,27,81,48,53);
51
52 img_2[0] = arm::app::DetectionResult(0.99,87,35,53,64);
53
54 img_3[0] = arm::app::DetectionResult(0.99,105,73,58,66);
55 img_3[1] = arm::app::DetectionResult(0.98,34,40,70,95);
56
57 img_4[0] = arm::app::DetectionResult(0.99,22,43,39,53);
58 img_4[1] = arm::app::DetectionResult(0.99,63,60,38,45);
59
60 expected_results[0] = img_1;
61 expected_results[1] = img_2;
62 expected_results[2] = img_3;
63 expected_results[3] = img_4;
64
65
66}