diff options
author | Kwanghoon Son <k.son@samsung.com> | 2022-09-01 03:07:38 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2022-09-02 17:09:25 +0900 |
commit | cd69a17b23173da1ad3a139fad11183d1f8dd360 (patch) | |
tree | d55151c30193af8a1c2425b58e6f57f978003741 | |
parent | 6a062af3e62703064891676c9734dc00ad16e822 (diff) | |
download | mediavision-cd69a17b23173da1ad3a139fad11183d1f8dd360.tar.gz mediavision-cd69a17b23173da1ad3a139fad11183d1f8dd360.tar.bz2 mediavision-cd69a17b23173da1ad3a139fad11183d1f8dd360.zip |
Apply clang-format rule
[Issue type] refactoring
Change-Id: Ib947e0660c3b1057859dbc1c96650a8de4370a0a
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rw-r--r-- | test/testsuites/machine_learning/inference/test_object_detection.cpp | 65 |
1 files changed, 37 insertions, 28 deletions
diff --git a/test/testsuites/machine_learning/inference/test_object_detection.cpp b/test/testsuites/machine_learning/inference/test_object_detection.cpp index 75b54b0e..7e685d61 100644 --- a/test/testsuites/machine_learning/inference/test_object_detection.cpp +++ b/test/testsuites/machine_learning/inference/test_object_detection.cpp @@ -47,42 +47,51 @@ public: TEST_P(TestObjectDetectionTflite, MobilenetV1_SSD) { - engine_config_hosted_tflite_model(engine_cfg, OD_TFLITE_WEIGHT_MOBILENET_V1_SSD_300_PATH, - OD_LABEL_MOBILENET_V1_SSD_300_PATH, _use_json_parser, - _target_device_type); + engine_config_hosted_tflite_model( + engine_cfg, OD_TFLITE_WEIGHT_MOBILENET_V1_SSD_300_PATH, + OD_LABEL_MOBILENET_V1_SSD_300_PATH, _use_json_parser, + _target_device_type); if (!_use_json_parser) { const char *inputNodeName = "normalized_input_image_tensor"; const char *outputNodeName[] = { "TFLite_Detection_PostProcess", - "TFLite_Detection_PostProcess:1", - "TFLite_Detection_PostProcess:2", - "TFLite_Detection_PostProcess:3" }; + "TFLite_Detection_PostProcess:1", + "TFLite_Detection_PostProcess:2", + "TFLite_Detection_PostProcess:3" }; - ASSERT_EQ(mv_engine_config_set_double_attribute(engine_cfg, MV_INFERENCE_MODEL_MEAN_VALUE, 127.5), - MEDIA_VISION_ERROR_NONE); - ASSERT_EQ(mv_engine_config_set_double_attribute(engine_cfg, MV_INFERENCE_MODEL_STD_VALUE, 127.5), - MEDIA_VISION_ERROR_NONE); - ASSERT_EQ(mv_engine_config_set_double_attribute(engine_cfg, MV_INFERENCE_CONFIDENCE_THRESHOLD, 0.3), - MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_double_attribute( + engine_cfg, MV_INFERENCE_MODEL_MEAN_VALUE, 127.5), + MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_double_attribute( + engine_cfg, MV_INFERENCE_MODEL_STD_VALUE, 127.5), + MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_double_attribute( + engine_cfg, MV_INFERENCE_CONFIDENCE_THRESHOLD, 0.3), + MEDIA_VISION_ERROR_NONE); - ASSERT_EQ(mv_engine_config_set_int_attribute(engine_cfg, MV_INFERENCE_INPUT_TENSOR_WIDTH, 300), - MEDIA_VISION_ERROR_NONE); - ASSERT_EQ(mv_engine_config_set_int_attribute(engine_cfg, MV_INFERENCE_INPUT_TENSOR_HEIGHT, 300), - MEDIA_VISION_ERROR_NONE); - ASSERT_EQ(mv_engine_config_set_int_attribute(engine_cfg, MV_INFERENCE_INPUT_TENSOR_CHANNELS, 3), - MEDIA_VISION_ERROR_NONE); - ASSERT_EQ(mv_engine_config_set_string_attribute(engine_cfg, MV_INFERENCE_INPUT_NODE_NAME, - inputNodeName), MEDIA_VISION_ERROR_NONE); - ASSERT_EQ(mv_engine_config_set_array_string_attribute(engine_cfg, MV_INFERENCE_OUTPUT_NODE_NAMES, - outputNodeName, 4), MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_int_attribute( + engine_cfg, MV_INFERENCE_INPUT_TENSOR_WIDTH, 300), + MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_int_attribute( + engine_cfg, MV_INFERENCE_INPUT_TENSOR_HEIGHT, 300), + MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_int_attribute( + engine_cfg, MV_INFERENCE_INPUT_TENSOR_CHANNELS, 3), + MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_string_attribute( + engine_cfg, MV_INFERENCE_INPUT_NODE_NAME, + inputNodeName), + MEDIA_VISION_ERROR_NONE); + ASSERT_EQ(mv_engine_config_set_array_string_attribute( + engine_cfg, MV_INFERENCE_OUTPUT_NODE_NAMES, + outputNodeName, 4), + MEDIA_VISION_ERROR_NONE); } inferenceDog(); } -INSTANTIATE_TEST_CASE_P(Prefix, TestObjectDetectionTflite, - ::testing::Values( - ParamTypes(false, MV_INFERENCE_TARGET_DEVICE_CPU), - ParamTypes(true, MV_INFERENCE_TARGET_DEVICE_CPU) - ) -); +INSTANTIATE_TEST_CASE_P( + Prefix, TestObjectDetectionTflite, + ::testing::Values(ParamTypes(false, MV_INFERENCE_TARGET_DEVICE_CPU), + ParamTypes(true, MV_INFERENCE_TARGET_DEVICE_CPU))); |