2 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
25 #include "gtest/gtest.h"
27 #include "inference_engine_error.h"
28 #include "inference_engine_common_impl.h"
29 #include "inference_engine_test_common.h"
31 #define INFERENCE_ITERATION 10
33 typedef std::tuple<std::string, int, int, int, int, std::vector<std::string>,
34 int, int, int, std::vector<std::string>,
35 std::vector<std::string>, std::vector<std::string>,
40 typedef std::tuple<std::string, int, bool, bool, inference_engine_cltuner_mode_e,
41 int, int, int, std::vector<std::string>,
42 int, int, int, std::vector<std::string>,
43 std::vector<std::string>, std::vector<std::string>,
47 class InferenceEngineTfliteCLTunerTest : public testing::TestWithParam<ParamType_CLTuner>
49 class InferenceEngineTfliteTest : public testing::TestWithParam<ParamType_Infer>
51 class InferenceEngineCaffeTest : public testing::TestWithParam<ParamType_Infer>
53 class InferenceEngineDldtTest : public testing::TestWithParam<ParamType_Infer>
56 TEST_P(InferenceEngineTfliteTest, Inference)
58 std::string backend_name;
63 std::vector<std::string> image_paths;
67 std::vector<std::string> input_layers;
68 std::vector<std::string> output_layers;
69 std::vector<std::string> model_paths;
70 std::vector<int> answers;
72 std::tie(backend_name, target_devices, test_type, iteration, tensor_type,
73 image_paths, height, width, ch, input_layers, output_layers,
74 model_paths, answers) = GetParam();
80 MachineCapacity *Cap = GetMachineCapacity();
82 std::cout << "Failed to get machine capacity" << std::endl;
86 // If current machine doesn't support inference engine then skip this test.
87 if (Cap->available == false) {
91 // If current machine doesn't support OpenCL then skip the inference on GPU.
92 if (target_devices == INFERENCE_TARGET_GPU && Cap->has_gpu == false) {
96 std::string test_name;
98 case TEST_IMAGE_CLASSIFICATION:
99 test_name.append("Image classification");
101 case TEST_OBJECT_DETECTION:
102 test_name.append("Object detection");
104 case TEST_FACE_DETECTION:
105 test_name.append("Face detection");
107 case TEST_FACIAL_LANDMARK_DETECTION:
108 test_name.append("Facial landmark detection");
110 case TEST_POSE_ESTIMATION:
111 test_name.append("Pose estimation");
113 case TEST_AIC_HAND_GESTURE_1:
114 test_name.append("AIC Hand Gesture detection 1");
116 case TEST_AIC_HAND_GESTURE_2:
117 test_name.append("AIC Hand Gesture detection 2");
121 std::cout << test_name << " inference test : backend = " << backend_name
122 << ", target device = " << Target_Formats[target_devices]
125 int backend_type = -1;
127 // If backend name is "one" then change it to "mlapi"
128 // and set backend_type to INFERENCE_BACKEND_ONE.
129 if (backend_name.compare("one") == 0) {
130 backend_name = "mlapi";
131 backend_type = INFERENCE_BACKEND_ONE;
134 inference_engine_config config = { .backend_name = backend_name,
135 .backend_type = backend_type,
136 .target_devices = target_devices };
138 auto engine = std::make_unique<InferenceEngineCommon>();
139 if (engine == nullptr) {
144 int ret = engine->EnableProfiler(true);
145 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
146 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
150 if (backend_type == INFERENCE_BACKEND_ONE)
151 backend_name = "one";
153 ret = engine->DumpProfileToFile("profile_data_" + backend_name +
154 "_" + Target_Formats[target_devices] +
155 "_tflite_model.txt");
156 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
157 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
161 ret = engine->LoadConfigFile();
162 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
164 ret = engine->BindBackend(&config);
165 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
166 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
170 inference_engine_capacity capacity;
171 ret = engine->GetBackendCapacity(&capacity);
172 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
174 ret = engine->SetTargetDevices(target_devices);
175 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
177 std::vector<std::string> models;
178 int model_type = GetModelInfo(model_paths, models);
179 if (model_type == -1) {
180 ASSERT_NE(model_type, -1);
184 inference_engine_layer_property input_property;
185 std::vector<std::string>::iterator iter;
187 for (iter = input_layers.begin(); iter != input_layers.end(); iter++) {
188 inference_engine_tensor_info tensor_info = {
189 { 1, ch, height, width },
190 (inference_tensor_shape_type_e) INFERENCE_TENSOR_SHAPE_NCHW,
191 (inference_tensor_data_type_e) tensor_type,
192 (size_t)(1 * ch * height * width)
195 input_property.layer_names.push_back(*iter);
196 input_property.tensor_infos.push_back(tensor_info);
199 ret = engine->SetInputLayerProperty(input_property);
200 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
201 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
205 inference_engine_layer_property output_property;
207 for (iter = output_layers.begin(); iter != output_layers.end(); iter++) {
208 output_property.layer_names.push_back(*iter);
211 ret = engine->SetOutputLayerProperty(output_property);
212 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
213 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
217 ret = engine->Load(models, (inference_model_format_e) model_type);
218 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
219 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
223 std::vector<inference_engine_tensor_buffer> inputs, outputs;
224 ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
225 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
226 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
230 // Copy input image tensor data from a given file to input tensor buffer.
231 for (int i = 0; i < (int) image_paths.size(); ++i) {
232 CopyFileToMemory(image_paths[i].c_str(), inputs[i], inputs[i].size);
235 for (int repeat = 0; repeat < iteration; ++repeat) {
236 ret = engine->Run(inputs, outputs);
237 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
241 FillOutputResult(engine.get(), outputs, result);
244 case TEST_IMAGE_CLASSIFICATION:
245 ret = VerifyImageClassificationResults(result, answers[0]);
248 case TEST_OBJECT_DETECTION:
249 // 1072 : fixed height size of dumped image, 1608 : fixed width size of dumped image.
250 ret = VerifyObjectDetectionResults(result, answers, 1072, 1608);
253 case TEST_FACE_DETECTION:
254 // 1152 : fixed height size of dumped image, 1536 : fixed width size of dumped image.
255 ret = VerifyObjectDetectionResults(result, answers, 1152, 1536);
258 case TEST_FACIAL_LANDMARK_DETECTION:
261 case TEST_POSE_ESTIMATION:
262 // 563 : fixed height size of dumped image, 750 : fixed width size of dumped image.
263 ret = VerifyPoseEstimationResults(result, answers, 563, 750);
266 case TEST_AIC_HAND_GESTURE_1:
267 ret = VerifyAICHandGesture1Results(outputs);
270 case TEST_AIC_HAND_GESTURE_2:
271 ret = VerifyAICHandGesture2Results(outputs, answers);
276 CleanupTensorBuffers(inputs, outputs);
278 engine->UnbindBackend();
282 TEST_P(InferenceEngineTfliteCLTunerTest, Inference)
284 std::string backend_name;
288 inference_engine_cltuner_mode_e tuning_mode;
292 std::vector<std::string> image_paths;
296 std::vector<std::string> input_layers;
297 std::vector<std::string> output_layers;
298 std::vector<std::string> model_paths;
299 std::vector<int> answers;
301 std::tie(backend_name, target_devices, active, update, tuning_mode, test_type,
302 iteration, tensor_type, image_paths, height, width, ch, input_layers,
303 output_layers, model_paths, answers) = GetParam();
309 MachineCapacity *Cap = GetMachineCapacity();
311 std::cout << "Failed to get machine capacity" << std::endl;
315 // If current machine doesn't support inference engine then skip this test.
316 if (Cap->available == false) {
320 // If current machine doesn't support OpenCL then skip the inference on GPU.
321 if (target_devices == INFERENCE_TARGET_GPU && Cap->has_gpu == false) {
325 std::string test_name;
327 case TEST_IMAGE_CLASSIFICATION:
328 test_name.append("Image classification");
330 case TEST_OBJECT_DETECTION:
331 test_name.append("Object detection");
333 case TEST_FACE_DETECTION:
334 test_name.append("Face detection");
336 case TEST_FACIAL_LANDMARK_DETECTION:
337 test_name.append("Facial landmark detection");
339 case TEST_POSE_ESTIMATION:
340 test_name.append("Pose estimation");
342 case TEST_AIC_HAND_GESTURE_1:
343 test_name.append("AIC Hand Gesture detection 1");
345 case TEST_AIC_HAND_GESTURE_2:
346 test_name.append("AIC Hand Gesture detection 2");
350 std::cout << test_name << " inference test : backend = " << backend_name
351 << ", target device = " << Target_Formats[target_devices]
352 << ", CLTuning mode = " << tuning_mode << std::endl;
354 int backend_type = -1;
356 // If backend name is "one" then change it to "mlapi"
357 // and set backend_type to INFERENCE_BACKEND_ONE.
358 if (backend_name.compare("one") == 0) {
359 backend_name = "mlapi";
360 backend_type = INFERENCE_BACKEND_ONE;
363 inference_engine_config config = { .backend_name = backend_name,
364 .backend_type = backend_type,
365 .target_devices = target_devices };
367 auto engine = std::make_unique<InferenceEngineCommon>();
370 int ret = engine->EnableProfiler(true);
371 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
373 if (backend_type == INFERENCE_BACKEND_ONE)
374 backend_name = "one";
376 ret = engine->DumpProfileToFile("profile_data_" + backend_name +
377 "_" + Target_Formats[target_devices] +
378 "_tflite_model.txt");
379 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
381 ret = engine->LoadConfigFile();
382 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
384 ret = engine->BindBackend(&config);
385 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
387 inference_engine_capacity capacity;
388 ret = engine->GetBackendCapacity(&capacity);
389 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
391 if (capacity.cltuner_supported) {
392 inference_engine_cltuner cltuner;
393 cltuner.active = active;
394 cltuner.update = update;
395 cltuner.tuning_mode = tuning_mode;
397 ret = engine->SetCLTuner(&cltuner);
398 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
401 ret = engine->SetTargetDevices(target_devices);
402 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
404 std::vector<std::string> models;
405 int model_type = GetModelInfo(model_paths, models);
406 ASSERT_NE(model_type, -1);
408 std::vector<std::string>::iterator iter;
410 inference_engine_tensor_info tensor_info = {
411 { 1, ch, height, width },
412 INFERENCE_TENSOR_SHAPE_NCHW,
413 static_cast<inference_tensor_data_type_e>(tensor_type),
414 static_cast<size_t>(1 * ch * height * width)
417 inference_engine_layer_property input_property;
419 for (auto &input : input_layers) {
420 input_property.layer_names.push_back(input);
421 input_property.tensor_infos.push_back(tensor_info);
424 ret = engine->SetInputLayerProperty(input_property);
425 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
427 inference_engine_layer_property output_property = { output_layers, {} };
429 ret = engine->SetOutputLayerProperty(output_property);
430 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
432 ret = engine->Load(models, (inference_model_format_e) model_type);
433 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
435 std::vector<inference_engine_tensor_buffer> inputs, outputs;
436 ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
437 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
439 // Copy input image tensor data from a given file to input tensor buffer.
440 for (int i = 0; i < (int) image_paths.size(); ++i) {
441 CopyFileToMemory(image_paths[i].c_str(), inputs[i], inputs[i].size);
444 for (int repeat = 0; repeat < iteration; ++repeat) {
445 ret = engine->Run(inputs, outputs);
446 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
450 FillOutputResult(engine.get(), outputs, result);
453 case TEST_IMAGE_CLASSIFICATION:
454 ret = VerifyImageClassificationResults(result, answers[0]);
457 case TEST_OBJECT_DETECTION:
458 // 1072 : fixed height size of dumped image, 1608 : fixed width size of dumped image.
459 ret = VerifyObjectDetectionResults(result, answers, 1072, 1608);
462 case TEST_FACE_DETECTION:
463 // 1152 : fixed height size of dumped image, 1536 : fixed width size of dumped image.
464 ret = VerifyObjectDetectionResults(result, answers, 1152, 1536);
467 case TEST_FACIAL_LANDMARK_DETECTION:
470 case TEST_POSE_ESTIMATION:
471 // 563 : fixed height size of dumped image, 750 : fixed width size of dumped image.
472 ret = VerifyPoseEstimationResults(result, answers, 563, 750);
475 case TEST_AIC_HAND_GESTURE_1:
476 ret = VerifyAICHandGesture1Results(outputs);
479 case TEST_AIC_HAND_GESTURE_2:
480 ret = VerifyAICHandGesture2Results(outputs, answers);
485 CleanupTensorBuffers(inputs, outputs);
487 engine->UnbindBackend();
492 TEST_P(InferenceEngineCaffeTest, Inference)
494 std::string backend_name;
499 std::vector<std::string> image_paths;
503 std::vector<std::string> input_layers;
504 std::vector<std::string> output_layers;
505 std::vector<std::string> model_paths;
506 std::vector<int> answers;
508 std::tie(backend_name, target_devices, test_type, iteration, tensor_type,
509 image_paths, height, width, ch, input_layers, output_layers,
510 model_paths, answers) = GetParam();
516 MachineCapacity *Cap = GetMachineCapacity();
518 std::cout << "Failed to get machine capacity" << std::endl;
522 // If current machine doesn't support inference engine then skip this test.
523 if (Cap->available == false) {
527 // If current machine doesn't support OpenCL then skip the inference on GPU.
528 if (target_devices == INFERENCE_TARGET_GPU && Cap->has_gpu == false) {
532 std::string test_name;
534 case TEST_IMAGE_CLASSIFICATION:
535 test_name.append("Image classification");
537 case TEST_OBJECT_DETECTION:
538 test_name.append("Object detection");
540 case TEST_FACE_DETECTION:
541 test_name.append("Face detection");
543 case TEST_FACIAL_LANDMARK_DETECTION:
544 test_name.append("Facial landmark detection");
546 case TEST_POSE_ESTIMATION:
547 test_name.append("Pose estimation");
551 std::cout << test_name << " inference test : backend = " << backend_name
552 << ", target device = " << Target_Formats[target_devices]
554 inference_engine_config config = { .backend_name = backend_name,
556 .target_devices = target_devices };
558 auto engine = std::make_unique<InferenceEngineCommon>();
559 if (engine == nullptr) {
564 int ret = engine->EnableProfiler(true);
565 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
566 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
570 ret = engine->DumpProfileToFile("profile_data_" + backend_name +
572 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
573 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
577 ret = engine->LoadConfigFile();
578 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
580 ret = engine->BindBackend(&config);
581 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
582 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
586 inference_engine_capacity capacity;
587 ret = engine->GetBackendCapacity(&capacity);
588 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
590 ret = engine->SetTargetDevices(target_devices);
591 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
593 std::vector<std::string> models;
594 int model_type = GetModelInfo(model_paths, models);
595 if (model_type == -1) {
596 ASSERT_NE(model_type, -1);
600 inference_engine_layer_property input_property;
601 std::vector<std::string>::iterator iter;
603 for (iter = input_layers.begin(); iter != input_layers.end(); iter++) {
604 inference_engine_tensor_info tensor_info = {
605 { 1, ch, height, width },
606 (inference_tensor_shape_type_e) INFERENCE_TENSOR_SHAPE_NCHW,
607 (inference_tensor_data_type_e) tensor_type,
608 (size_t)(1 * ch * height * width)
611 input_property.layer_names.push_back(*iter);
612 input_property.tensor_infos.push_back(tensor_info);
615 ret = engine->SetInputLayerProperty(input_property);
616 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
617 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
621 inference_engine_layer_property output_property;
623 for (iter = output_layers.begin(); iter != output_layers.end(); iter++) {
624 output_property.layer_names.push_back(*iter);
627 ret = engine->SetOutputLayerProperty(output_property);
628 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
629 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
633 ret = engine->Load(models, (inference_model_format_e) model_type);
634 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
635 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
639 std::vector<inference_engine_tensor_buffer> inputs, outputs;
640 ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
641 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
642 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
646 // Copy input image tensor data from a given file to input tensor buffer.
647 for (int i = 0; i < (int) image_paths.size(); ++i) {
648 CopyFileToMemory(image_paths[i].c_str(), inputs[i], inputs[i].size);
651 for (int repeat = 0; repeat < iteration; ++repeat) {
652 ret = engine->Run(inputs, outputs);
653 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
657 FillOutputResult(engine.get(), outputs, result);
660 case TEST_IMAGE_CLASSIFICATION:
661 ret = VerifyImageClassificationResults(result, answers[0]);
664 case TEST_OBJECT_DETECTION:
665 // 1024 : fixed height size of dumped image, 636 : fixed width size of dumped image.
666 ret = VerifyObjectDetectionResults(result, answers, 636, 1024);
669 case TEST_FACE_DETECTION:
670 // 1152 : fixed height size of dumped image, 1536 : fixed width size of dumped image.
671 ret = VerifyObjectDetectionResults(result, answers, 1152, 1536);
674 case TEST_FACIAL_LANDMARK_DETECTION:
675 // 128 : fixed height size of dumped image, 128 : fixed width size of dumped image.
676 ret = VerifyFacialLandmarkDetectionResults(result, answers, 128, 128);
679 case TEST_POSE_ESTIMATION:
680 // 563 : fixed height size of dumped image, 750 : fixed width size of dumped image.
681 ret = VerifyPoseEstimationResults(result, answers, 563, 750);
686 CleanupTensorBuffers(inputs, outputs);
688 engine->UnbindBackend();
692 TEST_P(InferenceEngineDldtTest, Inference)
694 std::string backend_name;
699 std::vector<std::string> image_paths;
703 std::vector<std::string> input_layers;
704 std::vector<std::string> output_layers;
705 std::vector<std::string> model_paths;
706 std::vector<int> answers;
708 std::tie(backend_name, target_devices, test_type, iteration, tensor_type,
709 image_paths, height, width, ch, input_layers, output_layers,
710 model_paths, answers) = GetParam();
716 MachineCapacity *Cap = GetMachineCapacity();
718 std::cout << "Failed to get machine capacity" << std::endl;
722 // If current machine doesn't support inference engine then skip this test.
723 if (Cap->available == false) {
727 // If current machine doesn't support OpenCL then skip the inference on GPU.
728 if (target_devices == INFERENCE_TARGET_GPU && Cap->has_gpu == false) {
732 std::string test_name;
734 case TEST_IMAGE_CLASSIFICATION:
735 test_name.append("Image classification");
737 case TEST_OBJECT_DETECTION:
738 test_name.append("Object detection");
740 case TEST_FACE_DETECTION:
741 test_name.append("Face detection");
743 case TEST_FACIAL_LANDMARK_DETECTION:
744 test_name.append("Facial landmark detection");
746 case TEST_POSE_ESTIMATION:
747 test_name.append("Pose estimation");
751 std::cout << test_name << " inference test : backend = " << backend_name
752 << ", target device = " << Target_Formats[target_devices]
754 inference_engine_config config = { .backend_name = backend_name,
756 .target_devices = target_devices };
758 auto engine = std::make_unique<InferenceEngineCommon>();
759 if (engine == nullptr) {
764 int ret = engine->EnableProfiler(true);
765 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
766 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
770 ret = engine->DumpProfileToFile("profile_data_" + backend_name +
772 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
773 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
777 ret = engine->LoadConfigFile();
778 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
780 ret = engine->BindBackend(&config);
781 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
782 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
786 inference_engine_capacity capacity;
787 ret = engine->GetBackendCapacity(&capacity);
788 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
790 ret = engine->SetTargetDevices(target_devices);
791 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
793 std::vector<std::string> models;
794 int model_type = GetModelInfo(model_paths, models);
795 if (model_type == -1) {
796 ASSERT_NE(model_type, -1);
800 inference_engine_layer_property input_property;
801 std::vector<std::string>::iterator iter;
803 for (iter = input_layers.begin(); iter != input_layers.end(); iter++) {
804 inference_engine_tensor_info tensor_info = {
805 { 1, ch, height, width },
806 (inference_tensor_shape_type_e) INFERENCE_TENSOR_SHAPE_NCHW,
807 (inference_tensor_data_type_e) tensor_type,
808 (size_t)(1 * ch * height * width)
811 input_property.layer_names.push_back(*iter);
812 input_property.tensor_infos.push_back(tensor_info);
815 ret = engine->SetInputLayerProperty(input_property);
816 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
817 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
821 inference_engine_layer_property output_property;
823 for (iter = output_layers.begin(); iter != output_layers.end(); iter++) {
824 output_property.layer_names.push_back(*iter);
827 ret = engine->SetOutputLayerProperty(output_property);
828 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
829 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
833 ret = engine->Load(models, (inference_model_format_e) model_type);
834 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
835 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
839 std::vector<inference_engine_tensor_buffer> inputs, outputs;
840 ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
841 if (ret != INFERENCE_ENGINE_ERROR_NONE) {
842 ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
846 // Copy input image tensor data from a given file to input tensor buffer.
847 for (int i = 0; i < (int) image_paths.size(); ++i) {
848 CopyFileToMemory(image_paths[i].c_str(), inputs[i], inputs[i].size);
851 for (int repeat = 0; repeat < iteration; ++repeat) {
852 ret = engine->Run(inputs, outputs);
853 EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
857 FillOutputResult(engine.get(), outputs, result);
860 case TEST_IMAGE_CLASSIFICATION:
861 ret = VerifyImageClassificationResults(result, answers[0]);
864 case TEST_OBJECT_DETECTION:
865 // 1024 : fixed height size of dumped image, 636 : fixed width size of dumped image.
866 ret = VerifyObjectDetectionResults(result, answers, 636, 1024);
869 case TEST_FACE_DETECTION:
870 // 1152 : fixed height size of dumped image, 1536 : fixed width size of dumped image.
871 ret = VerifyObjectDetectionResults(result, answers, 1152, 1536);
874 case TEST_FACIAL_LANDMARK_DETECTION:
875 // 128 : fixed height size of dumped image, 128 : fixed width size of dumped image.
876 ret = VerifyFacialLandmarkDetectionResults(result, answers, 128, 128);
879 case TEST_POSE_ESTIMATION:
880 // 563 : fixed height size of dumped image, 750 : fixed width size of dumped image.
881 ret = VerifyPoseEstimationResults(result, answers, 563, 750);
886 CleanupTensorBuffers(inputs, outputs);
888 engine->UnbindBackend();
892 INSTANTIATE_TEST_CASE_P(
893 Opensource, InferenceEngineTfliteTest,
895 // parameter order : backend name, target device, input image path/s, height, width, channel count, input layer names, output layer names, model path/s, inference result
896 // mobilenet based image classification test
899 "armnn", INFERENCE_TARGET_CPU,
900 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
901 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
902 { "/opt/usr/images/image_classification.bin" }, 224,
903 224, 3, { "input_2" }, { "dense_3/Softmax" },
904 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
906 // quantized mobilenet based image classification test
908 "armnn", INFERENCE_TARGET_CPU,
909 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
910 INFERENCE_TENSOR_DATA_TYPE_UINT8,
911 { "/opt/usr/images/image_classification_q.bin" }, 224,
913 { "MobilenetV1/Predictions/Reshape_1" },
914 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
916 // object detection test
918 "armnn", INFERENCE_TARGET_CPU, TEST_OBJECT_DETECTION,
919 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
920 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
921 { "normalized_input_image_tensor" },
922 { "TFLite_Detection_PostProcess",
923 "TFLite_Detection_PostProcess:1",
924 "TFLite_Detection_PostProcess:2",
925 "TFLite_Detection_PostProcess:3" },
926 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
927 { 451, 474, 714, 969 }),
928 // face detection test
930 "armnn", INFERENCE_TARGET_CPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
931 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
932 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
933 { "normalized_input_image_tensor" },
934 { "TFLite_Detection_PostProcess",
935 "TFLite_Detection_PostProcess:1",
936 "TFLite_Detection_PostProcess:2",
937 "TFLite_Detection_PostProcess:3" },
938 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
939 { 727, 225, 960, 555 }),
940 // pose estimation test
942 "armnn", INFERENCE_TARGET_CPU, TEST_POSE_ESTIMATION, INFERENCE_ITERATION,
943 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
944 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
946 { "Convolutional_Pose_Machine/stage_5_out" },
947 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
948 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
949 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
950 123, 99, 287, 381, 451, 287, 381, 475 }),
951 // Hand gesture model 1 from AIC
952 ParamType_Infer("armnn", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
953 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
954 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
955 // Hand gesture model 2 from AIC
956 ParamType_Infer("armnn", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
957 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
958 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
959 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
960 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
961 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
962 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
964 // mobilenet based image classification test
966 "armnn", INFERENCE_TARGET_GPU,
967 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
968 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
969 { "/opt/usr/images/image_classification.bin" }, 224,
970 224, 3, { "input_2" }, { "dense_3/Softmax" },
971 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
973 // quantized mobilenet based image classification test
975 "armnn", INFERENCE_TARGET_GPU,
976 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
977 INFERENCE_TENSOR_DATA_TYPE_UINT8,
978 { "/opt/usr/images/image_classification_q.bin" }, 224,
980 { "MobilenetV1/Predictions/Reshape_1" },
981 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
983 // object detection test
985 "armnn", INFERENCE_TARGET_GPU, TEST_OBJECT_DETECTION,
986 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
987 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
988 { "normalized_input_image_tensor" },
989 { "TFLite_Detection_PostProcess",
990 "TFLite_Detection_PostProcess:1",
991 "TFLite_Detection_PostProcess:2",
992 "TFLite_Detection_PostProcess:3" },
993 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
994 { 451, 474, 714, 969 }),
995 // face detection test
997 "armnn", INFERENCE_TARGET_GPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
998 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
999 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
1000 { "normalized_input_image_tensor" },
1001 { "TFLite_Detection_PostProcess",
1002 "TFLite_Detection_PostProcess:1",
1003 "TFLite_Detection_PostProcess:2",
1004 "TFLite_Detection_PostProcess:3" },
1005 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
1006 { 727, 225, 960, 555 }),
1007 // pose estimation test
1009 "armnn", INFERENCE_TARGET_GPU, TEST_POSE_ESTIMATION, INFERENCE_ITERATION,
1010 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1011 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
1013 { "Convolutional_Pose_Machine/stage_5_out" },
1014 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
1015 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
1016 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
1017 123, 99, 287, 381, 451, 287, 381, 475 }),
1018 // Hand gesture model 1 from AIC
1019 ParamType_Infer("armnn", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1020 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
1021 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
1022 // Hand gesture model 2 from AIC
1023 ParamType_Infer("armnn", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1024 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
1025 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
1026 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
1027 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
1028 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
1029 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
1032 /*********************************************************************************/
1033 // parameter order : backend name, target device, input image path/s, height, width, channel count, input layer names, output layer names, model path/s, inference result
1034 // mobilenet based image classification test
1037 "tflite", INFERENCE_TARGET_CPU,
1038 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1039 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1040 { "/opt/usr/images/image_classification.bin" }, 224,
1041 224, 3, { "input_2" }, { "dense_3/Softmax" },
1042 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1044 // quantized mobilenet based image classification test
1046 "tflite", INFERENCE_TARGET_CPU,
1047 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1048 INFERENCE_TENSOR_DATA_TYPE_UINT8,
1049 { "/opt/usr/images/image_classification_q.bin" }, 224,
1050 224, 3, { "input" },
1051 { "MobilenetV1/Predictions/Reshape_1" },
1052 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
1054 // object detection test
1056 "tflite", INFERENCE_TARGET_CPU, TEST_OBJECT_DETECTION,
1057 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1058 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
1059 { "normalized_input_image_tensor" },
1060 { "TFLite_Detection_PostProcess",
1061 "TFLite_Detection_PostProcess:1",
1062 "TFLite_Detection_PostProcess:2",
1063 "TFLite_Detection_PostProcess:3" },
1064 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
1065 { 451, 474, 714, 969 }),
1066 // face detection test
1068 "tflite", INFERENCE_TARGET_CPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1069 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1070 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
1071 { "normalized_input_image_tensor" },
1072 { "TFLite_Detection_PostProcess",
1073 "TFLite_Detection_PostProcess:1",
1074 "TFLite_Detection_PostProcess:2",
1075 "TFLite_Detection_PostProcess:3" },
1076 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
1077 { 727, 225, 960, 555 }),
1078 // pose estimation test
1080 "tflite", INFERENCE_TARGET_CPU, TEST_POSE_ESTIMATION,
1081 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1082 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
1084 { "Convolutional_Pose_Machine/stage_5_out" },
1085 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
1086 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
1087 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
1088 123, 99, 287, 381, 451, 287, 381, 475 }),
1089 // Hand gesture model 1 from AIC
1090 ParamType_Infer("tflite", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1091 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
1092 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
1093 // Hand gesture model 2 from AIC
1094 ParamType_Infer("tflite", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1095 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
1096 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
1097 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
1098 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
1099 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
1100 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
1103 // mobilenet based image classification test
1105 "tflite", INFERENCE_TARGET_GPU,
1106 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1107 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1108 { "/opt/usr/images/image_classification.bin" }, 224,
1109 224, 3, { "input_2" }, { "dense_3/Softmax" },
1110 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1112 // quantized mobilenet based image classification test
1114 "tflite", INFERENCE_TARGET_GPU,
1115 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1116 INFERENCE_TENSOR_DATA_TYPE_UINT8,
1117 { "/opt/usr/images/image_classification_q.bin" }, 224,
1118 224, 3, { "input" },
1119 { "MobilenetV1/Predictions/Reshape_1" },
1120 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
1122 // object detection test
1124 "tflite", INFERENCE_TARGET_GPU, TEST_OBJECT_DETECTION,
1125 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1126 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
1127 { "normalized_input_image_tensor" },
1128 { "TFLite_Detection_PostProcess",
1129 "TFLite_Detection_PostProcess:1",
1130 "TFLite_Detection_PostProcess:2",
1131 "TFLite_Detection_PostProcess:3" },
1132 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
1133 { 451, 474, 714, 969 }),
1134 // face detection test
1136 "tflite", INFERENCE_TARGET_GPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1137 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1138 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
1139 { "normalized_input_image_tensor" },
1140 { "TFLite_Detection_PostProcess",
1141 "TFLite_Detection_PostProcess:1",
1142 "TFLite_Detection_PostProcess:2",
1143 "TFLite_Detection_PostProcess:3" },
1144 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
1145 { 727, 225, 960, 555 }),
1146 // pose estimation test
1148 "tflite", INFERENCE_TARGET_GPU, TEST_POSE_ESTIMATION,
1149 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1150 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
1152 { "Convolutional_Pose_Machine/stage_5_out" },
1153 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
1154 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
1155 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
1156 123, 99, 287, 381, 451, 287, 381, 475 }),
1157 // Hand gesture model 1 from AIC
1158 ParamType_Infer("tflite", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1159 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
1160 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
1161 // Hand gesture model 2 from AIC
1162 ParamType_Infer("tflite", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1163 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
1164 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
1165 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
1166 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
1167 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
1168 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
1173 INSTANTIATE_TEST_CASE_P(
1174 Inhouse, InferenceEngineTfliteTest,
1176 /*********************************************************************************/
1177 // parameter order : backend name, target device, input image path/s, height, width, channel count, input layer names, output layer names, model path/s, inference result
1178 // mobilenet based image classification test
1181 "one", INFERENCE_TARGET_CPU,
1182 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1183 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1184 { "/opt/usr/images/image_classification.bin" }, 224,
1185 224, 3, { "input_2" }, { "dense_3/Softmax" },
1186 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1188 // quantized mobilenet based image classification test
1190 "one", INFERENCE_TARGET_CPU,
1191 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1192 INFERENCE_TENSOR_DATA_TYPE_UINT8,
1193 { "/opt/usr/images/image_classification_q.bin" }, 224,
1194 224, 3, { "input" },
1195 { "MobilenetV1/Predictions/Reshape_1" },
1196 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
1198 // object detection test
1200 "one", INFERENCE_TARGET_CPU, TEST_OBJECT_DETECTION,
1201 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1202 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
1203 { "normalized_input_image_tensor" },
1204 { "TFLite_Detection_PostProcess",
1205 "TFLite_Detection_PostProcess:1",
1206 "TFLite_Detection_PostProcess:2",
1207 "TFLite_Detection_PostProcess:3" },
1208 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
1209 { 451, 474, 714, 969 }),
1210 // face detection test
1212 "one", INFERENCE_TARGET_CPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1213 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1214 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
1215 { "normalized_input_image_tensor" },
1216 { "TFLite_Detection_PostProcess",
1217 "TFLite_Detection_PostProcess:1",
1218 "TFLite_Detection_PostProcess:2",
1219 "TFLite_Detection_PostProcess:3" },
1220 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
1221 { 727, 225, 960, 555 }),
1222 // pose estimation test
1224 "one", INFERENCE_TARGET_CPU, TEST_POSE_ESTIMATION,
1225 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1226 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
1228 { "Convolutional_Pose_Machine/stage_5_out" },
1229 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
1230 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
1231 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
1232 123, 99, 287, 381, 451, 287, 381, 475 }),
1233 // Hand gesture model 1 from AIC
1234 ParamType_Infer("one", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1235 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
1236 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
1237 // Hand gesture model 2 from AIC
1238 ParamType_Infer("one", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1239 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
1240 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
1241 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
1242 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
1243 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
1244 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
1247 // mobilenet based image classification test
1249 "one", INFERENCE_TARGET_GPU,
1250 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1251 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1252 { "/opt/usr/images/image_classification.bin" }, 224,
1253 224, 3, { "input_2" }, { "dense_3/Softmax" },
1254 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1256 // quantized mobilenet based image classification test
1258 "one", INFERENCE_TARGET_GPU,
1259 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1260 INFERENCE_TENSOR_DATA_TYPE_UINT8,
1261 { "/opt/usr/images/image_classification_q.bin" }, 224,
1262 224, 3, { "input" },
1263 { "MobilenetV1/Predictions/Reshape_1" },
1264 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
1266 // object detection test
1268 "one", INFERENCE_TARGET_GPU, TEST_OBJECT_DETECTION,
1269 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1270 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
1271 { "normalized_input_image_tensor" },
1272 { "TFLite_Detection_PostProcess",
1273 "TFLite_Detection_PostProcess:1",
1274 "TFLite_Detection_PostProcess:2",
1275 "TFLite_Detection_PostProcess:3" },
1276 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
1277 { 451, 474, 714, 969 }),
1278 // face detection test
1280 "one", INFERENCE_TARGET_GPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1281 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1282 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
1283 { "normalized_input_image_tensor" },
1284 { "TFLite_Detection_PostProcess",
1285 "TFLite_Detection_PostProcess:1",
1286 "TFLite_Detection_PostProcess:2",
1287 "TFLite_Detection_PostProcess:3" },
1288 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
1289 { 727, 225, 960, 555 }),
1290 // pose estimation test
1292 "one", INFERENCE_TARGET_GPU, TEST_POSE_ESTIMATION,
1293 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1294 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
1296 { "Convolutional_Pose_Machine/stage_5_out" },
1297 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
1298 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
1299 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
1300 123, 99, 287, 381, 451, 287, 381, 475 }),
1301 // Hand gesture model 1 from AIC
1302 ParamType_Infer("one", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1303 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
1304 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
1305 // Hand gesture model 2 from AIC
1306 ParamType_Infer("one", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1307 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
1308 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
1309 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
1310 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
1311 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
1312 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
1315 /*********************************************************************************/
1316 // parameter order : backend name, target device, input image path/s, height, width, channel count, input layer names, output layer names, model path/s, inference result
1317 // mobilenet based image classification test
1318 // TFLITE via MLAPI.
1320 "one", INFERENCE_TARGET_CPU,
1321 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1322 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1323 { "/opt/usr/images/image_classification.bin" }, 224,
1324 224, 3, { "input_2" }, { "dense_3/Softmax" },
1325 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1327 // quantized mobilenet based image classification test
1329 "one", INFERENCE_TARGET_CPU,
1330 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1331 INFERENCE_TENSOR_DATA_TYPE_UINT8,
1332 { "/opt/usr/images/image_classification_q.bin" }, 224,
1333 224, 3, { "input" },
1334 { "MobilenetV1/Predictions/Reshape_1" },
1335 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
1337 // object detection test
1339 "one", INFERENCE_TARGET_CPU, TEST_OBJECT_DETECTION,
1340 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1341 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
1342 { "normalized_input_image_tensor" },
1343 { "TFLite_Detection_PostProcess",
1344 "TFLite_Detection_PostProcess:1",
1345 "TFLite_Detection_PostProcess:2",
1346 "TFLite_Detection_PostProcess:3" },
1347 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
1348 { 451, 474, 714, 969 }),
1349 // face detection test
1351 "one", INFERENCE_TARGET_CPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1352 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1353 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
1354 { "normalized_input_image_tensor" },
1355 { "TFLite_Detection_PostProcess",
1356 "TFLite_Detection_PostProcess:1",
1357 "TFLite_Detection_PostProcess:2",
1358 "TFLite_Detection_PostProcess:3" },
1359 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
1360 { 727, 225, 960, 555 }),
1361 // pose estimation test
1363 "one", INFERENCE_TARGET_CPU, TEST_POSE_ESTIMATION,
1364 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1365 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
1367 { "Convolutional_Pose_Machine/stage_5_out" },
1368 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
1369 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
1370 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
1371 123, 99, 287, 381, 451, 287, 381, 475 }),
1372 // Hand gesture model 1 from AIC
1373 ParamType_Infer("one", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1374 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
1375 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
1376 // Hand gesture model 2 from AIC
1377 ParamType_Infer("one", INFERENCE_TARGET_CPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1378 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
1379 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
1380 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
1381 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
1382 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
1383 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
1386 // mobilenet based image classification test
1388 "one", INFERENCE_TARGET_GPU,
1389 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1390 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1391 { "/opt/usr/images/image_classification.bin" }, 224,
1392 224, 3, { "input_2" }, { "dense_3/Softmax" },
1393 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1396 // quantized mobilenet based image classification test
1398 "one", INFERENCE_TARGET_GPU,
1399 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1400 INFERENCE_TENSOR_DATA_TYPE_UINT8,
1401 { "/opt/usr/images/image_classification_q.bin" }, 224,
1402 224, 3, { "input" },
1403 { "MobilenetV1/Predictions/Reshape_1" },
1404 { "/usr/share/capi-media-vision/models/IC_Q/tflite/ic_tflite_q_model.tflite" },
1407 // object detection test
1409 "one", INFERENCE_TARGET_GPU, TEST_OBJECT_DETECTION,
1410 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1411 { "/opt/usr/images/object_detection.bin" }, 300, 300, 3,
1412 { "normalized_input_image_tensor" },
1413 { "TFLite_Detection_PostProcess",
1414 "TFLite_Detection_PostProcess:1",
1415 "TFLite_Detection_PostProcess:2",
1416 "TFLite_Detection_PostProcess:3" },
1417 { "/usr/share/capi-media-vision/models/OD/tflite/od_tflite_model.tflite" },
1418 { 451, 474, 714, 969 }),
1420 // face detection test
1422 "one", INFERENCE_TARGET_GPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1423 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1424 { "/opt/usr/images/face_detection.bin" }, 300, 300, 3,
1425 { "normalized_input_image_tensor" },
1426 { "TFLite_Detection_PostProcess",
1427 "TFLite_Detection_PostProcess:1",
1428 "TFLite_Detection_PostProcess:2",
1429 "TFLite_Detection_PostProcess:3" },
1430 { "/usr/share/capi-media-vision/models/FD/tflite/fd_tflite_model1.tflite" },
1431 { 727, 225, 960, 555 }),
1433 // pose estimation test
1435 "one", INFERENCE_TARGET_GPU, TEST_POSE_ESTIMATION,
1436 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1437 { "/opt/usr/images/pose_estimation.bin" }, 192, 192, 3,
1439 { "Convolutional_Pose_Machine/stage_5_out" },
1440 { "/usr/share/capi-media-vision/models/PE/tflite/ped_tflite_model.tflite" },
1441 { 382, 351, 320, 257, 226, 414, 414, 445, 351, 351,
1442 351, 382, 382, 382, 76, 146, 170, 193, 216, 146,
1443 123, 99, 287, 381, 451, 287, 381, 475 }),
1444 // Hand gesture model 1 from AIC
1445 ParamType_Infer("one", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_1, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1446 { "/opt/usr/images/hand.bin" }, 224, 224, 3, { "input" }, { "mobilenetv2/boundingbox", "mobilenetv2/heatmap" },
1447 { "/usr/share/capi-media-vision/models/PE_1/tflite/posenet1_lite_224.tflite" }, { 0 }),
1448 // Hand gesture model 2 from AIC
1449 ParamType_Infer("one", INFERENCE_TARGET_GPU, TEST_AIC_HAND_GESTURE_2, INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1450 { "/opt/usr/images/hand.bin" }, 56, 56, 21, { "input" }, { "mobilenetv2/coord_refine", "mobilenetv2/gesture" },
1451 { "/usr/share/capi-media-vision/models/PE_2/tflite/posenet2_lite_224.tflite" },
1452 { 55, 39, 51, 40, 50, 42, 61, 43, 71, 39,
1453 78, 36, 82, 42, 82, 44, 83, 45, 35, 37,
1454 61, 36, 59, 36, 52, 39, 35, 32, 40, 34,
1455 62, 39, 70, 40, 58, 41, 34, 42, 34, 41,
1460 INSTANTIATE_TEST_CASE_P(
1461 Opensource, InferenceEngineTfliteCLTunerTest,
1463 // parameter order : backend name, target device, CLTuner active flag, CLTuner update flag, CLTuner tuning mode, input image path/s, height, width, channel count, input layer names, output layer names, model path/s, inference result
1464 // mobilenet based image classification test
1467 "armnn", INFERENCE_TARGET_GPU, true, true, INFERENCE_ENGINE_CLTUNER_RAPID,
1468 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1469 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1470 { "/opt/usr/images/image_classification.bin" }, 224,
1471 224, 3, { "input_2" }, { "dense_3/Softmax" },
1472 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1475 "armnn", INFERENCE_TARGET_GPU, true, false, INFERENCE_ENGINE_CLTUNER_READ,
1476 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1477 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1478 { "/opt/usr/images/image_classification.bin" }, 224,
1479 224, 3, { "input_2" }, { "dense_3/Softmax" },
1480 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1483 "armnn", INFERENCE_TARGET_GPU, true, true, INFERENCE_ENGINE_CLTUNER_NORMAL,
1484 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1485 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1486 { "/opt/usr/images/image_classification.bin" }, 224,
1487 224, 3, { "input_2" }, { "dense_3/Softmax" },
1488 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1491 "armnn", INFERENCE_TARGET_GPU, true, false, INFERENCE_ENGINE_CLTUNER_READ,
1492 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1493 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1494 { "/opt/usr/images/image_classification.bin" }, 224,
1495 224, 3, { "input_2" }, { "dense_3/Softmax" },
1496 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1499 "armnn", INFERENCE_TARGET_GPU, true, true, INFERENCE_ENGINE_CLTUNER_EXHAUSTIVE,
1500 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1501 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1502 { "/opt/usr/images/image_classification.bin" }, 224,
1503 224, 3, { "input_2" }, { "dense_3/Softmax" },
1504 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1507 "armnn", INFERENCE_TARGET_GPU, true, false, INFERENCE_ENGINE_CLTUNER_READ,
1508 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1509 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1510 { "/opt/usr/images/image_classification.bin" }, 224,
1511 224, 3, { "input_2" }, { "dense_3/Softmax" },
1512 { "/usr/share/capi-media-vision/models/IC/tflite/ic_tflite_model.tflite" },
1517 INSTANTIATE_TEST_CASE_P(
1518 Opensource, InferenceEngineCaffeTest,
1520 // parameter order : backend_name, target_devices, test_type, iteration, tensor_type, image_paths, height, width, ch, input_layers, output_layers, model_paths, answers
1522 // squeezenet based image classification test
1524 "opencv", INFERENCE_TARGET_CPU,
1525 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1526 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1527 { "/opt/usr/images/image_classification_caffe.bin" },
1528 227, 227, 3, { "data" }, { "prob" },
1529 { "/usr/share/capi-media-vision/models/IC/caffe/ic_caffe_model_squeezenet.caffemodel",
1530 "/usr/share/capi-media-vision/models/IC/caffe/ic_caffe_model_squeezenet.prototxt" },
1533 "opencv", INFERENCE_TARGET_GPU,
1534 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1535 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1536 { "/opt/usr/images/image_classification_caffe.bin" },
1537 227, 227, 3, { "data" }, { "prob" },
1538 { "/usr/share/capi-media-vision/models/IC/caffe/ic_caffe_model_squeezenet.caffemodel",
1539 "/usr/share/capi-media-vision/models/IC/caffe/ic_caffe_model_squeezenet.prototxt" },
1542 // mobilenet-ssd based object detection test
1544 "opencv", INFERENCE_TARGET_CPU, TEST_OBJECT_DETECTION,
1545 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1546 { "/opt/usr/images/object_detection_caffe.bin" }, 300,
1547 300, 3, { "data" }, { "detection_out" },
1548 { "/usr/share/capi-media-vision/models/OD/caffe/od_caffe_model_mobilenetv1ssd.caffemodel",
1549 "/usr/share/capi-media-vision/models/OD/caffe/od_caffe_model_mobilenetv1ssd.prototxt" },
1550 { 15, 19, 335, 557 }),
1552 "opencv", INFERENCE_TARGET_GPU, TEST_OBJECT_DETECTION,
1553 INFERENCE_ITERATION, INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1554 { "/opt/usr/images/object_detection_caffe.bin" }, 300,
1555 300, 3, { "data" }, { "detection_out" },
1556 { "/usr/share/capi-media-vision/models/OD/caffe/od_caffe_model_mobilenetv1ssd.caffemodel",
1557 "/usr/share/capi-media-vision/models/OD/caffe/od_caffe_model_mobilenetv1ssd.prototxt" },
1558 { 15, 19, 335, 557 }),
1560 // mobilenet-ssd based object detection test
1562 "opencv", INFERENCE_TARGET_CPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1563 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1564 { "/opt/usr/images/face_detection_caffe.bin" }, 300,
1565 300, 3, { "data" }, { "detection_out" },
1566 { "/usr/share/capi-media-vision/models/FD/caffe/fd_caffe_model_resnet10ssd.caffemodel",
1567 "/usr/share/capi-media-vision/models/FD/caffe/fd_caffe_model_resnet10ssd.prototxt" },
1568 { 733, 233, 965, 539 }),
1570 "opencv", INFERENCE_TARGET_GPU, TEST_FACE_DETECTION, INFERENCE_ITERATION,
1571 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1572 { "/opt/usr/images/face_detection_caffe.bin" }, 300,
1573 300, 3, { "data" }, { "detection_out" },
1574 { "/usr/share/capi-media-vision/models/FD/caffe/fd_caffe_model_resnet10ssd.caffemodel",
1575 "/usr/share/capi-media-vision/models/FD/caffe/fd_caffe_model_resnet10ssd.prototxt" },
1576 { 733, 233, 965, 539 }),
1578 // tweakcnn based facial landmark detection test
1580 "opencv", INFERENCE_TARGET_CPU,
1581 TEST_FACIAL_LANDMARK_DETECTION, INFERENCE_ITERATION,
1582 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1583 { "/opt/usr/images/faciallandmark_detection_caffe.bin" },
1584 128, 128, 3, { "data" }, { "Sigmoid_fc2" },
1585 { "/usr/share/capi-media-vision/models/FLD/caffe/fld_caffe_model_tweak.caffemodel",
1586 "/usr/share/capi-media-vision/models/FLD/caffe/fld_caffe_model_tweak.prototxt" },
1587 { 53, 45, 85, 46, 66, 64, 54, 78, 82, 79 }),
1589 "opencv", INFERENCE_TARGET_GPU,
1590 TEST_FACIAL_LANDMARK_DETECTION, INFERENCE_ITERATION,
1591 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1592 { "/opt/usr/images/faciallandmark_detection_caffe.bin" },
1593 128, 128, 3, { "data" }, { "Sigmoid_fc2" },
1594 { "/usr/share/capi-media-vision/models/FLD/caffe/fld_caffe_model_tweak.caffemodel",
1595 "/usr/share/capi-media-vision/models/FLD/caffe/fld_caffe_model_tweak.prototxt" },
1596 { 53, 45, 85, 46, 66, 64, 54, 78, 82, 79 })
1600 INSTANTIATE_TEST_CASE_P(
1601 Opensource, InferenceEngineDldtTest,
1605 "dldt", INFERENCE_TARGET_CUSTOM,
1606 TEST_IMAGE_CLASSIFICATION, INFERENCE_ITERATION,
1607 INFERENCE_TENSOR_DATA_TYPE_FLOAT32,
1608 { "/opt/usr/images/dldt_banana_classification.bin" },
1609 224, 224, 3, { "data" }, { "prob" },
1610 { "/usr/share/capi-media-vision/models/IC/dldt/googlenet-v1.xml",
1611 "/usr/share/capi-media-vision/models/IC/dldt/googlenet-v1.bin" },