QueryFigureClusters

Updated at: 2025-02-06 06:03

Queries face groups based on given conditions.

Operation description

  • Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****
  • Before you call this operation, make sure that a face clustering task is created to group all faces in a dataset. For information about how to create a face clustering task, see CreateFigureClusteringTask . For information about how to create a dataset, see CreateDataset .

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
imm:QueryFigureClusterslist
*Dataset
acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/dataset/{#DatasetName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the project. You can obtain the name of the project from the response of the CreateProject operation.

test-project
DatasetNamestringYes

The name of the dataset. You can obtain the name of the dataset from the response of the CreateDataset operation.

test-dataset
SortstringNo

The sort field. If you leave this parameter empty, the group ID is used as the sort field.

Valid values:

  • ImageCount: the number of images.
  • VideoCount: the number of videos.
  • ProjectName: the name of the project.
  • DatasetName: the name of the dataset.
  • CreateTime: the point in time when the group is created.
  • UpdateTime: the most recent point in time when the group is updated.
  • Gender: the gender.
  • FaceCount: the number of faces.
  • GroupName: the name of the group.
ImageCount
OrderstringNo

The sort order. Default value: asc.

Valid values:

  • asc: ascending order.
  • desc: descending order.
asc
CustomLabelsstringNo

The custom labels, which can be used as query conditions.

key=value
MaxResultslongNo

The maximum number of entries to return. Valid values: 0 to 100. Default value: 100.

100
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

10
CreateTimeRangeTimeRangeNo

The time range within which the face group was created.

UpdateTimeRangeTimeRangeNo

The time range within which the face group was last updated.

WithTotalCountbooleanNo

Specifies whether to return the total number of face groups that match the current query conditions. Default value: false.

false

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

CA995EFD-083D-4F40-BE8A-BDF75FFF****
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results.

10
FigureClustersarray

The face groups.

FigureClustersFigureCluster

The face group details.

TotalCountlong

The total number of face groups that matches the current query conditions.

100

Examples

Sample success responses

JSONformat

{
  "RequestId": "CA995EFD-083D-4F40-BE8A-BDF75FFF****",
  "NextToken": "10",
  "FigureClusters": [
    {
      "OwnerId": "",
      "ProjectName": "",
      "DatasetName": "",
      "ObjectType": "",
      "ObjectId": "",
      "UpdateTime": "",
      "CreateTime": "",
      "Name": "",
      "Gender": "",
      "FaceCount": 0,
      "ImageCount": 0,
      "VideoCount": 0,
      "AverageAge": 0,
      "MinAge": 0,
      "MaxAge": 0,
      "Cover": {
        "OwnerId": "",
        "ProjectName": "",
        "DatasetName": "",
        "ObjectType": "",
        "ObjectId": "",
        "UpdateTime": "",
        "CreateTime": "",
        "URI": "",
        "OSSURI": "",
        "Filename": "",
        "MediaType": "",
        "ContentType": "",
        "Size": 0,
        "FileHash": "",
        "FileModifiedTime": "",
        "FileCreateTime": "",
        "FileAccessTime": "",
        "ProduceTime": "",
        "LatLong": "",
        "Timezone": "",
        "Addresses": [
          {
            "Language": "",
            "AddressLine": "",
            "Country": "",
            "Province": "",
            "City": "",
            "District": "",
            "Township": ""
          }
        ],
        "TravelClusterId": "",
        "Orientation": 0,
        "Figures": [
          {
            "FigureId": "",
            "FigureConfidence": 0,
            "FigureClusterId": "",
            "FigureClusterConfidence": 0,
            "FigureType": "",
            "Age": 0,
            "AgeSD": 0,
            "Gender": "",
            "GenderConfidence": 0,
            "Emotion": "",
            "EmotionConfidence": 0,
            "FaceQuality": 0,
            "Boundary": {
              "Width": 0,
              "Height": 0,
              "Left": 0,
              "Top": 0,
              "Polygon": [
                {
                  "X": 0,
                  "Y": 0
                }
              ]
            },
            "Mouth": "",
            "MouthConfidence": 0,
            "Beard": "",
            "BeardConfidence": 0,
            "Hat": "",
            "HatConfidence": 0,
            "Mask": "",
            "MaskConfidence": 0,
            "Glasses": "",
            "GlassesConfidence": 0,
            "Sharpness": 0,
            "Attractive": 0,
            "HeadPose": {
              "Pitch": 0,
              "Roll": 0,
              "Yaw": 0
            }
          }
        ],
        "FigureCount": 0,
        "Labels": [
          {
            "Language": "",
            "LabelName": "",
            "LabelLevel": 0,
            "LabelConfidence": 0,
            "ParentLabelName": "",
            "CentricScore": 0
          }
        ],
        "Title": "",
        "ImageWidth": 0,
        "ImageHeight": 0,
        "EXIF": "",
        "ImageScore": {
          "OverallQualityScore": 0
        },
        "CroppingSuggestions": [
          {
            "AspectRatio": "",
            "Confidence": 0,
            "Boundary": {
              "Width": 0,
              "Height": 0,
              "Left": 0,
              "Top": 0,
              "Polygon": [
                {
                  "X": 0,
                  "Y": 0
                }
              ]
            }
          }
        ],
        "OCRContents": [
          {
            "Language": "",
            "Contents": "",
            "Confidence": 0,
            "Boundary": {
              "Width": 0,
              "Height": 0,
              "Left": 0,
              "Top": 0,
              "Polygon": [
                {
                  "X": 0,
                  "Y": 0
                }
              ]
            }
          }
        ],
        "VideoWidth": 0,
        "VideoHeight": 0,
        "VideoStreams": [
          {
            "Index": 0,
            "Language": "",
            "CodecName": "",
            "CodecLongName": "",
            "Profile": "",
            "CodecTimeBase": "",
            "CodecTagString": "",
            "CodecTag": "",
            "Width": 0,
            "Height": 0,
            "HasBFrames": 0,
            "SampleAspectRatio": "",
            "DisplayAspectRatio": "",
            "PixelFormat": "",
            "Level": 0,
            "FrameRate": "",
            "AverageFrameRate": "",
            "TimeBase": "",
            "StartTime": 0,
            "Duration": 0,
            "Bitrate": 0,
            "FrameCount": 0,
            "Rotate": "",
            "BitDepth": 0,
            "ColorSpace": "",
            "ColorRange": "",
            "ColorTransfer": "",
            "ColorPrimaries": ""
          }
        ],
        "Subtitles": [
          {
            "Index": 0,
            "Language": "",
            "CodecName": "",
            "CodecLongName": "",
            "CodecTagString": "",
            "CodecTag": "",
            "StartTime": 0,
            "Duration": 0,
            "Bitrate": 0,
            "Content": "",
            "Width": 0,
            "Height": 0
          }
        ],
        "AudioStreams": [
          {
            "Index": 0,
            "Language": "",
            "CodecName": "",
            "CodecLongName": "",
            "CodecTimeBase": "",
            "CodecTagString": "",
            "CodecTag": "",
            "TimeBase": "",
            "StartTime": 0,
            "Duration": 0,
            "Bitrate": 0,
            "FrameCount": 0,
            "Lyric": "",
            "SampleFormat": "",
            "SampleRate": 0,
            "Channels": 0,
            "ChannelLayout": ""
          }
        ],
        "Artist": "",
        "AlbumArtist": "",
        "AudioCovers": [
          {
            "ImageWidth": 0,
            "ImageHeight": 0,
            "EXIF": "",
            "ImageScore": {
              "OverallQualityScore": 0
            },
            "CroppingSuggestions": [
              {
                "AspectRatio": "",
                "Confidence": 0
              }
            ],
            "OCRContents": [
              {
                "Language": "",
                "Contents": "",
                "Confidence": 0
              }
            ]
          }
        ],
        "Composer": "",
        "Performer": "",
        "Language": "",
        "Album": "",
        "PageCount": 0,
        "ETag": "",
        "CacheControl": "",
        "ContentDisposition": "",
        "ContentEncoding": "",
        "ContentLanguage": "",
        "AccessControlAllowOrigin": "",
        "AccessControlRequestMethod": "",
        "ServerSideEncryptionCustomerAlgorithm": "",
        "ServerSideEncryption": "",
        "ServerSideDataEncryption": "",
        "ServerSideEncryptionKeyId": "",
        "OSSStorageClass": "",
        "OSSCRC64": "",
        "ObjectACL": "",
        "ContentMd5": "",
        "OSSUserMeta": {
          "test": "test",
          "test2": 1
        },
        "OSSTaggingCount": 0,
        "OSSTagging": {
          "test": "test",
          "test2": 1
        },
        "OSSExpiration": "",
        "OSSVersionId": "",
        "OSSDeleteMarker": "",
        "OSSObjectType": "",
        "CustomId": "",
        "CustomLabels": {
          "test": "test",
          "test2": 1
        },
        "StreamCount": 0,
        "ProgramCount": 0,
        "FormatName": "",
        "FormatLongName": "",
        "StartTime": 0,
        "Bitrate": 0,
        "Duration": 0,
        "SemanticSimilarity": 0,
        "SemanticTypes": [
          ""
        ],
        "Elements": [
          {
            "ElementContents": [
              {
                "Type": "",
                "Content": "",
                "URL": "",
                "TimeRange": [
                  0
                ]
              }
            ],
            "ObjectId": "",
            "ElementType": "",
            "SemanticSimilarity": 0,
            "ElementRelations": [
              {
                "Type": "",
                "ObjectId": ""
              }
            ]
          }
        ],
        "SceneElements": [
          {
            "TimeRange": [
              0
            ],
            "FrameTimes": [
              0
            ]
          }
        ],
        "OCRTexts": "",
        "FileStatus": "",
        "Reason": "",
        "SmartClusters": [
          {
            "SmartClusterId": "",
            "Similarity": 0
          }
        ],
        "ObjectStatus": "",
        "SequenceNumber": 0,
        "ClusterStatus": {
          "key": {
            "key": [
              ""
            ]
          }
        },
        "ClusterModifications": {
          "key": {
            "key": [
              ""
            ]
          }
        }
      },
      "BaseImages": [
        {
          "OwnerId": "",
          "ProjectName": "",
          "DatasetName": "",
          "ObjectType": "",
          "ObjectId": "",
          "UpdateTime": "",
          "CreateTime": "",
          "URI": "",
          "OSSURI": "",
          "Filename": "",
          "MediaType": "",
          "ContentType": "",
          "Size": 0,
          "FileHash": "",
          "FileModifiedTime": "",
          "FileCreateTime": "",
          "FileAccessTime": "",
          "ProduceTime": "",
          "LatLong": "",
          "Timezone": "",
          "Addresses": [
            {
              "Language": "",
              "AddressLine": "",
              "Country": "",
              "Province": "",
              "City": "",
              "District": "",
              "Township": ""
            }
          ],
          "TravelClusterId": "",
          "Orientation": 0,
          "Figures": [
            {
              "FigureId": "",
              "FigureConfidence": 0,
              "FigureClusterId": "",
              "FigureClusterConfidence": 0,
              "FigureType": "",
              "Age": 0,
              "AgeSD": 0,
              "Gender": "",
              "GenderConfidence": 0,
              "Emotion": "",
              "EmotionConfidence": 0,
              "FaceQuality": 0,
              "Mouth": "",
              "MouthConfidence": 0,
              "Beard": "",
              "BeardConfidence": 0,
              "Hat": "",
              "HatConfidence": 0,
              "Mask": "",
              "MaskConfidence": 0,
              "Glasses": "",
              "GlassesConfidence": 0,
              "Sharpness": 0,
              "Attractive": 0,
              "HeadPose": {
                "Pitch": 0,
                "Roll": 0,
                "Yaw": 0
              }
            }
          ],
          "FigureCount": 0,
          "Labels": [
            {
              "Language": "",
              "LabelName": "",
              "LabelLevel": 0,
              "LabelConfidence": 0,
              "ParentLabelName": "",
              "CentricScore": 0
            }
          ],
          "Title": "",
          "ImageWidth": 0,
          "ImageHeight": 0,
          "EXIF": "",
          "ImageScore": {
            "OverallQualityScore": 0
          },
          "CroppingSuggestions": [
            {
              "AspectRatio": "",
              "Confidence": 0
            }
          ],
          "OCRContents": [
            {
              "Language": "",
              "Contents": "",
              "Confidence": 0
            }
          ],
          "VideoWidth": 0,
          "VideoHeight": 0,
          "VideoStreams": [
            {
              "Index": 0,
              "Language": "",
              "CodecName": "",
              "CodecLongName": "",
              "Profile": "",
              "CodecTimeBase": "",
              "CodecTagString": "",
              "CodecTag": "",
              "Width": 0,
              "Height": 0,
              "HasBFrames": 0,
              "SampleAspectRatio": "",
              "DisplayAspectRatio": "",
              "PixelFormat": "",
              "Level": 0,
              "FrameRate": "",
              "AverageFrameRate": "",
              "TimeBase": "",
              "StartTime": 0,
              "Duration": 0,
              "Bitrate": 0,
              "FrameCount": 0,
              "Rotate": "",
              "BitDepth": 0,
              "ColorSpace": "",
              "ColorRange": "",
              "ColorTransfer": "",
              "ColorPrimaries": ""
            }
          ],
          "Subtitles": [
            {
              "Index": 0,
              "Language": "",
              "CodecName": "",
              "CodecLongName": "",
              "CodecTagString": "",
              "CodecTag": "",
              "StartTime": 0,
              "Duration": 0,
              "Bitrate": 0,
              "Content": "",
              "Width": 0,
              "Height": 0
            }
          ],
          "AudioStreams": [
            {
              "Index": 0,
              "Language": "",
              "CodecName": "",
              "CodecLongName": "",
              "CodecTimeBase": "",
              "CodecTagString": "",
              "CodecTag": "",
              "TimeBase": "",
              "StartTime": 0,
              "Duration": 0,
              "Bitrate": 0,
              "FrameCount": 0,
              "Lyric": "",
              "SampleFormat": "",
              "SampleRate": 0,
              "Channels": 0,
              "ChannelLayout": ""
            }
          ],
          "Artist": "",
          "AlbumArtist": "",
          "AudioCovers": [
            {
              "ImageWidth": 0,
              "ImageHeight": 0,
              "EXIF": "",
              "CroppingSuggestions": [],
              "OCRContents": []
            }
          ],
          "Composer": "",
          "Performer": "",
          "Language": "",
          "Album": "",
          "PageCount": 0,
          "ETag": "",
          "CacheControl": "",
          "ContentDisposition": "",
          "ContentEncoding": "",
          "ContentLanguage": "",
          "AccessControlAllowOrigin": "",
          "AccessControlRequestMethod": "",
          "ServerSideEncryptionCustomerAlgorithm": "",
          "ServerSideEncryption": "",
          "ServerSideDataEncryption": "",
          "ServerSideEncryptionKeyId": "",
          "OSSStorageClass": "",
          "OSSCRC64": "",
          "ObjectACL": "",
          "ContentMd5": "",
          "OSSUserMeta": {
            "test": "test",
            "test2": 1
          },
          "OSSTaggingCount": 0,
          "OSSTagging": {
            "test": "test",
            "test2": 1
          },
          "OSSExpiration": "",
          "OSSVersionId": "",
          "OSSDeleteMarker": "",
          "OSSObjectType": "",
          "CustomId": "",
          "CustomLabels": {
            "test": "test",
            "test2": 1
          },
          "StreamCount": 0,
          "ProgramCount": 0,
          "FormatName": "",
          "FormatLongName": "",
          "StartTime": 0,
          "Bitrate": 0,
          "Duration": 0,
          "SemanticSimilarity": 0,
          "SemanticTypes": [
            ""
          ],
          "Elements": [
            {
              "ElementContents": [
                {
                  "Type": "",
                  "Content": "",
                  "URL": "",
                  "TimeRange": [
                    0
                  ]
                }
              ],
              "ObjectId": "",
              "ElementType": "",
              "SemanticSimilarity": 0,
              "ElementRelations": [
                {
                  "Type": "",
                  "ObjectId": ""
                }
              ]
            }
          ],
          "SceneElements": [
            {
              "TimeRange": [
                0
              ],
              "FrameTimes": [
                0
              ]
            }
          ],
          "OCRTexts": "",
          "FileStatus": "",
          "Reason": "",
          "SmartClusters": [
            {
              "SmartClusterId": "",
              "Similarity": 0
            }
          ],
          "ObjectStatus": "",
          "SequenceNumber": 0,
          "ClusterStatus": {
            "key": {
              "key": [
                ""
              ]
            }
          },
          "ClusterModifications": {
            "key": {
              "key": [
                ""
              ]
            }
          }
        }
      ],
      "CustomId": "",
      "CustomLabels": {
        "test": "test",
        "test2": 1
      },
      "MetaLockVersion": 0
    }
  ],
  "TotalCount": 100
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
Change timeSummary of changesOperation
2023-04-27The request parameters of the API has changed. The response structure of the API has changedView Change Details
  • On this page (1)
  • Operation description
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
  • Change history
Feedback