justadudewhohacks/face-recognition.js

How to clear Сlassifier (clearFaces)?

Opened this issue · 3 comments

In face-recognition.js has a method of adding faces to a specific classifier by name.
recognizer.addFaces(sheldonFaces, 'sheldon')
Is it possible to cancel the action? Clear classifier by name?
example:
recognizer.clearFaces('sheldon')
or
recognizer.clearFace('sheldon', 2) // index

The problem is actual to this day.

You can simply serialize the FaceRecognizer as shown in the examples and recreate it with the filtered descriptors.

If something like clearFaces is a desired feature, I am happy to take PRs.

Recreate it with the filtered descriptors. Should I use the method recognizer.load(filteredDescriptors)?