This topic provides answers to some commonly asked questions about image management in Intelligent Media Management (IMM).
Does IMM limit the number of images in a dataset?
Yes, the number of images in a dataset cannot exceed the maximum number of files that the dataset can contain. For more information, see Quotas.
How do I determine the granularity of datasets?
We recommend that you determine the granularity of datasets based on your business requirements. Also, keep in mind the fact that search queries and face clustering are not supported across datasets. For example, in a cloud album application, create a separate dataset for each end user.
Why does face clustering fail to group face images?
The failure occurs because the requirements to create face image groups are not met. For accuracy of face grouping, the following requirements must be met to create face image groups:
The IndexFileMeta operation is used to add face images to a dataset.
At least three face images of the same person that meet the following requirements are contained in the dataset:
The face portion of an image is greater than 75 × 75 pixels.
The absolute values of the three elements in the HeadPose parameter are all less than 30.
The value of the FaceQuality parameter is greater than 0.8.
After a face image group is created, face images that do not meet the preceding requirements may also be added to the group.
How do I query the images in a face image group?
To query the images in a face image group, call the SimpleQuery operation and specify the ID of the face image group for the Query
parameter.
To query the ID of a face image group, call the QueryFigureClusters operation and obtain the value of ObjectId from the FigureClusters
parameter in the response.
{
"Field ": "Figures.FigureClusterId ",
"Operation ": "eq ",
"Value ": "Face image group ID"
}
Why does a created face image group fail to be found?
Metadata indexing uses an asynchronous processing mechanism. Image indexing, face grouping, and face image query requires some time to complete. When you design the logic of your business application, consider delay-related data consistency issues.
Image indexing: The IndexFileMeta operation takes approximately 10 seconds to index images.
Face grouping: The CreateFigureClusteringTask operation takes up to 180 seconds to group face images. The actual time varies based on the number of images indexed at a time and is several seconds in most scenarios.
ImportantThe CreateFigureClusteringTask operation depends on the IndexFileMeta operation to achieve face detection. If you use Message Service (MNS) to subscribe to the response to an IndexFileMeta request, wait for at least 10 seconds before you call the IndexFileMeta operation. This way, the CreateFigureClusteringTask operation can have sufficient time to obtain the latest face information.
After the asynchronous IndexFileMeta operation and CreateFigureClusteringTask operation are completed, wait for 10 seconds before you call the SimpleQuery operation to obtain the latest results.
Do I need to call the CreateFigureClusteringTask operation every time I index an image?
No, you do not need to call the CreateFigureClusteringTask operation every time an image is indexed. After you index multiple face images, you can call the CreateFigureClusteringTask operation to perform batch clustering of the indexed face images. The following solutions are recommended:
Solution 1: Call the CreateFigureClusteringTask operation on each dataset at regular intervals, such as every 5 minutes.
Solution 2: Each time you call the IndexFileMeta operation, add the corresponding dataset to a delayed queue. Regularly obtain the value of
DatasetName
from the queue to query datasets that contain incremental images. Call the CreateFigureClusteringTask operation 10 seconds after your last call of the IndexFileMeta operation. This solution is recommended.
What happens if an image in a face clustering task contains faces of different persons?
If an image contains faces of different persons, each face may be added to a group. This is because face clustering is performed at the face level.
Why does the SimpleQuery operation return faces that do not belong to the specified face group?
SimpleQuery returns results at the image level. All faces and labels in an image are returned. To query face information about a face image group or a person, such as the face position, expression, and age, traverse the Figures
field in all results and retrieve results in which the value of FigureClusterId
is the same as that specified for FigureClusterId
in your request.