Class InferenceImageClassifier
Definition
- Namespace:
- Tizen.Multimedia.Vision
- Assembly:
- Tizen.Multimedia.Vision.dll
Provides the ability to classify image.
public class InferenceImageClassifier : IDisposable
- Inheritance
-
objectInference
Image Classifier
- Implements
-
System.
IDisposable
Constructors
View SourceInferenceImageClassifier()
Initializes a new instance of the Inference
Declaration
public InferenceImageClassifier()
Exceptions
Type | Condition |
---|---|
System. |
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 Request
Declaration
public InferenceImageClassifierResult GetRequestResults()
Returns
Type | Description |
---|---|
Inference |
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(Media
Exceptions
Type | Condition |
---|---|
System. |
The InferenceImageClassifier already has been disposed. |
See Also
View SourceInference(MediaVisionSource)
Classifies image synchronously.
Declaration
public InferenceImageClassifierResult Inference(MediaVisionSource source)
Parameters
Type | Name | Description |
---|---|---|
Media |
source | The image data to classify. |
Returns
Type | Description |
---|---|
Inference |
The labels of classified image. |
Remarks
Labels can be empty, if image is not classified.
Exceptions
Type | Condition |
---|---|
System. |
The InferenceImageClassifier already has been disposed. |
System. |
|
InferenceAsync(MediaVisionSource)
Classifies image asynchronously.
Declaration
public Task<InferenceImageClassifierResult> InferenceAsync(MediaVisionSource source)
Parameters
Type | Name | Description |
---|---|---|
Media |
source | The image data to classify. |
Returns
Type | Description |
---|---|
System. |
Remarks
Labels can be empty, if image is not classified.
This method uses about twice as much memory as Inference(Media
Exceptions
Type | Condition |
---|---|
System. |
The InferenceImageClassifier already has been disposed. |
System. |
|
RequestInference(MediaVisionSource)
Requests classifing image to get its labels asynchronously.
Declaration
public ulong RequestInference(MediaVisionSource source)
Parameters
Type | Name | Description |
---|---|---|
Media |
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 Get
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(Media
Exceptions
Type | Condition |
---|---|
System. |
The InferenceImageClassifier already has been disposed. |
System. |
|