mv_machine_learing: enable inference-based tests
authorVibhav Aggarwal <v.aggarwal@samsung.com>
Mon, 27 Nov 2023 09:43:59 +0000 (18:43 +0900)
committerKwanghoon Son <k.son@samsung.com>
Wed, 6 Dec 2023 01:36:46 +0000 (10:36 +0900)
[Issue type] code improvement

This patch re-enables some of the testcases which were
disabled in [1]. Specifically, all the machine learning
testcases except Face Recognition and Image Segmentation
task groups have been enabled. For Face Recognition,
there are still some memory leaks related to NNTrainer
and further investigation is required. Image Segmentation
testcases are still under development [2].

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

Change-Id: If97012b42165f210b1f67aaaf4a28e169c16303f
Signed-off-by: Vibhav Aggarwal <v.aggarwal@samsung.com>
test/testsuites/machine_learning/image_classification/test_image_classification.cpp
test/testsuites/machine_learning/image_classification/test_image_classification_async.cpp
test/testsuites/machine_learning/landmark_detection/test_landmark_detection.cpp
test/testsuites/machine_learning/landmark_detection/test_landmark_detection_async.cpp
test/testsuites/machine_learning/object_detection/test_object_detection.cpp
test/testsuites/machine_learning/object_detection/test_object_detection_async.cpp
test/testsuites/machine_learning/object_detection_3d/test_object_detection_3d.cpp

index a133e88..cfc082a 100644 (file)
@@ -37,7 +37,7 @@ struct model_info {
        string label_file;
 };
 
-TEST(ImageClassificationTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
+TEST(ImageClassificationTest, GettingAvailableInferenceEnginesInfoShouldBeOk)
 {
        mv_image_classification_h handle;
 
@@ -83,7 +83,7 @@ TEST(ImageClassificationTest, DISABLED_GettingAvailableInferenceEnginesInfoShoul
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(ImageClassificationTest, DISABLED_InferenceShouldBeOk)
+TEST(ImageClassificationTest, InferenceShouldBeOk)
 {
        mv_image_classification_h handle;
 
index 56593d6..152cd21 100644 (file)
@@ -64,7 +64,7 @@ void image_classification_callback(void *user_data)
        }
 }
 
-TEST(ImageClassificationAsyncTest, DISABLED_InferenceShouldBeOk)
+TEST(ImageClassificationAsyncTest, InferenceShouldBeOk)
 {
        mv_image_classification_h handle;
        vector<model_info> test_models {
@@ -123,7 +123,7 @@ TEST(ImageClassificationAsyncTest, DISABLED_InferenceShouldBeOk)
        }
 }
 
-TEST(ImageClassificationAsyncTest, DISABLED_InferenceShouldBeOkWithDestroyFirst)
+TEST(ImageClassificationAsyncTest, InferenceShouldBeOkWithDestroyFirst)
 {
        mv_image_classification_h handle;
        vector<model_info> test_models {
index f45439f..f01e4fe 100644 (file)
@@ -39,7 +39,7 @@ struct model_info {
        string label_file;
 };
 
-TEST(FacialLandmarkTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
+TEST(FacialLandmarkTest, GettingAvailableInferenceEnginesInfoShouldBeOk)
 {
        mv_facial_landmark_h handle;
 
@@ -85,7 +85,7 @@ TEST(FacialLandmarkTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(FacialLandmarkTest, DISABLED_InferenceShouldBeOk)
+TEST(FacialLandmarkTest, InferenceShouldBeOk)
 {
        mv_facial_landmark_h handle;
        vector<model_info> test_models {
@@ -149,7 +149,7 @@ TEST(FacialLandmarkTest, DISABLED_InferenceShouldBeOk)
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(PoseLandmarkTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
+TEST(PoseLandmarkTest, GettingAvailableInferenceEnginesInfoShouldBeOk)
 {
        mv_pose_landmark_h handle;
 
@@ -195,7 +195,7 @@ TEST(PoseLandmarkTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(PoseLandmarkTest, DISABLED_InferenceShouldBeOk)
+TEST(PoseLandmarkTest, InferenceShouldBeOk)
 {
        mv_pose_landmark_h handle;
        vector<model_info> test_models {
index feaad1b..fd57c67 100644 (file)
@@ -70,7 +70,7 @@ void pose_landmark_callback(void *user_data)
        }
 }
 
-TEST(PostLandmarkAsyncTest, DISABLED_InferenceShouldBeOk)
+TEST(PostLandmarkAsyncTest, InferenceShouldBeOk)
 {
        mv_pose_landmark_h handle;
        vector<model_info> test_models {
@@ -122,7 +122,7 @@ TEST(PostLandmarkAsyncTest, DISABLED_InferenceShouldBeOk)
        }
 }
 
-TEST(PostLandmarkAsyncTest, DISABLED_InferenceShouldBeOkWithDestroyFirst)
+TEST(PostLandmarkAsyncTest, InferenceShouldBeOkWithDestroyFirst)
 {
        mv_pose_landmark_h handle;
        vector<model_info> test_models {
@@ -201,7 +201,7 @@ void facial_landmark_callback(void *user_data)
        }
 }
 
-TEST(FacialLandmarkAsyncTest, DISABLED_InferenceShouldBeOk)
+TEST(FacialLandmarkAsyncTest, InferenceShouldBeOk)
 {
        mv_facial_landmark_h handle;
        vector<model_info> test_models {
@@ -253,7 +253,7 @@ TEST(FacialLandmarkAsyncTest, DISABLED_InferenceShouldBeOk)
        }
 }
 
-TEST(FacialLandmarkAsyncTest, DISABLED_InferenceShouldBeOkWithDestroyFirst)
+TEST(FacialLandmarkAsyncTest, InferenceShouldBeOkWithDestroyFirst)
 {
        mv_facial_landmark_h handle;
        vector<model_info> test_models {
index 7c45847..5f045f6 100644 (file)
@@ -40,7 +40,7 @@ struct model_info {
        string anster;
 };
 
-TEST(ObjectDetectionTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
+TEST(ObjectDetectionTest, GettingAvailableInferenceEnginesInfoShouldBeOk)
 {
        mv_object_detection_h handle;
 
@@ -86,7 +86,7 @@ TEST(ObjectDetectionTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeO
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(FaceDetectionTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
+TEST(FaceDetectionTest, GettingAvailableInferenceEnginesInfoShouldBeOk)
 {
        mv_object_detection_h handle;
 
@@ -132,7 +132,7 @@ TEST(FaceDetectionTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(ObjectDetectionTest, DISABLED_InferenceShouldBeOk)
+TEST(ObjectDetectionTest, InferenceShouldBeOk)
 {
        mv_object_detection_h handle;
        vector<model_info> test_models {
@@ -206,7 +206,7 @@ TEST(ObjectDetectionTest, DISABLED_InferenceShouldBeOk)
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(FaceDetectionTest, DISABLED_InferenceShouldBeOk)
+TEST(FaceDetectionTest, InferenceShouldBeOk)
 {
        mv_object_detection_h handle;
        vector<model_info> test_models {
index 7b2accd..7651a8e 100644 (file)
@@ -80,7 +80,7 @@ void object_detection_callback(void *user_data)
        }
 }
 
-TEST(ObjectDetectionAsyncTest, DISABLED_InferenceShouldBeOk)
+TEST(ObjectDetectionAsyncTest, InferenceShouldBeOk)
 {
        mv_object_detection_h handle;
        vector<model_info> test_models {
@@ -135,7 +135,7 @@ TEST(ObjectDetectionAsyncTest, DISABLED_InferenceShouldBeOk)
        }
 }
 
-TEST(ObjectDetectionAsyncTest, DISABLED_InferenceShouldBeOkWithDestroyFirst)
+TEST(ObjectDetectionAsyncTest, InferenceShouldBeOkWithDestroyFirst)
 {
        mv_object_detection_h handle;
        vector<model_info> test_models {
@@ -227,7 +227,7 @@ void face_detection_callback(void *user_data)
        }
 }
 
-TEST(FaceDetectionAsyncTest, DISABLED_InferenceShouldBeOk)
+TEST(FaceDetectionAsyncTest, InferenceShouldBeOk)
 {
        mv_object_detection_h handle;
        vector<model_info> test_models {
@@ -280,7 +280,7 @@ TEST(FaceDetectionAsyncTest, DISABLED_InferenceShouldBeOk)
        }
 }
 
-TEST(FaceDetectionAsyncTest, DISABLED_InferenceShouldBeOkWithDestroyFirst)
+TEST(FaceDetectionAsyncTest, InferenceShouldBeOkWithDestroyFirst)
 {
        mv_object_detection_h handle;
        vector<model_info> test_models {
index cfda05c..d803e83 100644 (file)
@@ -37,7 +37,7 @@ struct model_info {
        string label_file;
 };
 
-TEST(ObjectDetection3dTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldBeOk)
+TEST(ObjectDetection3dTest, GettingAvailableInferenceEnginesInfoShouldBeOk)
 {
        mv_object_detection_3d_h handle;
 
@@ -83,7 +83,7 @@ TEST(ObjectDetection3dTest, DISABLED_GettingAvailableInferenceEnginesInfoShouldB
        ASSERT_EQ(ret, MEDIA_VISION_ERROR_NONE);
 }
 
-TEST(ObjectDetection3dTest, DISABLED_InferenceShouldBeOk)
+TEST(ObjectDetection3dTest, InferenceShouldBeOk)
 {
        vector<model_info> test_models {
                { "", "", "", "" }, // If empty then default model will be used.