Adds training images to a face.
Type: synchronous
| Parameter | Description | Required |
|---|---|---|
database
|
The name of the database that contains the face. | Yes |
identifier
|
The identifier of the face that you want to add training images to. | Yes |
imagedata
|
The training images to add. Files must be uploaded as multipart/form-data. For more information about sending data to HPE Media Server, refer to the HPE Media Server Administration Guide. | Set this or imagepath |
imagelabels
|
A comma-separated list of labels to identify the images that you are adding (maximum 254 bytes for each label). Every image added to the same face must have a unique label, so the number of labels must match the number of images provided using either imagedata or imagepath. If you do not set this parameter, HPE Media Server generates labels automatically. |
No |
imagepath
|
A comma-separated list of paths to the training images to add. The paths must be absolute, or relative to the HPE Media Server executable file. | Set this or imagedata |
The following example adds training images to a face by specifying the paths of the images using the imagepath parameter:
/action=AddFaceImages&database=politicians
&identifier=6600dc0f9dd72d0cb55589e8f1d28b62
&imagepath=face1.jpg,face2.jpg
&imagelabels=expression_smiling,expression_neutral
Alternatively, you can add training images by sending the image data, for example:
curl http://localhost:14000 -F action=AddFaceImages
-F database=politicians
-F identifier=6600dc0f9dd72d0cb55589e8f1d28b62
-F imagedata=@face1.jpg,face2.jpg
-F imagelabels=expression_smiling,expression_neutral
The response returns the labels assigned to the training images:
<autnresponse>
<action>ADDFACEIMAGES</action>
<response>SUCCESS</response>
<responsedata>
<images>
<image>
<index>1</index>
<label>expression_smiling</label>
</image>
<image>
<index>2</index>
<label>expression_neutral</label>
</image>
</images>
</responsedata>
</autnresponse>
After adding training images for a face, you can train HPE Media Server to recognize the face by running the action BuildFace.
|
|