testsuites/machine_learning/inference/test_object_detection.cpp
testsuites/machine_learning/inference/test_face_detection.cpp
testsuites/machine_learning/inference/test_face_landmark_detection.cpp
+ testsuites/machine_learning/inference/test_pose_landmark_detection.cpp
)
target_link_libraries(${PROJECT_NAME} gtest gtest_main mv_inference mv_image_helper mv_barcode_detector)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
\ No newline at end of file
--- /dev/null
+#include <gtest/gtest.h>
+#include <ImageHelper.h>
+#include "test_inference_helper.hpp"
+
+#define PLD_TFLITE_WEIGHT_MOBILENET_V1_POSENET_257_PATH \
+ MV_CONFIG_PATH \
+ "/models/PLD/tflite/pld_mobilenet_v1_posenet_multi_257x257.tflite"
+#define IMG_POSE_LANDMARK \
+ MV_CONFIG_PATH \
+ "/res/inference/images/poseLandmark.jpg"
+
+void _pose_landmark_detected_cb(mv_source_h source,
+ mv_inference_pose_result_h pose,
+ void *user_data)
+{
+ int cb_number_of_poses = 0;
+ ASSERT_EQ(mv_inference_pose_get_number_of_poses(pose, &cb_number_of_poses),
+ MEDIA_VISION_ERROR_NONE);
+ ASSERT_EQ(cb_number_of_poses, 1);
+}
+
+class TestPoseLandmarkDetection : public TestInference
+{
+public:
+ void inferencePoseLandmark()
+ {
+ ASSERT_EQ(mv_inference_configure(infer, engine_cfg),
+ MEDIA_VISION_ERROR_NONE);
+ ASSERT_EQ(mv_inference_prepare(infer), MEDIA_VISION_ERROR_NONE);
+ ASSERT_EQ(MediaVision::Common::ImageHelper::loadImageToSource(
+ IMG_POSE_LANDMARK, mv_source),
+ MEDIA_VISION_ERROR_NONE);
+ ASSERT_EQ(mv_inference_pose_landmark_detect(mv_source, infer, NULL,
+ _pose_landmark_detected_cb,
+ NULL),
+ MEDIA_VISION_ERROR_NONE);
+ }
+};
+
+TEST_F(TestPoseLandmarkDetection, CPU_TFLITE_MobilenetV1)
+{
+ engine_config_hosted_cpu_tflite(
+ engine_cfg, PLD_TFLITE_WEIGHT_MOBILENET_V1_POSENET_257_PATH);
+ inferencePoseLandmark();
+}
\ No newline at end of file