Class FaceRecognitionModel

    Definition

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

    Represents the face recognition model interface.

    public class FaceRecognitionModel : IDisposable
    Inheritance
    object
    FaceRecognitionModel

    Constructors

    View Source

    FaceRecognitionModel()

    Initializes a new instance of the FaceRecognitionModel class.

    Declaration
    public FaceRecognitionModel()
    View Source

    FaceRecognitionModel(string)

    Initializes a new instance of the FaceRecognitionModel class with the specified path.

    Declaration
    public FaceRecognitionModel(string modelPath)
    Parameters
    Type Name Description
    string modelPath

    Path to the model to load.

    Remarks

    Models saved by Save(string) can be loaded.

    See Also
    Save(string)

    Properties

    View Source

    Labels

    Gets labels that had been learned by the model.

    Declaration
    public int[] Labels { get; }
    Property Value
    Type Description
    int[]

    Methods

    View Source

    Add(MediaVisionSource, int, Rectangle)

    Adds the face image example to be used for face recognition model learning.

    Declaration
    public void Add(MediaVisionSource source, int label, Rectangle area)
    Parameters
    Type Name Description
    MediaVisionSource source

    The MediaVisionSource that contains face image.

    int label

    The label that identifies face for which example is adding. Specify the same labels for the face images of a single person when calling this method. Has to be unique for each face.

    Rectangle area

    The rectangular region of the face image at the source image.

    See Also
    Learn(FaceRecognitionConfiguration)
    View Source

    Add(MediaVisionSource, int)

    Adds the face image example to be used for face recognition model learning.

    Declaration
    public void Add(MediaVisionSource source, int label)
    Parameters
    Type Name Description
    MediaVisionSource source

    The MediaVisionSource that contains face image.

    int label

    The label that identifies face for which example is adding. Specify the same labels for the face images of a single person when calling this method. Has to be unique for each face.

    See Also
    Learn(FaceRecognitionConfiguration)
    View Source

    Dispose()

    Releases all the resources used by the FaceRecognitionModel object.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Releases the resources used by the FaceRecognitionModel object.

    Declaration
    protected virtual 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.

    View Source

    ~FaceRecognitionModel()

    Finalizes an instance of the FaceRecognitionModel class.

    Declaration
    protected ~FaceRecognitionModel()
    View Source

    Learn()

    Learns the face recognition model.

    Declaration
    public void Learn()
    Remarks

    Before you start the learning process, face recognition models have to be filled with the training data - face image examples. These examples have to be provided by Add(MediaVisionSource, int) or Add(MediaVisionSource, int, Rectangle). Recognition accuracy is usually increased when the different examples of the identical faces are added more and more. But it depends on the used learning algorithm.

    See Also
    Add(MediaVisionSource, int)
    Add(MediaVisionSource, int, Rectangle)
    View Source

    Learn(FaceRecognitionConfiguration)

    Learns the face recognition model with FaceRecognitionConfiguration.

    Declaration
    public void Learn(FaceRecognitionConfiguration config)
    Parameters
    Type Name Description
    FaceRecognitionConfiguration config

    The configuration used for learning of the recognition models. This value can be null.

    Remarks

    Before you start the learning process, face recognition models have to be filled with the training data - face image examples. These examples have to be provided by Add(MediaVisionSource, int) or Add(MediaVisionSource, int, Rectangle). Recognition accuracy is usually increased when the different examples of the identical faces are added more and more. But it depends on the used learning algorithm.

    See Also
    Add(MediaVisionSource, int)
    Add(MediaVisionSource, int, Rectangle)
    View Source

    Remove(int)

    Removes all face examples added with the specified label.

    Declaration
    public bool Remove(int label)
    Parameters
    Type Name Description
    int label

    The label that identifies face for which examples will be removed.

    Returns
    Type Description
    bool

    true if the examples are successfully removed; otherwise, false if there is no example labeled with the specified label.

    See Also
    Add(MediaVisionSource, int)
    Add(MediaVisionSource, int, Rectangle)
    View Source

    Reset()

    Removes all face examples.

    Declaration
    public void Reset()
    View Source

    Save(string)

    Saves the recognition model to the file.

    Declaration
    public void Save(string path)
    Parameters
    Type Name Description
    string path

    Path to the file to save the model.

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX