Class InferenceImageClassifier
Definition
- Namespace:
- Tizen.Multimedia.Vision
- Assembly:
- Tizen.Multimedia.Vision.dll
Provides the ability to classify image.
public class InferenceImageClassifier : IDisposable
- Inheritance
-
objectInferenceImageClassifier
- Implements
-
System.IDisposable
Constructors
View SourceInferenceImageClassifier()
Initializes a new instance of the InferenceImageClassifier class.
Declaration
public InferenceImageClassifier()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | The required features are not supported. |
Methods
View SourceDispose()
Releases all resources used by the InferenceImageClassifier.
Declaration
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the InferenceImageClassifier.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
~InferenceImageClassifier()
Finalizes an instance of the InferenceImageClassifier class.
Declaration
protected ~InferenceImageClassifier()
GetRequestResults()
Gets the labels as a result of RequestInference(MediaVisionSource).
Declaration
public InferenceImageClassifierResult GetRequestResults()
Returns
Type | Description |
---|---|
InferenceImageClassifierResult | The labels of classified image. |
Remarks
If image is not classified, Labels will be empty.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
See Also
View SourceInference(MediaVisionSource)
Classifies image synchronously.
Declaration
public InferenceImageClassifierResult Inference(MediaVisionSource source)
Parameters
Type | Name | Description |
---|---|---|
MediaVisionSource | source | The image data to classify. |
Returns
Type | Description |
---|---|
InferenceImageClassifierResult | The labels of classified image. |
Remarks
Labels can be empty, if image is not classified.
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
System.ArgumentNullException |
|
InferenceAsync(MediaVisionSource)
Classifies image asynchronously.
Declaration
public Task<InferenceImageClassifierResult> InferenceAsync(MediaVisionSource source)
Parameters
Type | Name | Description |
---|---|---|
MediaVisionSource | source | The image data to classify. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><InferenceImageClassifierResult> |
Remarks
Labels can be empty, if image is not classified.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
System.ArgumentNullException |
|
RequestInference(MediaVisionSource)
Requests classifing image to get its labels asynchronously.
Declaration
public ulong RequestInference(MediaVisionSource source)
Parameters
Type | Name | Description |
---|---|---|
MediaVisionSource | source | The image data to classify. |
Returns
Type | Description |
---|---|
ulong | The request ID that indicates the order of requests. |
Remarks
This function does not guarantee that inference is done when this method returns. The user can get the result by using GetRequestResults().
If the user calls this method again before the previous one is finished internally, the call will be ignored.
Labels can be empty, if image is not classified.
Note that this method could use about twice as much memory as Inference(MediaVisionSource).
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
System.ArgumentNullException |
|