age-gender-recognition

1.0.2 • Public • Published

Face Age & Gender Detection

This a Node.js package that utilizes the FacialAge API to determine the gender and approximate age of a person's face from an image.

Installation

You can install the package via npm:

npm install age-gender-recognition

Usage

To use this package, follow these steps:

  1. Import the package into your Node.js application:
const genderage = require('age-gender-recognition');
  1. Call the genderage function with the ImageStream you want to analyze:
const imagestream = fs.createReadStream('your-image.jpg');
genderage(imagestream)
  .then(result => {
    console.log('Gender:', result.gender);
    console.log('Age:', result.age);
  })
  .catch(error => {
    console.error('Error:', error.message);
  });

Replace 'your-image.jpg' with the image you want to analyze.

  1. The function will return an object containing the detected gender and age of the face in the image.

License

This project is licensed under the MIT License - see the LICENSE file for details.

/age-gender-recognition/

    Package Sidebar

    Install

    npm i age-gender-recognition

    Weekly Downloads

    5

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    3.88 kB

    Total Files

    3

    Last publish

    Collaborators

    • zeuscript