justadudewhohacks/face-api.js

Saving and Loading Descriptors for future use

Open

#231 aperta il 1 mar 2019

Vedi su GitHub
 (11 commenti) (0 reazioni) (0 assegnatari)TypeScript (3649 fork)batch import
enhancementgood first issuehelp wanted

Metriche repository

Star
 (15.839 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

With ref https://github.com/justadudewhohacks/face-api.js#face-recognition-by-matching-descriptors

I've managed to train the faces and and saving the dataset with JSON.stringify(labelledDescriptors) to a static JSON.

Is there a way to quickly load this dataset, or do I have to load the raw JSON and reinit the dataset with each new faceapi.LabeledFaceDescriptors(name, descriptors)?

Is there method such as

const labelledDescriptors = await faceapi.fetchDescriptors('/files/labeledDescriptors.json');
const faceMatcher = new faceapi.FaceMatcher(labelledDescriptors);

Pardon, if I didn't explain myself well. But the objective is to quickly loaded a saved labeledDescriptors for usage.

Guida contributor