@@ -60,19 +60,6 @@ public interface IOnnxModelService : IDisposable
6060 Task < bool > IsEnabledAsync ( IOnnxModel model , OnnxModelType modelType ) ;
6161
6262
63- /// <summary>
64- /// Runs the inference Use when output size is unknown
65- /// </summary>
66- /// <param name="model">The model.</param>
67- /// <param name="modelType">Type of the model.</param>
68- /// <param name="inputName">Name of the input.</param>
69- /// <param name="inputValue">The input value.</param>
70- /// <param name="outputName">Name of the output.</param>
71- /// <param name="outputValue">The output value.</param>
72- /// <returns></returns>
73- IDisposableReadOnlyCollection < OrtValue > RunInference ( IOnnxModel model , OnnxModelType modelType , string inputName , OrtValue inputValue , string outputName ) ;
74-
75-
7663 /// <summary>
7764 /// Runs the inference Use when output size is unknown
7865 /// </summary>
@@ -81,21 +68,7 @@ public interface IOnnxModelService : IDisposable
8168 /// <param name="inputs">The inputs.</param>
8269 /// <param name="outputs">The outputs.</param>
8370 /// <returns></returns>
84- IDisposableReadOnlyCollection < OrtValue > RunInference ( IOnnxModel model , OnnxModelType modelType , Dictionary < string , OrtValue > inputs , IReadOnlyCollection < string > outputs ) ;
85-
86-
87- /// <summary>
88- /// Runs the inference asynchronously, Use when output size is known
89- /// Output buffer size must be known and set before inference is run
90- /// </summary>
91- /// <param name="model">The model.</param>
92- /// <param name="modelType">Type of the model.</param>
93- /// <param name="inputName">Name of the input.</param>
94- /// <param name="inputValue">The input value.</param>
95- /// <param name="outputName">Name of the output.</param>
96- /// <param name="outputValue">The output value.</param>
97- /// <returns></returns>
98- Task < IReadOnlyCollection < OrtValue > > RunInferenceAsync ( IOnnxModel model , OnnxModelType modelType , string inputName , OrtValue inputValue , string outputName , OrtValue outputValue ) ;
71+ IDisposableReadOnlyCollection < OrtValue > RunInference ( IOnnxModel model , OnnxModelType modelType , OnnxInferenceParameters parameters ) ;
9972
10073
10174 /// <summary>
@@ -107,39 +80,15 @@ public interface IOnnxModelService : IDisposable
10780 /// <param name="inputs">The inputs.</param>
10881 /// <param name="outputs">The outputs.</param>
10982 /// <returns></returns>
110- Task < IReadOnlyCollection < OrtValue > > RunInferenceAsync ( IOnnxModel model , OnnxModelType modelType , Dictionary < string , OrtValue > inputs , Dictionary < string , OrtValue > outputs ) ;
83+ Task < IReadOnlyCollection < OrtValue > > RunInferenceAsync ( IOnnxModel model , OnnxModelType modelType , OnnxInferenceParameters parameters ) ;
11184
11285
11386 /// <summary>
114- /// Gets the Sessions input metadata.
87+ /// Gets the model metadata.
11588 /// </summary>
116- /// <param name="modelType">Type of model.</param>
117- /// <returns></returns>
118- IReadOnlyDictionary < string , NodeMetadata > GetInputMetadata ( IOnnxModel model , OnnxModelType modelType ) ;
119-
120-
121- /// <summary>
122- /// Gets the Sessions input names.
123- /// </summary>
124- /// <param name="modelType">Type of model.</param>
125- /// <returns></returns>
126- IReadOnlyList < string > GetInputNames ( IOnnxModel model , OnnxModelType modelType ) ;
127-
128-
129- /// <summary>
130- /// Gets the Sessions output metadata.
131- /// </summary>
132- /// <param name="modelType">Type of model.</param>
133- /// <returns></returns>
134- IReadOnlyDictionary < string , NodeMetadata > GetOutputMetadata ( IOnnxModel model , OnnxModelType modelType ) ;
135-
136-
137- /// <summary>
138- /// Gets the Sessions output metadata names.
139- /// </summary>
140- /// <param name="modelType">Type of model.</param>
89+ /// <param name="model">The model.</param>
90+ /// <param name="modelType">Type of the model.</param>
14191 /// <returns></returns>
142- IReadOnlyList < string > GetOutputNames ( IOnnxModel model , OnnxModelType modelType ) ;
143-
92+ OnnxMetadata GetModelMetadata ( IOnnxModel model , OnnxModelType modelType ) ;
14493 }
14594}
0 commit comments