close
The Wayback Machine - https://web.archive.org/web/20220709112856/https://github.com/justadudewhohacks/face-api.js/issues/227
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

Q: How to serialize/unserialize FullFaceDescriptions? #227

Open
salamanders opened this issue Feb 27, 2019 · 1 comment
Open

Q: How to serialize/unserialize FullFaceDescriptions? #227

salamanders opened this issue Feb 27, 2019 · 1 comment
Labels
enhancement good first issue help wanted

Comments

@salamanders
Copy link

@salamanders salamanders commented Feb 27, 2019

Detecting faces is great, but can be slow. I'd like to save the detections to an IndexDB and do some math on them when all are completed.

Is there a standard/easy way to do this? I've got a Dexie hacky way with

db.addFace = async function(imageName, tileLocation, ffd) {
  return await db.faces.add({
    'image_name':imageName,
    'tile_x':tileLocation.x,
    'tile_y':tileLocation.y,
    'x':ffd.detection.box.x,
    'y':ffd.detection.box.y,
    'w':ffd.detection.box.width,
    'h':ffd.detection.box.height,
    'score':ffd.detection.score,
    'descriptor':ffd.descriptor,
    'landmarks': ffd.landmarks,
    'expressions': ffd.expressions
  });
};

that I'm sure is a bad idea.

@justadudewhohacks
Copy link
Owner

@justadudewhohacks justadudewhohacks commented Mar 1, 2019

It's not necessarely a bad idea, if you deserialize them correctly. Currently there is no easy way to do it, but I am happy to take PRs for implementing toJSON, fromJSON methods for all the helper classes.

@justadudewhohacks justadudewhohacks added enhancement help wanted good first issue labels Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue help wanted
Projects
None yet
Development

No branches or pull requests

2 participants