Size chart extraction (asynchronous)

Updated at:

1. Overview

This service uses a multi-modal large model to intelligently extract structured information, such as size charts and piece weight and dimensions, from images. This is an asynchronous operation.

2. Use cases

Size charts: Extract size charts for apparel products and convert them into text.

Piece weight and dimensions: Extract piece weight and dimensions information from images.

3. Features

The size chart extraction service is powered by a multi-modal large model. It automatically identifies size charts or piece weight and dimensions information in images and outputs the data in a structured text format. You provide an image URL, and the system processes it as an asynchronous task, returning the extracted structured data. You can specify the column names to identify, such as "Size", "Bust", or "Length", using the ColumnNameList parameter for targeted extraction. You can also control the output language using the LanguageModel parameter. You can choose Chinese (cn) or English (en). If you do not specify a language, the original language is retained. This feature is ideal for scenarios like converting apparel size charts to text and batch-structuring product piece weight and dimensions information.

You provide an image URL and optional column name configurations. The service then returns structured data from the size chart or piece weight and dimensions found in the image. The API uses an asynchronous task model (background: true). After you submit a request, the API returns a task ID. You must then poll for the final result. This approach is suitable for processing complex images or handling large volumes of calls.

4. Example

Input image

Output result

image

{

"SizeChart": [

{

"Size": {

"value": "S"

},

"Waist": {

"unit": "CM",

"value": 58

},

"Skirt Length": {

"unit": "CM",

"value": 81

},

"Recommended Weight": {

"unit": "kg",

"lower_value": 40,

"upper_value": 47.5

}

},

{

"Size": {

"value": "M"

},

"Waist": {

"unit": "CM",

"value": 59

},

"Skirt Length": {

"unit": "CM",

"value": 82

},

"Recommended Weight": {

"unit": "kg",

"lower_value": 45,

"upper_value": 52.5

}

},

{

"Size": {

"value": "L"

},

"Waist": {

"unit": "CM",

"value": 60

},

"Skirt Length": {

"unit": "CM",

"value": 83

},

"Recommended Weight": {

"unit": "kg",

"lower_value": 50,

"upper_value": 57.5

}

},

{

"Size": {

"value": "XL"

},

"Waist": {

"unit": "CM",

"value": 61

},

"Skirt Length": {

"unit": "CM",

"value": 84

},

"Recommended Weight": {

"unit": "kg",

"lower_value": 55,

"upper_value": 62.5

}

},

{

"Size": {

"value": "2XL"

},

"Waist": {

"unit": "CM",

"value": 62

},

"Skirt Length": {

"unit": "CM",

"value": 85

},

"Recommended Weight": {

"unit": "kg",

"lower_value": 60,

"upper_value": 67.5

}

}

],

"SizeChartAttributes": [

"Size",

"Skirt Length",

"Waist",

"Recommended Weight"

],

"IntersectionAttributes": [

"Size",

"Skirt Length",

"Waist (Stretched)",

"Recommended Weight"

]

}

5. API reference

5.1 Submit task API

5.1.1 Request parameters

Parameter name

Type

Required

Description and example value

ImageUrl

String

Yes

The URL of the image. The image must be in JPG, JPEG, PNG, BMP, or WEBP format. The resolution must be between 256×256 and 3000×3000 pixels, and the file size must not exceed 10 MB.

Example: "https://ae01.alicdn.com/kf/S342f0070dc9f4be09a6cbed34e90dc8fs.jpg"

ColumnNameList

String[]

No

The names of the columns to identify, such as Size, Bust, or Length.

Example: ["Size", "Bust"]

LanguageModel

String

No

The output language. If this parameter is not specified, the original language is retained. If the original image text is in Chinese or English, set this parameter to en for English output or cn for Chinese output.

Example: "cn"

5.1.2 Request example

{
  "ImageUrl": "https://cbu01.alicdn.com/img/ibank/O1CN01KVnrhI1EzKDIqLh2p_!!2209511530422-0-cib.jpg",
  "ColumnNameList": null,
  "LanguageModel": "cn"
}

5.1.3 Response parameters

Parameter name

Type

Description

Code

String

The status code. For example, "success".

Success

Boolean

Indicates whether the request was successful. true indicates success, and false indicates failure.

RequestId

String

The request ID, which uniquely identifies a single API call.

Data

Object

The returned result object.

Data.TaskId

String

The asynchronous task ID. Use this ID to query the task result.

5.1.4 Response example

{
  "Data": {
    "TaskId": "c657386a-f39e-9888-8570-1ca8b4603c19"
  },
  "RequestId": "233DC2E3-2554-1426-928E-67ECE0610EEE",
  "Message": "Success",
  "Code": "success",
  "Success": true
}

5.2 Query task API

Asynchronous result query API

5.2.1 Request parameters

Parameter name

Type

Required

Description and example value

TaskId

string

Yes

The task ID automatically generated by the system after the request is submitted.

"d3929984-3acd-9f6a-ac25-dca0cdf06836"

5.2.2 Request example

{
  "TaskId": "c657386a-f39e-9888-8570-1ca8b4603c19"
}

5.2.3 Response parameters

Parameter

Type

Description

Code

String

The status code. For example, "success".

Success

Boolean

Indicates whether the request was successful. true indicates success, and false indicates failure.

RequestId

String

The request ID, which uniquely identifies a single API call.

Data

Object

The returned result object.

Data.TaskId

String

The asynchronous task ID.

Data.Status

String

The task status. For example, "COMPLETED".

Data.Result

Object

The task result.

Data.Result.Message

Object

The recognition result. The key is the input image URL.

Data.Result.Message.{ImageUrl}

Object

The recognition result for a single image.

Data.Result.Message.{ImageUrl}.SizeChart

Array<Object>

A list of size chart data objects. The returned fields are dynamic and depend on the recognition result. Examples include Size, Weight, and Length.

Data.Result.Message.{ImageUrl}.SizeChart.{AttrName}.Unit

String

The unit of the attribute, such as "CM" or "G".

Data.Result.Message.{ImageUrl}.SizeChart.{AttrName}.Value

String

The value of the attribute, such as "321CM" or "10".

Data.Result.Message.{ImageUrl}.SizeChartAttributes

Array<String>

A list of the original attribute names from the size chart.

Data.Result.Message.{ImageUrl}.IntersectionAttributes

Array<String>

A list of the translated attribute names from the size chart. If no translation is applied, this list is identical to SizeChartAttributes.

Data.UsageMap

Object

Usage data.

Data.UsageMap.ProcessedImageCount

Number

The number of processed images.

5.2.4 Response example

{
  "Data": {
    "Status": "COMPLETED",
    "UsageMap": {
      "ProcessedImageCount": "1"
    },
    "TaskId": "c657386a-f39e-9888-8570-1ca8b4603c19",
    "Result": {
      "message": {
        "Https://cbu01.alicdn.com/img/ibank/o1cn01kvnrhi1ezkdiqlh2p!!2209511530422-0-cib.jpg": {
          "SizeChart": [
            {
              "尺码": {
                "value": "S"
              },
              "腰围": {
                "unit": "CM",
                "value": 58
              },
              "裙长": {
                "unit": "CM",
                "value": 81
              },
              "体重建议": {
                "unit": "kg",
                "lower_value": 40,
                "upper_value": 47.5
              }
            },
            {
              "尺码": {
                "value": "M"
              },
              "腰围": {
                "unit": "CM",
                "value": 59
              },
              "裙长": {
                "unit": "CM",
                "value": 82
              },
              "体重建议": {
                "unit": "kg",
                "lower_value": 45,
                "upper_value": 52.5
              }
            },
            {
              "尺码": {
                "value": "L"
              },
              "腰围": {
                "unit": "CM",
                "value": 60
              },
              "裙长": {
                "unit": "CM",
                "value": 83
              },
              "体重建议": {
                "unit": "kg",
                "lower_value": 50,
                "upper_value": 57.5
              }
            },
            {
              "尺码": {
                "value": "XL"
              },
              "腰围": {
                "unit": "CM",
                "value": 61
              },
              "裙长": {
                "unit": "CM",
                "value": 84
              },
              "体重建议": {
                "unit": "kg",
                "lower_value": 55,
                "upper_value": 62.5
              }
            },
            {
              "尺码": {
                "value": "2XL"
              },
              "腰围": {
                "unit": "CM",
                "value": 62
              },
              "裙长": {
                "unit": "CM",
                "value": 85
              },
              "体重建议": {
                "unit": "kg",
                "lower_value": 60,
                "upper_value": 67.5
              }
            }
          ],
          "SizeChartAttributes": [
            "尺码",
            "裙长",
            "腰围",
            "体重建议"
          ],
          "IntersectionAttributes": [
            "尺码",
            "裙长",
            "腰围(拉伸)",
            "体重建议"
          ]
        }
      }
    }
  },
  "RequestId": "A5E5AF2E-0728-1EE6-A5A7-5A941C2DF7A1",
  "Message": "Success",
  "Code": "success",
  "Success": true
}

5.3 Error codes

Error codes

6. Get started

6.1 Before you begin

The size chart extraction service supports both synchronous and asynchronous call modes. This document describes the asynchronous call. For the synchronous call, see Size chart extraction (synchronous).

The asynchronous interfaces for size chart extraction and other features share the same result retrieval process, RocketMQ subscription rules, message encryption protocol, dependency configuration, and Java consumer and decryption code.

For the asynchronous call workflow, subscription rules, message format, encryption protocol, and detailed integration solutions, see Asynchronous API call instructions.

7. Billing

$0.03 per image

8. Limitations

Call mode: asynchronous. Default QPS = 2. The maximum timeout for a single request is 30 seconds.

Input image: JPG / JPEG / PNG / BMP / WEBP. Resolution: 256×256 to 3000×3000. File size ≤ 10 MB.

Billing: You are billed based on the ProcessedImageCount. For more information, see Material Optimization Billing.

9. FAQ

When should I use the size chart extraction feature?

Use this feature when you need to submit or retrieve size information on a platform, but the size chart is only available as an image in your original product materials.

What are the advantages of this feature compared to using standard OCR?

① You can select which columns to extract.

② It helps filter out images that do not contain size charts, saving on unnecessary processing costs.