[MachineLearning.Inference] Add CustomFilter class and more functionality to Machine...
authorSangjung Woo <sangjung.woo@samsung.com>
Fri, 21 Aug 2020 01:57:07 +0000 (10:57 +0900)
committerGitHub <noreply@github.com>
Fri, 21 Aug 2020 01:57:07 +0000 (10:57 +0900)
* [MachineLearning.Inference] Add new Enum value to support new HW and NNFW

* Add SNPE(Snapdgragon Neural Processing Engine) to NNFWType enum
* Add CPUSIMD to HWType enum

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
* [MachineLearning.Inference] Add CustomFilter class

This patch newly adds the CustomFilter class. It provides developers
with a custom callback interface in the NNStreamer pipeline. Using this
interface, developers can easily manipulate the tensors data.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
* [MachineLearning.Inference] Add the property getter/setter of the node in NNStreamer pipeline.

This patch newly add getter/setter methods to pipeline node classes. To
handle each node sophisticated, it provides developers with a control
method for each type.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
src/Tizen.MachineLearning.Inference/Interop/Interop.Nnstreamer.cs
src/Tizen.MachineLearning.Inference/Tizen.MachineLearning.Inference/Commons.cs
src/Tizen.MachineLearning.Inference/Tizen.MachineLearning.Inference/CustomFilter.cs [new file with mode: 0755]
src/Tizen.MachineLearning.Inference/Tizen.MachineLearning.Inference/Pipeline.cs [changed mode: 0644->0755]

index c92f8ce..cba86ab 100755 (executable)
@@ -35,6 +35,10 @@ internal static partial class Interop
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         internal delegate void NewDataCallback(IntPtr data, IntPtr info, IntPtr user_data);
 
+        /* typedef int (*ml_custom_easy_invoke_cb) (const ml_tensors_data_h in, ml_tensors_data_h out, void *user_data); */
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate void CustomEasyInvokeCallback(IntPtr in_data, IntPtr out_data, IntPtr user_data);
+
         /* int ml_pipeline_construct (const char *pipeline_description, ml_pipeline_state_cb cb, void *user_data, ml_pipeline_h *pipe); */
         [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_construct", CallingConvention = CallingConvention.Cdecl)]
         internal static extern NNStreamerError Construct(string pipeline_description, StateChangedCallback callback, IntPtr user_data, out IntPtr pipeline_handle);
@@ -98,6 +102,86 @@ internal static partial class Interop
         /* int ml_pipeline_switch_select (ml_pipeline_switch_h switch_handle, const char *pad_name); */
         [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_switch_select", CallingConvention = CallingConvention.Cdecl)]
         internal static extern NNStreamerError SelectSwitchPad(IntPtr switch_handle, string pad_name);
+
+        /* int ml_pipeline_custom_easy_filter_register (const char *name, const ml_tensors_info_h in, const ml_tensors_info_h out, ml_custom_easy_invoke_cb cb, void *user_data, ml_custom_easy_filter_h *custom); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_custom_easy_filter_register", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError RegisterCustomFilter(string name, IntPtr input_info, IntPtr output_info, CustomEasyInvokeCallback callback, IntPtr user_data, out IntPtr custom_handle);
+
+        /* int ml_pipeline_custom_easy_filter_unregister (ml_custom_easy_filter_h custom); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_custom_easy_filter_unregister", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError UnregisterCustomFilter(IntPtr custom_handle);
+
+        /* int ml_pipeline_element_get_handle (ml_pipeline_h pipe, const char *element_name, ml_pipeline_element_h *elem_h); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_handle", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetElementHandle(IntPtr pipeline_handle, string element_name, out IntPtr element_handle);
+
+        /* int ml_pipeline_element_release_handle (ml_pipeline_element_h elem_h); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_release_handle", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError ReleaseElementHandle(IntPtr element_handle);
+
+        /* int ml_pipeline_element_set_property_bool (ml_pipeline_element_h elem_h, const char *property_name, const int32_t value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_bool", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyBool(IntPtr element_handle, string property_name, int value);
+
+        /* int ml_pipeline_element_set_property_string (ml_pipeline_element_h elem_h, const char *property_name, const char *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_string", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyString(IntPtr element_handle, string property_name, string value);
+
+        /* int ml_pipeline_element_set_property_int32 (ml_pipeline_element_h elem_h, const char *property_name, const int32_t value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_int32", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyInt32(IntPtr element_handle, string property_name, int value);
+
+        /* int ml_pipeline_element_set_property_int64 (ml_pipeline_element_h elem_h, const char *property_name, const int64_t value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_int64", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyInt64(IntPtr element_handle, string property_name, long value);
+
+        /* int ml_pipeline_element_set_property_uint32 (ml_pipeline_element_h elem_h, const char *property_name, const uint32_t value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_uint32", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyUInt32(IntPtr element_handle, string property_name, uint value);
+
+        /* int ml_pipeline_element_set_property_uint64 (ml_pipeline_element_h elem_h, const char *property_name, const uint64_t value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_uint64", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyUInt64(IntPtr element_handle, string property_name, ulong value);
+
+        /* int ml_pipeline_element_set_property_double (ml_pipeline_element_h elem_h, const char *property_name, const double value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_double", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyDouble(IntPtr element_handle, string property_name, double value);
+
+        /* int ml_pipeline_element_set_property_enum (ml_pipeline_element_h elem_h, const char *property_name, const uint32_t value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_set_property_enum", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError SetPropertyEnum(IntPtr element_handle, string property_name, uint value);
+
+        /* int ml_pipeline_element_get_property_bool (ml_pipeline_element_h elem_h, const char *property_name, int32_t *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_bool", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyBool(IntPtr element_handle, string property_name, out int value);
+
+        /* int ml_pipeline_element_get_property_string (ml_pipeline_element_h elem_h, const char *property_name, char **value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_string", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyString(IntPtr element_handle, string property_name, out string value);
+
+        /* int ml_pipeline_element_get_property_int32 (ml_pipeline_element_h elem_h, const char *property_name, int32_t *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_int32", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyInt32(IntPtr element_handle, string property_name, out int value);
+
+        /* int ml_pipeline_element_get_property_int64 (ml_pipeline_element_h elem_h, const char *property_name, int64_t *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_int64", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyInt64(IntPtr element_handle, string property_name, out long value);
+
+        /* int ml_pipeline_element_get_property_uint32 (ml_pipeline_element_h elem_h, const char *property_name, uint32_t *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_uint32", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyUInt32(IntPtr element_handle, string property_name, out uint value);
+
+        /* int ml_pipeline_element_get_property_uint64 (ml_pipeline_element_h elem_h, const char *property_name, uint64_t *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_uint64", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyUInt64(IntPtr element_handle, string property_name, out ulong value);
+
+        /* int ml_pipeline_element_get_property_double (ml_pipeline_element_h elem_h, const char *property_name, double *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_double", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyDouble(IntPtr element_handle, string property_name, out double value);
+
+        /* int ml_pipeline_element_get_property_enum (ml_pipeline_element_h elem_h, const char *property_name, uint32_t *value); */
+        [DllImport(Libraries.Nnstreamer, EntryPoint = "ml_pipeline_element_get_property_enum", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern NNStreamerError GetPropertyEnum(IntPtr element_handle, string property_name, out uint value);
     }
 
     internal static partial class SingleShot
index bef8110..672e391 100755 (executable)
@@ -134,44 +134,49 @@ namespace Tizen.MachineLearning.Inference
         /// <summary>
         /// Custom filter (Independent shared object).
         /// </summary>
-        CustomFilter,
+        CustomFilter = 1,
         /// <summary>
         /// Tensorflow-lite (.tflite).
         /// </summary>
-        TensorflowLite,
+        TensorflowLite = 2,
         /// <summary>
         /// Tensorflow (.pb).
         /// </summary>
-        Tensorflow,
+        Tensorflow = 3,
         /// <summary>
         /// Neural Network Inference framework, which is developed by SR (Samsung Research).
         /// </summary>
-        NNFW,
+        NNFW = 4,
         /// <summary>
         /// Intel Movidius Neural Compute SDK (libmvnc).
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
-        MVNC,
+        MVNC = 5,
         /// <summary>
         /// Intel OpenVINO.
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
-        OpenVINO,
+        OpenVINO = 6,
         /// <summary>
         /// VeriSilicon's Vivante.
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
-        Vivante,
+        Vivante = 7,
         /// <summary>
         /// Google Coral Edge TPU (USB).
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
-        EdgeTPU,
+        EdgeTPU = 8,
         /// <summary>
         /// Arm Neural Network framework (support for caffe and tensorflow-lite).
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
-        ArmNN,
+        ArmNN = 9,
+        /// <summary>
+        /// Qualcomm SNPE (Snapdgragon Neural Processing Engine (.dlc)
+        /// </summary>
+        /// <since_tizen> 9 </since_tizen>
+        SNPE = 10,
     }
 
     /// <summary>
@@ -193,10 +198,15 @@ namespace Tizen.MachineLearning.Inference
         /// </summary>
         CPU = 0x1000,
         /// <summary>
+        /// SIMD in CPU if possible.
+        /// <since_tizen> 8 </since_tizen>
+        /// </summary>
+        CPUSIMD = 0x1100,
+        /// <summary>
         /// NEON in CPU.
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
-        CPUNeon = 0x1100,
+        CPUNeon = CPUSIMD,
         /// <summary>
         /// Any GPU if possible.
         /// </summary>
diff --git a/src/Tizen.MachineLearning.Inference/Tizen.MachineLearning.Inference/CustomFilter.cs b/src/Tizen.MachineLearning.Inference/Tizen.MachineLearning.Inference/CustomFilter.cs
new file mode 100755 (executable)
index 0000000..23dd665
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.MachineLearning.Inference
+{
+    /// <summary>
+    /// The CustomFilter class provides interfaces to create a custom-filter in the pipeline.
+    /// </summary>
+    /// <remarks>
+    /// Because of data translation (i.e. marshaling and unmarshaling ) between Native and .Net Layer, CustomFilter class shows lower performance than native implementation.
+    /// </remarks>
+    /// <since_tizen> 8 </since_tizen>
+    public class CustomFilter : IDisposable
+    {
+        private Interop.Pipeline.CustomEasyInvokeCallback _nativeCallback;
+        private Func<TensorsData, TensorsData> _filter;
+
+        private TensorsInfo _InInfo;
+        private TensorsInfo _OutInfo;
+        private bool _disposed = false;
+
+        /// <summary>
+        /// Internally gets and sets the the native handle of custom filter.
+        /// </summary>
+        /// <since_tizen> 8 </since_tizen>
+        internal IntPtr Handle { get; set; }
+
+        /// <summary>
+        /// Gets or internally sets the name of the CustomFilter
+        /// </summary>
+        public string Name { get; internal set; }
+
+        /// <summary>
+        /// Creates new custom-filter with input and output tensors information.
+        /// </summary>
+        /// <param name="name">The name of custom-filter</param>
+        /// <param name="inInfo">The input tensors information</param>
+        /// <param name="outInfo">The output tensors information</param>
+        /// <param name="filter">Delegate to be called while processing the pipeline</param>
+        /// <returns>CustomFiter instance</returns>
+        /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+        /// <since_tizen> 8 </since_tizen>
+        public static CustomFilter Create(string name,
+            TensorsInfo inInfo, TensorsInfo outInfo, Func<TensorsData, TensorsData> filter)
+        {
+            NNStreamer.CheckNNStreamerSupport();
+
+            return new CustomFilter(name, inInfo, outInfo, filter);
+        }
+
+        /// <summary>
+        /// Releases any unmanaged resources used by this object.
+        /// </summary>
+        /// <since_tizen> 8 </since_tizen>
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        /// <summary>
+        /// Releases any unmanaged resources used by this object including opened handle.
+        /// </summary>
+        /// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
+        /// <since_tizen> 8 </since_tizen>
+        protected virtual void Dispose(bool disposing)
+        {
+            if (_disposed)
+                return;
+
+            if (disposing)
+            {
+                // release managed objects
+            }
+
+            // release unmanaged objects
+            if (Handle != IntPtr.Zero)
+            {
+                NNStreamerError ret = Interop.Pipeline.UnregisterCustomFilter(Handle);
+                if (ret != NNStreamerError.None)
+                    Log.Error(NNStreamer.TAG, "failed to destroy CustomFilter object");
+
+                Handle = IntPtr.Zero;
+            }
+            _disposed = true;
+        }
+
+        private CustomFilter(string name, TensorsInfo inInfo, TensorsInfo outInfo, Func<TensorsData, TensorsData> filter)
+        {
+            /* Parameger check */
+            if (name == null)
+                throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, "Given name is null");
+
+            if (inInfo == null || outInfo == null)
+                throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, "Given TensorsInfo is null");
+
+            if (filter == null)
+                throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, "Given Callback interface is null");
+
+            _nativeCallback = (in_data_handle, out_data_handle, _) =>
+            {
+                TensorsData inData = TensorsData.CreateFromNativeHandle(in_data_handle, IntPtr.Zero, true, false);
+                TensorsData outData = _filter(inData);
+                out_data_handle = outData.GetHandle();
+            };
+
+            IntPtr handle = IntPtr.Zero;
+
+            /* Create custom filter callback */
+            NNStreamerError ret = Interop.Pipeline.RegisterCustomFilter(name,
+                inInfo.GetTensorsInfoHandle(), outInfo.GetTensorsInfoHandle(), _nativeCallback, IntPtr.Zero, out handle);
+            NNStreamer.CheckException(ret, "Failed to create custom filter function: " + name);
+
+            /* Set internal member */
+            _InInfo = inInfo;
+            _OutInfo = outInfo;
+            _filter = filter;
+
+            Name = name;
+            Handle = handle;
+        }
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)
index 12211d2..ea9e8f9
@@ -16,6 +16,7 @@
 
 using System;
 using System.Collections.Generic;
+using System.Text;
 
 namespace Tizen.MachineLearning.Inference
 {
@@ -335,6 +336,40 @@ namespace Tizen.MachineLearning.Inference
         }
 
         /// <summary>
+        /// Gets the normal node instance with given node name.
+        /// </summary>
+        /// <param name="name">The name of normal node.</param>
+        /// <returns>The normal node instance</returns>
+        /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+        /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+        /// <since_tizen> 8 </since_tizen>
+        public Node GetNormal(string name)
+        {
+            NNStreamer.CheckNNStreamerSupport();
+
+            /* Check the parameter */
+            if (string.IsNullOrEmpty(name))
+                throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, "Node name is invalid");
+
+            Node node;
+            if (_nodeList.ContainsKey(name))
+            {
+                if (_nodeList[name].Type != NodeType.Normal)
+                    throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, name + " is not a normal node");
+
+                node = (Node)_nodeList[name];
+            }
+            else
+            {
+                node = new Node(name, this);
+                _nodeList.Add(name, node);
+            }
+            return node;
+        }
+
+
+        /// <summary>
         /// SwitchNode class to handle the switch node.
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
@@ -535,6 +570,23 @@ namespace Tizen.MachineLearning.Inference
         }
 
         /// <summary>
+        /// Node class to handle the properties of NNStreamer pipelines.
+        /// </summary>
+        /// <since_tizen> 8 </since_tizen>
+        public class Node : NodeInfo
+        {
+            internal Node(string name, Pipeline pipe) : base(NodeType.Normal, name, pipe)
+            {
+                IntPtr handle = IntPtr.Zero;
+
+                NNStreamerError ret = Interop.Pipeline.GetElementHandle(pipe.GetHandle(), name, out handle);
+                NNStreamer.CheckException(ret, "Failed to get the pipeline node handle: " + name);
+
+                Handle = handle;
+            }
+        }
+
+        /// <summary>
         /// Node type of NNStreamer pipeline.
         /// </summary>
         /// <since_tizen> 8 </since_tizen>
@@ -556,6 +608,10 @@ namespace Tizen.MachineLearning.Inference
             /// The switch node.
             /// </summary>
             Switch = 3,
+            /// <summary>
+            /// The normal node of the pipeline.
+            /// </summary>
+            Normal = 4,
         }
 
         /// <summary>
@@ -602,6 +658,339 @@ namespace Tizen.MachineLearning.Inference
             /// </summary>
             /// <since_tizen> 8 </since_tizen>
             public bool Valid { get; internal set; }
+
+            private void CheckGetParam(string propertyName)
+            {
+                NNStreamer.CheckNNStreamerSupport();
+
+                if (string.IsNullOrEmpty(propertyName))
+                    throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, "Property name is invalid");
+            }
+
+            private void CheckSetParam(string propertyName, object value)
+            {
+                NNStreamer.CheckNNStreamerSupport();
+
+                if (string.IsNullOrEmpty(propertyName))
+                    throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, "Property name is invalid");
+
+                if (value is null)
+                    throw NNStreamerExceptionFactory.CreateException(NNStreamerError.InvalidParameter, "Value is invalid");
+            }
+
+            /// <summary>
+            /// Gets the boolean of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="retValue">On return, a boolean value.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void GetValue(string propertyName, out bool retValue)
+            {
+                CheckGetParam(propertyName);
+
+                NNStreamerError ret = Interop.Pipeline.GetPropertyBool(Handle, propertyName, out int value);
+                NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                retValue = value == 0 ? false : true;
+            }
+
+            /// <summary>
+            /// Gets the string of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="retValue">On return, a string value.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void GetValue(string propertyName, out string retValue)
+            {
+                CheckGetParam(propertyName);
+
+                NNStreamerError ret = Interop.Pipeline.GetPropertyString(Handle, propertyName, out string value);
+                NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                retValue = value;
+            }
+
+            /// <summary>
+            /// Gets the integer (i.e. System.Int32) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="retValue">On return, a integer value.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void GetValue(string propertyName, out int retValue)
+            {
+                CheckGetParam(propertyName);
+
+                NNStreamerError ret = Interop.Pipeline.GetPropertyInt32(Handle, propertyName, out int value);
+                NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                retValue = value;
+            }
+
+            /// <summary>
+            /// Gets the long integer (i.e. System.Int64) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="retValue">On return, a long integer value.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void GetValue(string propertyName, out long retValue)
+            {
+                CheckGetParam(propertyName);
+
+                NNStreamerError ret = Interop.Pipeline.GetPropertyInt64(Handle, propertyName, out long value);
+                NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                retValue = value;
+            }
+
+            /// <summary>
+            /// Gets the unsigned integer (i.e. System.UInt32) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="retValue">On return, a unsigned integer value.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void GetValue(string propertyName, out uint retValue)
+            {
+                CheckGetParam(propertyName);
+
+                NNStreamerError ret = Interop.Pipeline.GetPropertyUInt32(Handle, propertyName, out uint value);
+                NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                retValue = value;
+            }
+
+            /// <summary>
+            /// Gets the unsigned long integer (i.e. System.UInt64) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="retValue">On return, a unsigned long integer value.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void GetValue(string propertyName, out ulong retValue)
+            {
+                CheckGetParam(propertyName);
+
+                NNStreamerError ret = Interop.Pipeline.GetPropertyUInt64(Handle, propertyName, out ulong value);
+                NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                retValue = value;
+            }
+
+            /// <summary>
+            /// Gets the floating-point value of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="retValue">On return, a floating-point value.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void GetValue(string propertyName, out double retValue)
+            {
+                CheckGetParam(propertyName);
+
+                NNStreamerError ret = Interop.Pipeline.GetPropertyDouble(Handle, propertyName, out double value);
+                NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                retValue = value;
+            }
+
+            /// <summary>
+            /// Get the value of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <typeparam name="T">The value type of given property.</typeparam>
+            /// <param name="propertyName">The property name.</param>
+            /// <returns>The value of given property.</returns>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public T GetValue<T>(string propertyName)
+            {
+                NNStreamerError ret;
+                CheckGetParam(propertyName);
+
+                if (typeof(bool).IsAssignableFrom(typeof(T)))
+                {
+                    ret = Interop.Pipeline.GetPropertyBool(Handle, propertyName, out int value);
+                    NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                    return (T)Convert.ChangeType(value == 0 ? false : true, typeof(T));
+                }
+                else if (typeof(string).IsAssignableFrom(typeof(T)))
+                {
+                    ret = Interop.Pipeline.GetPropertyString(Handle, propertyName, out string value);
+                    NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                    return (T)Convert.ChangeType(value, typeof(T));
+                }
+                else if (typeof(int).IsAssignableFrom(typeof(T)))
+                {
+                    ret = Interop.Pipeline.GetPropertyInt32(Handle, propertyName, out int value);
+                    NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                    return (T)Convert.ChangeType(value, typeof(T));
+                }
+                else if (typeof(long).IsAssignableFrom(typeof(T)))
+                {
+                    ret = Interop.Pipeline.GetPropertyInt64(Handle, propertyName, out long value);
+                    NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                    return (T)Convert.ChangeType(value, typeof(T));
+                }
+                else if (typeof(uint).IsAssignableFrom(typeof(T)))
+                {
+                    ret = Interop.Pipeline.GetPropertyUInt32(Handle, propertyName, out uint value);
+                    NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                    return (T)Convert.ChangeType(value, typeof(T));
+                }
+                else if (typeof(ulong).IsAssignableFrom(typeof(T)))
+                {
+                    ret = Interop.Pipeline.GetPropertyUInt64(Handle, propertyName, out ulong value);
+                    NNStreamer.CheckException(ret, string.Format("Failed to get {0} property.", propertyName));
+
+                    return (T)Convert.ChangeType(value, typeof(T));
+                }
+
+                throw new ArgumentException("The Input data type is not valid.");
+            }
+
+            /// <summary>
+            /// Sets the boolean of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="value">The boolean value of given property.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void SetValue(string propertyName, bool value)
+            {
+                CheckSetParam(propertyName, value);
+                int setValue = value ? 1 : 0;
+
+                NNStreamerError ret = Interop.Pipeline.SetPropertyBool(Handle, propertyName, setValue);
+                NNStreamer.CheckException(ret, string.Format("Failed to set {0} property.", propertyName));
+            }
+
+            /// <summary>
+            /// Sets the string of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="value">The string of given property.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void SetValue(string propertyName, string value)
+            {
+                CheckSetParam(propertyName, value);
+
+                NNStreamerError ret = Interop.Pipeline.SetPropertyString(Handle, propertyName, value);
+                NNStreamer.CheckException(ret, string.Format("Failed to set {0} property.", propertyName));
+            }
+
+            /// <summary>
+            /// Sets the integer (i.e. System.Int32) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="value">The integer value of given property.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void SetValue(string propertyName, int value)
+            {
+                CheckSetParam(propertyName, value);
+
+                NNStreamerError ret = Interop.Pipeline.SetPropertyInt32(Handle, propertyName, value);
+                NNStreamer.CheckException(ret, string.Format("Failed to set {0} property.", propertyName));
+            }
+
+            /// <summary>
+            /// Sets the long integer (i.e. System.Int64) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="value">The long integer value of given property.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void SetValue(string propertyName, long value)
+            {
+                CheckSetParam(propertyName, value);
+
+                NNStreamerError ret = Interop.Pipeline.SetPropertyInt64(Handle, propertyName, value);
+                NNStreamer.CheckException(ret, string.Format("Failed to set {0} property.", propertyName));
+            }
+
+            /// <summary>
+            /// Sets the unsigned integer (i.e. System.UInt32) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="value">The unsigned integer value of given property.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void SetValue(string propertyName, uint value)
+            {
+                CheckSetParam(propertyName, value);
+
+                NNStreamerError ret = Interop.Pipeline.SetPropertyUInt32(Handle, propertyName, value);
+                NNStreamer.CheckException(ret, string.Format("Failed to set {0} property.", propertyName));
+            }
+
+            /// <summary>
+            /// Sets the unsigned long integer (i.e. System.UInt64) of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="value">The unsigned long integer value of given property.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void SetValue(string propertyName, ulong value)
+            {
+                CheckSetParam(propertyName, value);
+
+                NNStreamerError ret = Interop.Pipeline.SetPropertyUInt64(Handle, propertyName, value);
+                NNStreamer.CheckException(ret, string.Format("Failed to set {0} property.", propertyName));
+            }
+
+            /// <summary>
+            /// Gets the floating-point value of node's property in NNStreamer pipelines.
+            /// </summary>
+            /// <param name="propertyName">The property name.</param>
+            /// <param name="value">The floating-point value of given property.</param>
+            /// <feature>http://tizen.org/feature/machine_learning.inference</feature>
+            /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
+            /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception>
+            /// <since_tizen> 8 </since_tizen>
+            public void SetValue(string propertyName, double value)
+            {
+                CheckSetParam(propertyName, value);
+
+                NNStreamerError ret = Interop.Pipeline.SetPropertyDouble(Handle, propertyName, value);
+                NNStreamer.CheckException(ret, string.Format("Failed to set {0} property.", propertyName));
+            }
         }
     }
 }