test: fix answer table values for landmark detection
authorInki Dae <inki.dae@samsung.com>
Thu, 2 Nov 2023 02:21:50 +0000 (11:21 +0900)
committerInki Dae <inki.dae@samsung.com>
Tue, 14 Nov 2023 07:39:04 +0000 (16:39 +0900)
[Issue type] bug fix

Fix answer table values for landmark detection test case.
With a new patch[1], 'confidence_threshold' value is used to check
valid detection result for pose detection task - its specific class is PldCpm
class. Without this patch, landmark detection test cases will fail.
This patch updates the answer table values of relevant test cases correctly.

[1] https://review.tizen.org/gerrit/#/c/platform/core/api/mediavision/+/300755/

Change-Id: Id0219912d9c912bb4f4b597a968a3ba9213bfa9d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
test/testsuites/machine_learning/landmark_detection/test_landmark_detection.cpp
test/testsuites/machine_learning/landmark_detection/test_landmark_detection_async.cpp

index 12022f1..c2036eb 100644 (file)
@@ -203,10 +203,8 @@ TEST(PoseLandmarkTest, InferenceShouldBeOk)
                { "PLD_CPM", "pld_cpm_192x192.tflite", "pld_cpm_192x192.json", "" }
                // TODO.
        };
-       const unsigned int coordinate_answers[][14] = {
-               { 300, 300, 275, 250, 275, 325, 325, 325, 275, 225, 225, 325, 350, 375 },
-               { 50, 87, 100, 137, 162, 100, 137, 162, 162, 187, 250, 162, 187, 250 }
-       };
+       const unsigned int coordinate_answers[][10] = { { 300, 300, 275, 250, 325, 325, 225, 225, 350, 375 },
+                                                                                                       { 50, 87, 100, 137, 100, 137, 187, 250, 187, 250 } };
 
        mv_source_h mv_source = NULL;
        int ret = mv_create_source(&mv_source);
index 7693a9d..7561f33 100644 (file)
@@ -48,10 +48,8 @@ void pose_landmark_callback(void *user_data)
        unsigned int *x_pos = nullptr, *y_pos = nullptr;
        unsigned long frame_number = 0;
        mv_pose_landmark_h handle = static_cast<mv_pose_landmark_h>(user_data);
-       const unsigned int coordinate_answers[][14] = {
-               { 300, 300, 275, 250, 275, 325, 325, 325, 275, 225, 225, 325, 350, 375 },
-               { 50, 87, 100, 137, 162, 100, 137, 162, 162, 187, 250, 162, 187, 250 }
-       };
+       const unsigned int coordinate_answers[][10] = { { 300, 300, 275, 250, 325, 325, 225, 225, 350, 375 },
+                                                                                                       { 50, 87, 100, 137, 100, 137, 187, 250, 187, 250 } };
 
        while (frame_number < MAX_INFERENCE_ITERATION - 10) {
                int ret = mv_pose_landmark_get_pos(handle, &number_of_landmarks, &x_pos, &y_pos);