Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unique-faces

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unique-faces

`unique-faces` is a node module that assists in detecting unknown sets of faces across multiple photos.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Unique Faces

unique-faces is a node module that assists in detecting unknown sets of faces across multiple photos.

API

Create an instance

import UniqueFaces from "unique-faces";

// all state is stored inside a unique faces instance
const uniqueFaces = new UniqueFaces();

init

Init function will load in all the required tensorflow libraries and also prepare the GPU for processing

/**
 * Note: This returns a promise, you can either
 * initialize it manually (prewarm it) or you can skip
 * this step and it will be called on before the first image
 * is processed
 */
await uniqueFaces.init();

findAllUniqueFaces

Method which takes an image path and finds all the unique faces inside the photo. If this is a sequential call of this function, it could match on an existing photo.

const images [
    "./IMG_101.jpg",
    "./IMG_200.jpg"
];

for (let imgPath of images) {
    await faceDetection.findAllUniqueFaces(imgPath);
}

export

Take the training data generated and export it to JSON

await faceDetection.export();

TODO

  • Auto initialization
  • Ensure no tf logic ran till init called
  • Option for thumbnailPath
  • Option for outputPath

FAQs

Package last updated on 22 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc