Fix wrong input setting 31/302031/2
authorKwanghoon Son <k.son@samsung.com>
Thu, 30 Nov 2023 00:53:30 +0000 (09:53 +0900)
committerKwanghoon Son <k.son@samsung.com>
Thu, 30 Nov 2023 03:43:23 +0000 (12:43 +0900)
[Issue type] bug fix

MobilenetV1 has ASAN bug which is caused from wrong input.

==1368962==AddressSanitizer CHECK failed: ../../../../libsanitizer/asan/asan_allocator.cpp:191 "((old)) == ((kAllocBegMagic))" (0x3f1f9fa03ecececf, 0xcc6e96b9cc6e96b9)
    #0 0x7f823855f4  (/lib64/libasan.so+0xca5f4)
    #1 0x7f823a2a80  (/lib64/libasan.so+0xe7a80)
    #2 0x7f822ecfe8  (/lib64/libasan.so+0x31fe8)
    #3 0x7f822ed8c8  (/lib64/libasan.so+0x328c8)
    #4 0x7f822ede1c  (/lib64/libasan.so+0x32e1c)
    #5 0x7f8237cb50 in __interceptor_free (/lib64/libasan.so+0xc1b50)
    #6 0x7f3698d0c8 in xnn_delete_operator (/lib64/libinference-engine-tflite.so+0x5350c8)
    #7 0x7f36961d48 in xnn_delete_runtime (/lib64/libinference-engine-tflite.so+0x509d48)
    #8 0x7f3690644c  (/lib64/libinference-engine-tflite.so+0x4ae44c)
    #9 0x7f368084a0 in tflite::Subgraph::CleanupNode(int) (/lib64/libinference-engine-tflite.so+0x3b04a0)

Change-Id: I029d2354f4a96e9b362703e18febc8e6d2b68c45
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
test/testsuites/machine_learning/inference/test_pose_landmark_detection.cpp

index e33ecff..80bc744 100644 (file)
@@ -119,16 +119,16 @@ TEST_P(TestPoseLandmarkDetectionTflite, MobilenetV1)
                                                                                 "MobilenetV1/displacement_fwd_2/BiasAdd",
                                                                                 "MobilenetV1/displacement_bwd_2/BiasAdd" };
 
-               ASSERT_EQ(mv_engine_config_set_double_attribute(engine_cfg, MV_INFERENCE_MODEL_MEAN_VALUE, 127.5),
+               ASSERT_EQ(mv_engine_config_set_double_attribute(engine_cfg, MV_INFERENCE_MODEL_MEAN_VALUE, 0.0),
                                  MEDIA_VISION_ERROR_NONE);
-               ASSERT_EQ(mv_engine_config_set_double_attribute(engine_cfg, MV_INFERENCE_MODEL_STD_VALUE, 127.5),
+               ASSERT_EQ(mv_engine_config_set_double_attribute(engine_cfg, MV_INFERENCE_MODEL_STD_VALUE, 255.0),
                                  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),
+               ASSERT_EQ(mv_engine_config_set_int_attribute(engine_cfg, MV_INFERENCE_INPUT_TENSOR_WIDTH, 257),
                                  MEDIA_VISION_ERROR_NONE);
-               ASSERT_EQ(mv_engine_config_set_int_attribute(engine_cfg, MV_INFERENCE_INPUT_TENSOR_HEIGHT, 300),
+               ASSERT_EQ(mv_engine_config_set_int_attribute(engine_cfg, MV_INFERENCE_INPUT_TENSOR_HEIGHT, 257),
                                  MEDIA_VISION_ERROR_NONE);
                ASSERT_EQ(mv_engine_config_set_int_attribute(engine_cfg, MV_INFERENCE_INPUT_TENSOR_CHANNELS, 3),
                                  MEDIA_VISION_ERROR_NONE);