npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mashape-animetrics-face-api

v0.0.3

Published

Packge for integrate Masape Animetrics Face Recognition

Downloads

19

Readme

mashape-animetrics-face-api

Packge for integrate Masape Animetrics Face Recognition

Installation

Download

Download the latest release

Clone the repo
$ git clone https://github.com/mdasmendel/mashape-animetrics-face-api.git 
Install with npm
$ npm install mashape-animetrics-face-api

Usage

// Basic usage
const mashapeAnimetricsApi = require('mashape-animetrics-face-api');

let client = mashapeAnimetricsApi.client({
    "animetricsKey": "xxxxxxxxxxxxxxxxx",
    "mashapeKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  });
  ...
 	co(function *(){
	    ...
        let detect = yield mashapeCilent.detect.fromUrl('photo url here');//detect image from url
          
        let enroll = yield detect.enroll('gallery id here', 'subject id here','face id (default 0)');//enroll image from current detect
         
        let gallery = yield mashapeCilent.gallery('gallery id').getSubjects();//get subjects id
         
        enroll = yield mashapeCilent.gallery('gallery id').enroll('image obj', 'face obj', 'subject id');//enroll image in current group
        ...
 	})
 	.catch(onError)
  ...

Documentation

Follow this link for access docs

Methods

Client

mashape-animetrics-face-api module

gallery

Get one gallery by id

Parameters

Returns Gallery Instance of EnrollClient class

galleries

Get all client galleries

Returns Array<Gallery> Instance of EnrollClient class

Detect

mashape-animetrics-face-api module

getImage

Get image data

Returns Object The image object

getFaces

Get faces list

Returns Array The list of faces

getFacesCount

Get faces count

Returns Integer The count of faces

hasFaces

Check if the image has faces found

Returns Boolean

getFace

Get face by index

Parameters

  • index **Integer?= ** Face index

Returns Object

enroll

Enrol one face from image

Parameters

  • galleryId String Gallery id
  • subjectId String Subject id
  • index Integer?= e Face index

Returns Enroll

recognize

Recognize image from detect

Parameters

  • galleryId String Gallery id
  • index Integer Face index

Returns Recognize

DetectClient

mashape-animetrics-face-api module

fromUrl

Get detector from url

Parameters

  • url String Image url
  • selector String Selectors for find filter, default: FULL, ex: 'FACE, EYES, FULL'

Returns Detect Instance of detect class

Enroll

mashape-animetrics-face-api module

EnrollClient

mashape-animetrics-face-api module

_enroll

Enroll in the group

Parameters

  • galleryId String Gallery id to enroll
  • subjectId String Subject id

Returns Enroll

Gallery

mashape-animetrics-face-api module

getSubjects

Get subjects from gallery

Returns Array

enroll

Enroll in this gallery

Parameters

Returns Enroll

recognize

Recognize face in this group

Parameters

  • image Object Image object - mast contain image_id
  • face Object FAce object - mast contain face data

Returns Recognize

GalleryClient

mashape-animetrics-face-api module

get

Get one subjects from gallery

Parameters

Returns Gallery

list

Get list subjects from gallery

Returns Array<Gallery>

Recognize

mashape-animetrics-face-api module

get

Get candidates list

Returns Array<Object>

get

Get top candidates

Returns Object

RecognizeClient

mashape-animetrics-face-api module

execute

Recognize face

Parameters

  • galleryId String Gallery Id
  • image Object Image object - mast contain image_id
  • face Object FAce object - mast contain face data

Returns Recognize

Copyright and license

Copyright Dascal Mihai, 2017.

Licensed under the MIT License