这是indexloc提供的服务,不要输入任何密码
Skip to content

Request to Add addLabeledDescriptors Method and Support for Empty FaceMatcher Initialization #954

@Rann-Studio

Description

@Rann-Studio

Currently, FaceMatcher requires an initial set of labeled descriptors when it is created. However, it would be more flexible if we could create an empty FaceMatcher instance (without any labeled descriptors) and later add labeled descriptors dynamically using a method like addLabeledDescriptors.

I propose the following two changes:

  1. Support for Empty Initialization: Allow new faceapi.FaceMatcher() to be called without any initial labeled descriptors. This would enable users to instantiate a FaceMatcher without needing to provide labels upfront.

  2. addLabeledDescriptors Method: Add a method that allows new labeled descriptors to be appended to an existing FaceMatcher instance after it has been initialized, enabling the dynamic addition of labels.

// Create an empty FaceMatcher instance
const faceMatcher = new faceapi.FaceMatcher();

// Add labeled descriptors dynamically
faceMatcher.addLabeledDescriptors('newPerson', newFaceDescriptor);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions