Packge for integrate Masape Animetrics Face Recognition
npm install mashape-animetrics-face-apiPackge for integrate Masape Animetrics Face Recognition
##### Download
Download the latest release
##### Clone the repo
``bash`
$ git clone https://github.com/mdasmendel/mashape-animetrics-face-api.git
##### Install with npm
`bash`
$ npm install mashape-animetrics-face-api
`js
// 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)
...
`
Follow this link for access docs
mashape-animetrics-face-api module
#### gallery
Get one gallery by id
Parameters
- id String The gallery id
Returns Gallery Instance of EnrollClient class
#### galleries
Get all client galleries
Returns Array<Gallery> Instance of EnrollClient class
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 idsubjectId
- String Subject idindex
- Integer?= e Face index
Returns Enroll
#### recognize
Recognize image from detect
Parameters
- galleryId String Gallery idindex
- Integer Face index
Returns Recognize
mashape-animetrics-face-api module
#### fromUrl
Get detector from url
Parameters
- url String Image urlselector
- String Selectors for find filter, default: FULL, ex: 'FACE, EYES, FULL'
Returns Detect Instance of detect class
mashape-animetrics-face-api module
mashape-animetrics-face-api module
#### \_enroll
Enroll in the group
Parameters
- galleryId String Gallery id to enrollsubjectId
- String Subject id
Returns Enroll
mashape-animetrics-face-api module
#### getSubjects
Get subjects from gallery
Returns Array
#### enroll
Enroll in this gallery
Parameters
- image Object Image dataface
- Object Face datasubjectId
- String Face index
Returns Enroll
#### recognize
Recognize face in this group
Parameters
- image Object Image object - mast contain image_idface
- Object FAce object - mast contain face data
Returns Recognize
mashape-animetrics-face-api module
#### get
Get one subjects from gallery
Parameters
- id String Gallery id
Returns Gallery
#### list
Get list subjects from gallery
mashape-animetrics-face-api module
#### get
Get candidates list
#### get
Get top candidates
Returns Object
mashape-animetrics-face-api module
#### execute
Recognize face
Parameters
- galleryId String Gallery Idimage
- Object Image object - mast contain image_idface` Object FAce object - mast contain face data
-
Returns Recognize
Copyright Dascal Mihai, 2017.
Licensed under the MIT License