ListFaces

Returns a list of faces in a specified database. The action can also return information about the images and metadata associated with each face.

Type: synchronous

Parameter Description Required
database The name of the database that contains the faces. Yes
identifier A comma-separated list of identifiers to specify the faces to list. If you do not set this parameter, HPE Media Server lists all of the faces in the specified database. No
imagestatus A Boolean value (default false) that specifies whether to return the label and training status of each image associated with each face. No
maxresults The maximum number of faces to return. No
metadata A Boolean value (default false) that specifies whether to return the metadata associated with each face. No
start The starting point for the list when you set the maxresults parameter. For example, to start listing faces from the tenth face in the database, set start=10. The entries in the database are indexed from 1. No

Example

The following example lists up to 10 faces contained in the politicians database. The response includes the label and training status of each training image, and any metadata associated with each face:

/action=ListFaces&database=politicians
                 &imagestatus=TRUE
                 &metadata=TRUE
                 &start=1
                 &maxresults=10

Response

The response always includes the following information for each face:

If you set the action parameter imagestatus to true, HPE Media Server returns the status of each training image associated with each face.

<autnresponse>
  <action>LISTFACES</action>
  <response>SUCCESS</response>
  <responsedata>
    <entry>
      <identifier>JohnSmith</identifier>
      <numimages>3</numimages>
      <numtrained>2</numtrained>
      <numfailed>0</numfailed>
      <numuntrained>1</numuntrained>
      <images>
        <image>
          <label>image1</label>
          <status>trained</status>
          <hasimagedata>true</hasimagedata>
        </image>
        <image>
          <label>image2</label>
          <status>trained</status>
          <hasimagedata>true</hasimagedata>
        </image>
        <image>
          <label>image2</label>
          <status>untrained</status>
          <hasimagedata>true</hasimagedata>
        </image>
      </images>
      <metadata>
        <item>
          <key>firstname</key>
          <value>John</value>
        </item>
        <item>
          <key>lastname</key>
          <value>Smith</value>
        </item>
      </metadata>
    </entry>
  </responsedata>
</autnresponse>

_HP_HTML5_bannerTitle.htm