Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rann-Studio opened this issue Nov 24, 2024 · 0 comments

Comments

@Rann-Studio
Copy link

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant