Class InferenceModelConfiguration

    Definition

    Namespace:
    Tizen.Multimedia.Vision
    Assembly:
    Tizen.Multimedia.Vision.dll

    Represents a configuration of FaceDetector, FacialLandmarkDetector, ImageClassifier and ObjectDetector.

    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public class InferenceModelConfiguration : EngineConfiguration, IDisposable
    Inheritance
    object
    EngineConfiguration
    InferenceModelConfiguration
    Implements
    System.IDisposable
    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    Constructors

    View Source

    InferenceModelConfiguration()

    Initializes a new instance of the InferenceModelConfiguration class.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public InferenceModelConfiguration()
    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    Exceptions
    Type Condition
    System.NotSupportedException

    The feature is not supported.

    Properties

    View Source

    Backend

    Gets or sets the inference model's backend engine.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public InferenceBackendType Backend { get; set; }
    Property Value
    Type Description
    InferenceBackendType
    Remarks

    The default backend type is OpenCV

    Exceptions
    Type Condition
    System.ArgumentException

    value is not valid.

    System.NotSupportedException

    The engine type is not supported.

    See Also
    SupportedBackend
    View Source

    CategoryFilePath

    Gets or sets the path of inference model's category file.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public string CategoryFilePath { get; set; }
    Property Value
    Type Description
    string
    Remarks

    This value should be set to use ImageClassifier or ObjectDetector.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Input file path is null.

    View Source

    ConfidenceThreshold

    Gets or sets the threshold of confidence.

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public double ConfidenceThreshold { get; set; }
    Property Value
    Type Description
    double
    Remarks

    The vaild range is greater than or equal to 0.0 and less than or equal to 1.0.
    The value 1.0 means maximum accuracy.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    valueis out of range.

    View Source

    ConfigurationFilePath

    Gets or sets the path of inference model's configuration data file.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public string ConfigurationFilePath { get; set; }
    Property Value
    Type Description
    string
    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    Exceptions
    Type Condition
    System.ArgumentNullException

    Input file path is null.

    View Source

    DataType

    Gets or sets the type of data used for inference model.

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public InferenceDataType DataType { get; set; }
    Property Value
    Type Description
    InferenceDataType
    Remarks

    For example, this value should be set to Float32 for a model data supporting float32.
    Float32 will be used internally if a user doesn't set the value.

    Exceptions
    Type Condition
    System.ArgumentException

    value is not valid.

    View Source

    Device

    Gets or sets the processor type for inference models.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public InferenceTargetDevice Device { get; set; }
    Property Value
    Type Description
    InferenceTargetDevice
    Remarks

    The default device is CPU.
    If a device doesn't support GPU and Custom, CPU will be used internally, despite the user's choice.

    Exceptions
    Type Condition
    System.ArgumentException

    value is not valid.

    View Source

    InputNodeName

    Gets or sets the name of an input node

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public string InputNodeName { get; set; }
    Property Value
    Type Description
    string
    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    Exceptions
    Type Condition
    System.ArgumentNullException

    value is null.

    View Source

    MaxOutputNumber

    Gets or sets the maximum output number of detection or classification.

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public int MaxOutputNumber { get; set; }
    Property Value
    Type Description
    int
    Remarks

    The input value over 10 will be set to 10 and the input value under 1 will be set to 1.
    This value can be used to decide the size of Roi, it's length should be the same.

    View Source

    MeanValue

    Gets or sets the inference model's mean value.

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public double MeanValue { get; set; }
    Property Value
    Type Description
    double
    Remarks

    It should be greater than or equal to 0.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    The value is invalid.

    View Source

    MetadataFilePath

    Gets or sets the path of inference model's metadata file.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public string MetadataFilePath { get; set; }
    Property Value
    Type Description
    string
    Remarks

    This value should be set to use ImageClassifier or ObjectDetector.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Metadata file path is null.

    View Source

    OutputNodeName

    Gets or sets the name of an output node

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public IList<string> OutputNodeName { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<T><string>
    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    Exceptions
    Type Condition
    System.ArgumentNullException

    value is null.

    View Source

    Roi

    Gets or sets the ROI(Region Of Interest) of ImageClassifier and FacialLandmarkDetector

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public Rectangle? Roi { get; set; }
    Property Value
    Type Description
    Rectangle?
    Remarks

    Default value is null. If Roi is null, the entire region of MediaVisionSource will be analyzed.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    The width of value is less than or equal to zero.
    -or-
    The height of value is less than or equal to zero.
    -or-
    The x position of value is less than zero.
    -or-
    The y position of value is less than zero.

    See Also
    MaxOutputNumber
    View Source

    StdValue

    Gets or sets the inference model's STD(Standard deviation) value.

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public double StdValue { get; set; }
    Property Value
    Type Description
    double
    Remarks

    It should be greater than or equal to 0.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    The value is invalid.

    View Source

    SupportedBackend

    Gets the list of inference backend engine which is supported in the current device.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public IEnumerable<InferenceBackendType> SupportedBackend { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<T><InferenceBackendType>

    If there's no supported backend, empty collection will be returned.

    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    View Source

    TensorChannels

    Gets or sets the number of inference model's tensor channel.

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public int TensorChannels { get; set; }
    Property Value
    Type Description
    int
    Remarks

    For example, for RGB colorspace this value should be set to 3
    It should be greater than 0.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    The value is invalid.

    View Source

    TensorSize

    Gets or sets the size of inference model's tensor.

    Declaration
    [Obsolete("Deprecated since API9. Will be removed in API11. Please use MetadataFilePath instead.")]
    public Size TensorSize { get; set; }
    Property Value
    Type Description
    Size
    Remarks

    Both width and height of tensor should be greater than 0.
    'Size(-1, -1) is allowed when the intention is to use original image source size as TensorSize.

    Exceptions
    Type Condition
    System.ArgumentException

    Only one of value.Width.Width or value.Height.Height have -1.

    System.ArgumentOutOfRangeException

    The value is invalid.

    View Source

    WeightFilePath

    Gets or sets the path of inference model's weight file.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public string WeightFilePath { get; set; }
    Property Value
    Type Description
    string
    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    Exceptions
    Type Condition
    System.ArgumentNullException

    Input file path is null.

    Methods

    View Source

    Dispose(bool)

    Releases the resources used by the InferenceModelConfiguration object.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true to release both managed and unmanaged resources, otherwise false to release only unmanaged resources.

    Overrides
    EngineConfiguration.Dispose(bool)
    Remarks

    'Inference model' means pre-learned data, which is represented by ConfigurationFilePath and WeightFilePath, CategoryFilePath.
    If user want to use tizen default inference model and its related value, Please refer Tizen guide page(https://developer.tizen.org/development/guides/.net-application).

    View Source

    LoadInferenceModel()

    Loads inference model data and its related attributes.

    Declaration
    [Obsolete("Deprecated since API12. Will be removed in API15.")]
    public void LoadInferenceModel()
    Remarks

    Before calling this method, user should set all properties which is required by each inference model.
    The properties set after calling this method will not be affected in the result.

    Exceptions
    Type Condition
    System.IO.FileNotFoundException

    ConfigurationFilePath, WeightFilePath or CategoryFilePath have invalid path.

    FileFormatException

    Invalid data type is used in inference model data.

    System.IO.InvalidDataException

    Inference model data contains unsupported operations in current backend version. -or-
    Invalid data type is used in inference model data.

    System.InvalidOperationException

    Internal operation error.

    System.UnauthorizedAccessException

    The caller has no required privilege.

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX