[C-API] Support MVNC with Single API
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 12 Nov 2019 02:05:16 +0000 (11:05 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 12 Nov 2019 13:55:18 +0000 (22:55 +0900)
Let C-API users use Intel NCS.

CC: Wook Song <wook16.song@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
api/capi/include/nnstreamer.h
api/capi/src/nnstreamer-capi-single.c

index 3aa0720..0ae691c 100644 (file)
@@ -116,6 +116,7 @@ typedef void *ml_pipeline_valve_h;
 /**
  * @brief Types of NNFWs.
  * @since_tizen 5.5
+ * @details To check if a nnfw-type is supported in a system, an application may call the API, ml_check_nnfw_availability()
  */
 typedef enum {
   ML_NNFW_TYPE_ANY = 0, /**< NNHW is not specified (Try to determine the NNFW with file extension). */
@@ -123,6 +124,7 @@ typedef enum {
   ML_NNFW_TYPE_TENSORFLOW_LITE, /**< Tensorflow-lite (.tflite). */
   ML_NNFW_TYPE_TENSORFLOW, /**< Tensorflow (.pb). */
   ML_NNFW_TYPE_NNFW, /**< Neural Network Inference framework, which is developed by SR */
+  ML_NNFW_TYPE_MVNC, /**< Intel NCSDK (libmvnc). */
 } ml_nnfw_type_e;
 
 /**
index 359b30b..32954aa 100644 (file)
@@ -478,6 +478,10 @@ ml_single_open (ml_single_h * single, const char *model,
         goto error;
       }
       break;
+    case ML_NNFW_TYPE_MVNC:
+      g_object_set (filter_obj, "framework", "movidius-ncsdk2", "model", model, NULL);
+      /** @todo Verify this! (this code is not tested) */
+      break;
     default:
       /** @todo Add other fw later. */
       ml_loge ("The given nnfw is not supported.");