5e8abbe19a8dcee18e57ebd58185fea2ba251fa6
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Vision / MediaVision / InferenceType.cs
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace Tizen.Multimedia.Vision
20 {
21     /// <summary>
22     /// Specifies the type of inference backend.
23     /// </summary>
24     /// <since_tizen> 6 </since_tizen>
25     public enum InferenceBackendType
26     {
27         /// <summary>
28         /// OpenCV backend type
29         /// </summary>
30         OpenCV,
31
32         /// <summary>
33         /// Tensor Flow Lite backend type
34         /// </summary>
35         TFLite,
36
37         /// <summary>
38         /// ArmNN backend type
39         /// </summary>
40         ArmNN,
41
42         /// <summary>
43         /// ML Single API of NNStreamer backend type
44         /// </summary>
45         /// <remarks>
46         /// Should be set <see cref="InferenceTargetDevice"/> to <see cref="InferenceTargetDevice.Custom"/>.
47         /// </remarks>
48         /// <since_tizen> 8 </since_tizen>
49         MLApi,
50
51         /// <summary>
52         /// On-device Neural Engine backend type
53         /// </summary>
54         /// <remarks>
55         /// Should be set <see cref="InferenceTargetDevice"/> to <see cref="InferenceTargetDevice.CPU"/> or
56         /// <see cref="InferenceTargetDevice.GPU"/>.
57         /// </remarks>
58         /// <since_tizen> 8 </since_tizen>
59         One
60     }
61
62     /// <summary>
63     /// Specifies the type of target. It's used for running inference backend.
64     /// </summary>
65     /// <since_tizen> 6 </since_tizen>
66     [Obsolete("Deprecated since API8; Will be removed in API10. Please use InferenceTargetDevice instead.")]
67     public enum InferenceTargetType
68     {
69         /// <summary>
70         /// CPU target
71         /// </summary>
72         CPU,
73
74         /// <summary>
75         /// GPU target
76         /// </summary>
77         GPU,
78
79         /// <summary>
80         /// Custom target
81         /// </summary>
82         Custom
83     }
84
85     /// <summary>
86     /// Specifies the device of target. It's used for running inference backend.
87     /// </summary>
88     /// <since_tizen> 8 </since_tizen>
89     public enum InferenceTargetDevice
90     {
91         /// <summary>
92         /// CPU device
93         /// </summary>
94         CPU = 1 << 0,
95
96         /// <summary>
97         /// GPU device
98         /// </summary>
99         GPU = 1 << 1,
100
101         /// <summary>
102         /// Custom device
103         /// </summary>
104         Custom = 1 << 2
105     }
106
107     /// <summary>
108     /// Specifies the data type.
109     /// </summary>
110     /// <since_tizen> 8 </since_tizen>
111     public enum InferenceDataType
112     {
113         /// <summary>
114         /// Float 32 bit
115         /// </summary>
116         Float32,
117
118         /// <summary>
119         /// Unsigned Integer 8 bit
120         /// </summary>
121         UInt8
122     }
123 }