[Documentation] [TitleIndex] [WordIndex

Youtu Face Recognition

Youtu Face Recognition is a function of Xbot_Head.Before Using this Function,user should register into Youtu face recognition server by taking a head portrait photo by Xbot_Head.Then Xbot_Head can recognize who him/her is by sending request to Youtu server.

Face Registry

The request url is:

   http://IP:8000/management/register

Registry is completed by sending POST request of HTTP protocol .

Registry Mode

There are two modes of registry request .First mode is compulsive registry mode, which means user's head portrait will substitute the old head portrait in Youtu server.Second mode is normal registry mode.

For instance,if you use normal registry mode,then the url should be like this:

    http://IP:8000/management/register?method=normal

At this mode ,It shows that registry success as long as Xbot_Head received a response code of 0 from Youtu server. Otherwise,if you use compulsive registry mode,then the url should be like this:

   http://IP:8000/management/register?method=force

At this mode ,if the user's name has been registered before ,the server would return a response code of 9,as is to say,registry was failed. When the registry succeeded,Youtu server would return 0.

Request Parameters

Request parameters of POST is JSON, as follows:

   Userid  :   String
   Image   :   String

Userid is the user's name which be encoded into form of hexadecimal string.

Image is the user's head portrait that be encoded into base64 string.

Response Parameters

Response parameters of POST is JSON,as follows:

   Image  :  String
   Ret    :  int

Image is the user's head portrait that be encoded into base64 string.This Image contains some other information,such as face location and eyes' location. User could choose whether to register again.

Ret is result code,if this code is 0 ,means that registered successfully.

Face Recognition

Face recognition is achieved by sending POST request to Youtu server. The request url is :

   http://IP:8000/recognition

Request Parameters

Request parameters of POST is JSON, as follows:

   Image   :   String

Image is the user's head portrait that be encoded into base64 string.

Response Parameters

Response parameters of POST is JSON,as follows:

   Confidence :  float
   Id         :  String
   Ret        :  int

Confidence represents the extent that a image would be a person's face.The larger the number, the more probability be recognized a face.

Id is the user's unique identifier.

Ret is response code ,0 represents a good response.


2024-11-09 17:44