You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need something like that from face-recognition.js, only from the opencv4node.js package fs.writeFileSync(trainedModelFilePath, JSON.stringify(recognizer.serialize()));
If I understand, then I need:
const faceImage = getFaceImage(grayImage) // new image to train
const lbph = new cv.LBPHFaceRecognizer();
lbph.load(trainedModelFilePath); // trainedModelFilePath -> path to "model.yml"
lbph.update([faceImage], [5]); // 5 - exists Id in model.yml (I want to add a new face)
lbph.save(trainedModelFilePath);
Just ran into this same issue here. You've got a +1 from me on this request! I need to have the ability to load an LBPH model, add training data, and save it. Loading the model and doing a .train overwrites rather than updates. :(
Hey. I do not have static photos, I want to train the model dynamically. So I need a method update.
In the original opencv_contrib, this method is present:
https://github.com/kyamagu/mexopencv/blob/master/opencv_contrib/%2Bcv/LBPHFaceRecognizer.m#L306
TypeError: lbph.update is not a function
The text was updated successfully, but these errors were encountered: