QueryFigureClusters

Updated at:

Queries figure clustering and its information based on a conditional query.

Operation description

  • Before calling this operation, make sure that you fully understand the billing methods and pricing of Intelligent Media Management.

  • Before calling this operation, make sure that you have grouped all faces in the dataset (CreateDataset) by creating a face clustering task (CreateFigureClusteringTask).

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

imm:QueryFigureClusters

list

*Dataset

acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/dataset/{#DatasetName}

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectName

string

Yes

The name of the project. For more information about how to obtain the project name, see Create a project.

test-project

DatasetName

string

Yes

The name of the dataset. For more information about how to obtain the dataset name, see Create a dataset.

test-dataset

Sort

string

No

The field by which to sort. By default, this parameter is empty, which indicates that the results are sorted by cluster ID.

Valid values:

  • ImageCount :

    The number of images.

  • VideoCount :

    The number of videos.

  • ProjectName :

    The project name.

  • DatasetName :

    The dataset name.

  • CreateTime :

    The time when the cluster was created.

  • UpdateTime :

    The time when the cluster was updated.

  • Gender :

    The gender.

  • FaceCount :

    The number of faces.

  • Name :

    The cluster name.

ImageCount

Order

string

No

The sort order. Default value: asc.

Valid values:

  • asc :

    Ascending order.

  • desc :

    Descending order.

asc

CustomLabels

string

No

The query conditions for custom labels.

key=value

MaxResults

integer

No

The maximum number of data records to return in this call. Valid values: 0 to 100. If this parameter is not specified or is set to 0, the default value 100 is used.

100

NextToken

string

No

The pagination token. If this parameter is left empty or set to None, the query starts from the beginning.

CAESEgoQCg4KCkltYWdlQ291bnQQARgBIr0ECgkABAAAAAAAAAAKrwQDKgIAADFTMzEzMDMyMzMzMjMxMzAzMDMyMzQzNjM3MzczOTMzMzQzYTY5NmQ2ZDJkNjk2ZDYxNjc2NTJkNzQ2NTczNzQyZDY4N2E2NDY1NzYyZDMyMzUzMjM0MzIzOTMzMzczMTJkMzY1NDZhNzk3MzU2Njk3MjM0M2E2OTZkNmQyZDc0NjU3Mzc0MmQ3MzY1NzQyZDYzMzYzNjY0MzY2NjYxMzQyZDM1MzMzODM3MmQzMTMxNjU2NjJkNjI2NTM5MzYyZDM5MzgzMDMzMzk2MjMwMzE2NDYzNjMzMjNhNjY2OTY3NzU3MjY1MmQ2MzZjNzU3Mzc0NjU3MjNhNDM2Yzc1NzM3NDY1NzIyZDYxNjUzOTY0MzQzMzMxNjEyZDM3MzQ2NTY2MmQzNDM5Mzc2MjJkMzg2MjMxMzUyZDM0MzUzOTM1MzYzNzYxMzQ2NDM2MzE2Ni5TMzEzMDMyMzMzMjMxMzAzMDMyMzQzNjM3MzczOTMzMzQzYTY5NmQ2ZDJkNjk2ZDYxNjc2NTJkNzQ2NTczNzQyZDY4N2E2NDY1NzYyZDMyMzUzMjM0MzIzOTMzMzczMTJkMzY1NDZhNzk3MzU2Njk3MjM0M2E2OTZkNmQyZDc0NjU3Mzc0MmQ3MzY1NzQyZDYzMzYzNjY0MzY2NjYxMzQyZDM1MzMzODM3MmQzMTMxNjU2NjJkNjI2NTM5MzYyZDM5MzgzMDMzMzk2MjMwMzE2NDYzNjM*****

CreateTimeRange TimeRange

No

The time range during which the face clusters were created.

UpdateTimeRange TimeRange

No

The time range during which the face clusters were updated.

WithTotalCount

boolean

No

Specifies whether to return the total number of face clusters that meet the current query conditions. Default value: false, which indicates that the total number of clusters is not returned.

false

Response elements

Element

Type

Description

Example

object

The response struct.

RequestId

string

The ID of the request.

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

NextToken

string

The pagination token.

CAESEgoQCg4KCkltYWdlQ291bnQQARgBIr0ECgkABAAAAAAAAAAKrwQDKgIAADFTMzEzMDMyMzMzMjMxMzAzMDMyMzQzNjM3MzczOTMzMzQzYTY5NmQ2ZDJkNjk2ZDYxNjc2NTJkNzQ2NTczNzQyZDY4N2E2NDY1NzYyZDMyMzUzMjM0MzIzOTMzMzczMTJkMzY1NDZhNzk3MzU2Njk3MjM0M2E2OTZkNmQyZDc0NjU3Mzc0MmQ3MzY1NzQyZDYzMzYzNjY0MzY2NjYxMzQyZDM1MzMzODM3MmQzMTMxNjU2NjJkNjI2NTM5MzYyZDM5MzgzMDMzMzk2MjMwMzE2NDYzNjMzMjNhNjY2OTY3NzU3MjY1MmQ2MzZjNzU3Mzc0NjU3MjNhNDM2Yzc1NzM3NDY1NzIyZDYxNjUzOTY0MzQzMzMxNjEyZDM3MzQ2NTY2MmQzNDM5Mzc2MjJkMzg2MjMxMzUyZDM0MzUzOTM1MzYzNzYxMzQ2NDM2MzE2Ni5TMzEzMDMyMzMzMjMxMzAzMDMyMzQzNjM3MzczOTMzMzQzYTY5NmQ2ZDJkNjk2ZDYxNjc2NTJkNzQ2NTczNzQyZDY4N2E2NDY1NzYyZDMyMzUzMjM0MzIzOTMzMzczMTJkMzY1NDZhNzk3MzU2Njk3MjM0M2E2OTZkNmQyZDc0NjU3Mzc0MmQ3MzY1NzQyZDYzMzYzNjY0MzY2NjYxMzQyZDM1MzMzODM3MmQzMTMxNjU2NjJkNjI2NTM5MzYyZDM5MzgzMDMzMzk2MjMwMzE2NDYzNjM*****

FigureClusters

array

The list of figure clusters.

FigureCluster

The detailed information about the figure cluster.

TotalCount

integer

The total number of face clusters that meet the current query conditions.

100

Examples

Success response

JSON format

{
  "RequestId": "CA995EFD-083D-4F40-BE8A-BDF75FFF****",
  "NextToken": "CAESEgoQCg4KCkltYWdlQ291bnQQARgBIr0ECgkABAAAAAAAAAAKrwQDKgIAADFTMzEzMDMyMzMzMjMxMzAzMDMyMzQzNjM3MzczOTMzMzQzYTY5NmQ2ZDJkNjk2ZDYxNjc2NTJkNzQ2NTczNzQyZDY4N2E2NDY1NzYyZDMyMzUzMjM0MzIzOTMzMzczMTJkMzY1NDZhNzk3MzU2Njk3MjM0M2E2OTZkNmQyZDc0NjU3Mzc0MmQ3MzY1NzQyZDYzMzYzNjY0MzY2NjYxMzQyZDM1MzMzODM3MmQzMTMxNjU2NjJkNjI2NTM5MzYyZDM5MzgzMDMzMzk2MjMwMzE2NDYzNjMzMjNhNjY2OTY3NzU3MjY1MmQ2MzZjNzU3Mzc0NjU3MjNhNDM2Yzc1NzM3NDY1NzIyZDYxNjUzOTY0MzQzMzMxNjEyZDM3MzQ2NTY2MmQzNDM5Mzc2MjJkMzg2MjMxMzUyZDM0MzUzOTM1MzYzNzYxMzQ2NDM2MzE2Ni5TMzEzMDMyMzMzMjMxMzAzMDMyMzQzNjM3MzczOTMzMzQzYTY5NmQ2ZDJkNjk2ZDYxNjc2NTJkNzQ2NTczNzQyZDY4N2E2NDY1NzYyZDMyMzUzMjM0MzIzOTMzMzczMTJkMzY1NDZhNzk3MzU2Njk3MjM0M2E2OTZkNmQyZDc0NjU3Mzc0MmQ3MzY1NzQyZDYzMzYzNjY0MzY2NjYxMzQyZDM1MzMzODM3MmQzMTMxNjU2NjJkNjI2NTM5MzYyZDM5MzgzMDMzMzk2MjMwMzE2NDYzNjM*****",
  "FigureClusters": [
    {
      "AverageAge": 26,
      "Cover": {
        "AccessControlAllowOrigin": "https://aliyundoc.com",
        "AccessControlRequestMethod": "PUT",
        "Addresses": [
          {
            "AddressLine": "",
            "City": "",
            "Country": "",
            "District": "",
            "Language": "zh-Hans",
            "Province": "",
            "Township": ""
          }
        ],
        "Album": "FirstAlbum",
        "AlbumArtist": "Jane",
        "Artist": "Jane",
        "AudioCovers": [
          {
            "CroppingSuggestions": [
              {
                "AspectRatio": "2:3",
                "Boundary": {
                  "Height": 300,
                  "Left": 10,
                  "Polygon": [
                    {
                      "X": 10,
                      "Y": 10
                    }
                  ],
                  "Top": 30,
                  "Width": 200
                },
                "Confidence": 0.742
              }
            ],
            "EXIF": "{\"FileSize\":{\"value\":\"29304\"},\"Format\":{\"value\":\"jpg\"}}",
            "ImageHeight": 820,
            "ImageScore": {
              "OverallQualityScore": 0.736
            },
            "ImageWidth": 500,
            "OCRContents": [
              {
                "Boundary": {
                  "Height": 300,
                  "Left": 10,
                  "Polygon": [
                    {
                      "X": 10,
                      "Y": 10
                    }
                  ],
                  "Top": 30,
                  "Width": 200
                },
                "Confidence": 0.8254936695098877,
                "Contents": "",
                "Language": "zh-hans"
              }
            ]
          }
        ],
        "AudioStreams": [
          {
            "Bitrate": 320087,
            "ChannelLayout": "stereo",
            "Channels": 2,
            "CodecLongName": "AAC (Advanced Audio Coding)",
            "CodecName": "aac",
            "CodecTag": "0x6134706d",
            "CodecTagString": "mp4a",
            "CodecTimeBase": "1/44100",
            "Duration": 3.690667,
            "FrameCount": 173,
            "Index": 1,
            "Language": "en",
            "Lyric": "test",
            "SampleFormat": "fltp",
            "SampleRate": 48000,
            "StartTime": 0.0235,
            "TimeBase": "1/48000"
          }
        ],
        "Bitrate": 13091201,
        "CacheControl": "no-cache",
        "Composer": "Jane",
        "ContentDisposition": "attachment; filename =test.jpg",
        "ContentEncoding": "UTF-8",
        "ContentLanguage": "zh-CN",
        "ContentMd5": "HZwoCnxPZ/fvhz4oRJ2+Fw==",
        "ContentType": "image/jpeg",
        "CreateTime": "2021-06-29T14:50:13.011643661+08:00",
        "CroppingSuggestions": [
          {
            "AspectRatio": "2:3",
            "Boundary": {
              "Height": 300,
              "Left": 10,
              "Polygon": [
                {
                  "X": 10,
                  "Y": 10
                }
              ],
              "Top": 30,
              "Width": 200
            },
            "Confidence": 0.742
          }
        ],
        "CustomId": "\t\nmember-image-id-0001",
        "CustomLabels": {
          "MemberName": "Tim",
          "Enabled": "True",
          "ItemCount": "10"
        },
        "DatasetName": "test-dataset",
        "Duration": 15.263,
        "ETag": "\"1D9C280A7C4F67F7EF873E28449****\"",
        "EXIF": "{\"Compression\":{\"value\":\"6\"},\"DateTime\":{\"value\":\"2020:08:19 17:11:11\"}}",
        "Elements": [
          {
            "ElementContents": [
              {
                "Content": "文本片段",
                "TimeRange": [
                  500
                ],
                "Type": "text",
                "URL": "http://aliyun.com"
              }
            ],
            "ElementRelations": [
              {
                "ObjectId": "id1",
                "Type": "child,parent"
              }
            ],
            "ElementType": "title - 标题; image - 图片 ; table - 表格 ; narrative-text - 正文",
            "ObjectId": "id1",
            "SemanticSimilarity": 0.8
          }
        ],
        "FigureCount": 10,
        "Figures": [
          {
            "Age": 29,
            "AgeSD": 5,
            "Attractive": 0.96,
            "Beard": "none",
            "BeardConfidence": 1,
            "Emotion": "happiness",
            "EmotionConfidence": 0.70784568786621,
            "FaceQuality": 0.960875928401947,
            "FigureClusterConfidence": 1,
            "FigureClusterId": "Cluster-dbe72fec-b84c-4ab6-885b-3678e64****",
            "FigureConfidence": 1,
            "FigureId": "868a9e74-cde5-4c7a-9013-28bb984****",
            "FigureType": "face",
            "Gender": "female",
            "GenderConfidence": 1,
            "Glasses": "none",
            "GlassesConfidence": 0.8,
            "Hat": "none",
            "HatConfidence": 1,
            "HeadPose": {
              "Pitch": 18.385589599609375,
              "Roll": 4.204030513763428,
              "Yaw": 2.4945924282073975
            },
            "Mask": "none",
            "MaskConfidence": 1,
            "Mouth": "close",
            "MouthConfidence": 1,
            "Sharpness": 0.7
          }
        ],
        "FileAccessTime": "2021-06-29T14:50:13.011643661+08:00",
        "FileCreateTime": "2021-06-29T14:50:13.011643661+08:00",
        "FileHash": "1d9c280a7c4f67f7ef873e28449dbe17",
        "FileModifiedTime": "2021-06-29T14:50:13.011643661+08:00",
        "Filename": "sampleobject.jpg",
        "FormatLongName": "QuickTime / MOV",
        "FormatName": "mov",
        "ImageHeight": 500,
        "ImageScore": {
          "OverallQualityScore": 0.736
        },
        "ImageWidth": 270,
        "Insights": {
          "Image": {
            "Caption": "An orange tabby cat lying on the living room sofa with sunlight streaming in through the window",
            "Description": "The image shows a person wearing a dark suit jacket over a white shirt. The background features a gradient from light blue to gray",
            "MultilingualContent": {
              "key": {
                "Caption": "No personnel activity at the office desk",
                "Description": "This is a close-up shot of an office desk setup. In the left foreground stands a tall, cylindrical, off-white insulated tumbler. A rectangular black mousepad occupies the center of the desk, holding a black backlit mechanical keyboard. Directly behind the keyboard sits a computer monitor with its screen illuminated, displaying the operating system's application dock at the bottom. To the front right of the monitor stands a red metal beverage can, surrounded by a tangle of white data cables and a charging adapter. A small, silver, rectangular device (possibly a USB drive or an adapter) rests in the gap behind the left side of the keyboard, and a tiny pink decorative object is faintly visible on the desk surface. The scene is devoid of human activity; all objects remain motionless."
              }
            }
          },
          "Video": {
            "Caption": "The video shows two different scenes: one features a stationary white plate, a black bottle, and a transparent glass, and the other shows a hand holding a shampoo bottle labeled \"YEZOLU\" moving slowly upward in a bathroom",
            "Description": "The scene shows a slightly chubby orange cat lying on a light gray fabric sofa with its body slightly curled up",
            "MultilingualContent": {
              "key": {
                "Caption": "No personnel activity at the office desk",
                "Description": "This is a close-up shot of an office desk setup. In the left foreground stands a tall, cylindrical, off-white insulated tumbler. A rectangular black mousepad occupies the center of the desk, holding a black backlit mechanical keyboard. Directly behind the keyboard sits a computer monitor with its screen illuminated, displaying the operating system's application dock at the bottom. To the front right of the monitor stands a red metal beverage can, surrounded by a tangle of white data cables and a charging adapter. A small, silver, rectangular device (possibly a USB drive or an adapter) rests in the gap behind the left side of the keyboard, and a tiny pink decorative object is faintly visible on the desk surface. The scene is devoid of human activity; all objects remain motionless."
              }
            }
          }
        },
        "Labels": [
          {
            "CentricScore": 0.7319999933242798,
            "Clips": [
              {
                "TimeRange": [
                  100
                ]
              }
            ],
            "LabelAlias": "座椅",
            "LabelConfidence": 0.9891784601980591,
            "LabelLevel": 1,
            "LabelName": "椅子",
            "Language": "zh-Hans",
            "ParentLabelName": "家具"
          }
        ],
        "Language": "eng",
        "LatLong": "30.134390,120.074997",
        "MediaType": "image",
        "OCRContents": [
          {
            "Confidence": 0.8254936695098877,
            "Contents": "",
            "Language": "zh-hans"
          }
        ],
        "OCRTexts": "阿里云IMM",
        "OSSCRC64": "559890638950338001",
        "OSSDeleteMarker": "CAEQMhiBgIDXiaaB0BYiIGQzYmRkZGUxMTM1ZDRjOTZhNjk4YjRjMTAyZjhl****",
        "OSSExpiration": "2120-01-01T12:00:00.000Z",
        "OSSObjectType": "Normal",
        "OSSStorageClass": "Standard",
        "OSSTagging": {
          "key": "val"
        },
        "OSSTaggingCount": 2,
        "OSSURI": "oss://examplebucket/sampleobject.jpg",
        "OSSUserMeta": {
          "key": "val"
        },
        "OSSVersionId": "CAEQNhiBgMDJgZCA0BYiIDc4MGZjZGI2OTBjOTRmNTE5NmU5NmFhZjhjYmY0****",
        "ObjectACL": "default",
        "ObjectId": "75d5de2c50754e3dadd5c35dbca5f9949369e37eb342a73821f690c94c36c7f7",
        "ObjectStatus": "Indexed",
        "ObjectType": "file",
        "Orientation": 0,
        "OwnerId": "102321002467****",
        "PageCount": 5,
        "Performer": "Jane",
        "ProduceTime": "2021-06-29T14:50:13.011643661+08:00",
        "ProgramCount": 1,
        "ProjectName": "test-project",
        "Reason": "[InternalError] The request has been failed due to some unknown error. status: 500, requestId: CC5ACFBD-BB7A-496D-A9D6-****",
        "SceneElements": [
          {
            "FrameTimes": [
              30
            ],
            "Labels": [
              {
                "CentricScore": 0.7319999933242798,
                "Clips": [
                  {
                    "TimeRange": [
                      100
                    ]
                  }
                ],
                "LabelAlias": "座椅",
                "LabelConfidence": 0.9891784601980591,
                "LabelLevel": 1,
                "LabelName": "椅子",
                "Language": "zh-Hans",
                "ParentLabelName": "家具"
              }
            ],
            "TimeRange": [
              100
            ],
            "VideoStreamIndex": 0
          }
        ],
        "SemanticTypes": [
          "content"
        ],
        "ServerSideDataEncryption": "SM4",
        "ServerSideEncryption": "AES256",
        "ServerSideEncryptionCustomerAlgorithm": "SM4",
        "ServerSideEncryptionKeyId": "9468da86-3509-4f8d-a61e-6eab1eac****",
        "Size": 1000,
        "StartTime": 0,
        "StreamCount": 1,
        "Subtitles": [
          {
            "Bitrate": 74,
            "CodecLongName": "MOV text",
            "CodecName": "mov_text",
            "CodecTag": "0x67337874",
            "CodecTagString": "tx3g",
            "Content": "",
            "Duration": 71.378,
            "Height": 30,
            "Index": 2,
            "Language": "en",
            "StartTime": 0,
            "Width": 600
          }
        ],
        "Timezone": "\"\"",
        "Title": "test",
        "TravelClusterId": "-",
        "URI": "oss://test-bucket/test-object.jpg",
        "UpdateTime": "2021-06-29T14:50:13.011643661+08:00",
        "VideoHeight": 1920,
        "VideoStreams": [
          {
            "AverageFrameRate": "25/1",
            "BitDepth": 8,
            "Bitrate": 5407765,
            "CodecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "CodecName": "h264",
            "CodecTag": "0x31637661",
            "CodecTagString": "avc1",
            "CodecTimeBase": "1373627/83160000",
            "ColorPrimaries": "bt709",
            "ColorRange": "tv",
            "ColorSpace": "bt709",
            "ColorTransfer": "bt709",
            "DisplayAspectRatio": "16:9",
            "Duration": 22.88,
            "FrameCount": 572,
            "FrameRate": "25/1",
            "HasBFrames": 2,
            "Height": 720,
            "Index": 0,
            "Language": "en",
            "Level": 40,
            "PixelFormat": "yuv420p",
            "Profile": "High",
            "Rotate": "90",
            "SampleAspectRatio": "1:1",
            "StartTime": 0,
            "TimeBase": "1/12800",
            "Width": 1280
          }
        ],
        "VideoWidth": 1080
      },
      "CreateTime": "2022-01-14T10:10:52.83948013+08:00",
      "CustomId": "abc",
      "CustomLabels": {
        "Bucket": "examplebucket"
      },
      "DatasetName": "dataset001",
      "FaceCount": 3,
      "Gender": "female",
      "ImageCount": 5,
      "MaxAge": 44,
      "MetaLockVersion": 0,
      "MinAge": 12,
      "Name": "abc",
      "ObjectId": "Cluster-ae6e3472-999e-410b-b54e-cd5dba****",
      "ObjectType": "figure-cluster",
      "OwnerId": "102321002****",
      "ProjectName": "immtest",
      "UpdateTime": "2022-01-14T10:10:52.83948013+08:00",
      "VideoCount": 3
    }
  ],
  "TotalCount": 100
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.