Deprecate inference lic 15/259715/1
authorKwang Son <k.son@samsung.com>
Fri, 11 Jun 2021 07:01:59 +0000 (16:01 +0900)
committerKwang Son <k.son@samsung.com>
Fri, 11 Jun 2021 07:02:14 +0000 (16:02 +0900)
Inference licensed port code is support to change licensed version library
from opensource version. However practically no one used anymore.

Change-Id: I086f91800eb917ce89b6be9a86d765f8e1c643c4
Signed-off-by: Kwang Son <k.son@samsung.com>
CMakeLists.txt
mv_machine_learning/mv_inference/CMakeLists.txt
mv_machine_learning/mv_inference/inference/src/mv_inference.c

index 02de088..b6288d3 100644 (file)
@@ -6,12 +6,6 @@ PROJECT(${fw_name})
 SET(CMAKE_INSTALL_PREFIX /usr)
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-# Configure for porting layer:
-
-option(MEDIA_VISION_INFERENCE_LICENSE_PORT
-       "Turn on building of licensed port of the inferece module (if OFF - open port will be built)." OFF)
-
-
 set(MV_COMMON_LIB_NAME "mv_common")
 set(MV_BARCODE_DETECTOR_LIB_NAME "mv_barcode_detector" CACHE STRING
        "Name of the library will be built for barcode detecting module (without extension).")
@@ -37,13 +31,7 @@ SET(INC_BARCODE_GENERATOR "${PROJECT_SOURCE_DIR}/mv_barcode/barcode_generator/in
 SET(INC_IMAGE "${PROJECT_SOURCE_DIR}/mv_image/image/include")
 SET(INC_FACE "${PROJECT_SOURCE_DIR}/mv_face/face/include")
 SET(INC_SURVEILLANCE "${PROJECT_SOURCE_DIR}/mv_surveillance/surveillance/include")
-
-if(MEDIA_VISION_INFERENCE_LICENSE_PORT)
-    add_definitions(-DMEDIA_VISION_INFERENCE_LICENSE_PORT)
-    SET(INC_INFERENCE "${PROJECT_SOURCE_DIR}/mv_machine_learning/mv_inference/inference_lic/include")
-else()
-    SET(INC_INFERENCE "${PROJECT_SOURCE_DIR}/mv_machine_learning/mv_inference/inference/include")
-endif()
+SET(INC_INFERENCE "${PROJECT_SOURCE_DIR}/mv_machine_learning/mv_inference/inference/include")
 
 INCLUDE_DIRECTORIES(${INC_DIR}
                     ${INC_COMMON}
index 1f034f2..d9837d0 100644 (file)
@@ -1,8 +1,4 @@
 project(mv_inference_port)
 cmake_minimum_required(VERSION 2.6)
 
-if(MEDIA_VISION_INFERENCE_LICENSE_PORT)
-    add_subdirectory(${PROJECT_SOURCE_DIR}/inference_lic) # Licensed port
-else()
-    add_subdirectory(${PROJECT_SOURCE_DIR}/inference) # Open port
-endif()
+add_subdirectory(${PROJECT_SOURCE_DIR}/inference)
index 454354e..84c9b7d 100644 (file)
 
 #include "mv_private.h"
 #include "mv_inference.h"
-
-#ifdef MEDIA_VISION_INFERENCE_LICENSE_PORT
-
-/* Include headers of licensed inference module here. */
-//#include "mv_inference_lic.h"
-
-#else
-
-/* Include headers of open inference module here. */
 #include "mv_inference_open.h"
 
-#endif /* MEDIA_VISION_INFERENCE_LICENSE_PORT */
-
 /**
  * @file  mv_inference.c
  * @brief This file contains Media Vision inference module.
@@ -44,16 +33,8 @@ int mv_inference_create(mv_inference_h *infer)
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENSE_PORT
-
-       //ret = mv_inference_create_lic(infer);
-
-#else
-
        ret = mv_inference_create_open(infer);
 
-#endif /* MEDIA_VISION_INFERENCE_LICENSE_PORT */
-
        MEDIA_VISION_FUNCTION_LEAVE();
        return ret;
 }
@@ -68,16 +49,8 @@ int mv_inference_destroy(mv_inference_h infer)
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENSE_PORT
-
-       //ret = mv_inference_destroy_lic(infer);
-
-#else
-
        ret = mv_inference_destroy_open(infer);
 
-#endif /* MEDIA_VISION_INFERENCE_LICENSE_PORT */
-
        MEDIA_VISION_FUNCTION_LEAVE();
        return ret;
 }
@@ -94,20 +67,12 @@ int mv_inference_configure(mv_inference_h infer,
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENSE_PORT
-
-       //ret = mv_inference_configure_lic(infer);
-
-#else
-
        ret = mv_inference_configure_engine_open(infer, engine_config);
        if (ret != MEDIA_VISION_ERROR_NONE) {
                LOGE("Fail to configure engine and target");
                return ret;
        }
 
-#endif /* MEDIA_VISION_INFERENCE_LICENSE_PORT */
-
        MEDIA_VISION_FUNCTION_LEAVE();
        return ret;
 }
@@ -124,12 +89,6 @@ int mv_inference_prepare(mv_inference_h infer)
 
        mv_engine_config_h engine_config = mv_inference_get_engine_config(infer);
 
-#ifdef MEDIA_VISION_INFERENCE_LICENSE_PORT
-
-       //ret = mv_inference_prepare_lic(infer);
-
-#else
-
        ret = mv_inference_configure_model_open(infer, engine_config);
        if (ret != MEDIA_VISION_ERROR_NONE) {
                LOGE("Fail to configure model");
@@ -159,8 +118,6 @@ int mv_inference_prepare(mv_inference_h infer)
 
        ret = mv_inference_prepare_open(infer);
 
-#endif /* MEDIA_VISION_INFERENCE_LICENSE_PORT */
-
        MEDIA_VISION_FUNCTION_LEAVE();
        return ret;
 }
@@ -177,17 +134,9 @@ int mv_inference_foreach_supported_engine(
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENCE_PORT
-
-       // ret = mv_inference_foreach_supported_engine_lic(infer, callback, user_data);
-
-#else
-
        ret = mv_inference_foreach_supported_engine_open(infer, callback,
                                                                                                         user_data);
 
-#endif
-
        MEDIA_VISION_FUNCTION_LEAVE();
 
        return ret;
@@ -208,19 +157,9 @@ int mv_inference_image_classify(mv_source_h source, mv_inference_h infer,
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENSE_PORT
-
-       /*
-       ret = mv_inference_image_classify_lic(source, infer, classified_cb, user_data);
-       */
-
-#else
-
        ret = mv_inference_image_classify_open(source, infer, roi, classified_cb,
                                                                                   user_data);
 
-#endif /* MEDIA_VISION_INFERENCE_LICENSE_PORT */
-
        MEDIA_VISION_FUNCTION_LEAVE();
 
        return ret;
@@ -240,19 +179,9 @@ int mv_inference_object_detect(mv_source_h source, mv_inference_h infer,
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENSE_PORT
-
-       /*
-       ret = mv_inference_object_detect_lic(source, infer, classified_cb, user_data);
-       */
-
-#else
-
        ret = mv_inference_object_detect_open(source, infer, detected_cb,
                                                                                  user_data);
 
-#endif /* MEDIA_VISION_INFERENCE_LICENSE_PORT */
-
        MEDIA_VISION_FUNCTION_LEAVE();
 
        return ret;
@@ -272,19 +201,11 @@ int mv_inference_face_detect(mv_source_h source, mv_inference_h infer,
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENCE_PORT
-       /*
-       ret = mv_inference_face_detect_lic(source, infer, detected_cb, user_data);
-       */
-#else
-
        ret = mv_inference_face_detect_open(source, infer, detected_cb, user_data);
 
        MEDIA_VISION_FUNCTION_LEAVE();
 
        return ret;
-
-#endif
 }
 
 int mv_inference_facial_landmark_detect(
@@ -301,20 +222,12 @@ int mv_inference_facial_landmark_detect(
 
        int ret = MEDIA_VISION_ERROR_NONE;
 
-#ifdef MEDIA_VISION_INFERENCE_LICENCE_PORT
-       /*
-       ret = mv_inference_facial_landmark_detect_lic(source, infer, detected_cb, user_data);
-       */
-#else
-
        ret = mv_inference_facial_landmark_detect_open(source, infer, roi,
                                                                                                   detected_cb, user_data);
 
        MEDIA_VISION_FUNCTION_LEAVE();
 
        return ret;
-
-#endif
 }
 
 int mv_inference_pose_landmark_detect(