nfd

node-face-detector

This is node module based on the use of face-recognition.js, written to cut faces from the images

Showing:

Popularity

Downloads/wk

4

GitHub Stars

6

Maintenance

Last Commit

3yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

1.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Node Face Detector

install size FlowType compatible

Requirements

How to use

yarn add node-face-detector

Or

git clone https://github.com/YozhikM/node-face-detector.git

Then run two tasks, because the two Big Brothers (Nodemon and Babel) are watching you in two different folders

yarn build

yarn start

API

getCroppedFace function accepts a url as a string and an optional scale.

function getCroppedFace(src: string, scale?: number = 1): Promise<{ buffer: Buffer, format: string }>

The src address can be either local or external - URL. You can not use the image format returned in promise, but I am not responsible for the consequences.

Example

getCroppedFace(
  'https://almaty.hh.kz/photo/492004920.jpeg?t=1520531261&h=Yerj2GWZtRPEUR6cQFGSjw'
).then(({ buffer, format }) =>
  fs.writeFile(`./images/face_out.${format}`, buffer, () => console.log('file writted'))
);

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100