Aidge Resource
Try for freeWorkplace
  • LATEST ADVANCEMENTS
    • Introducing Marco-MT: Bringing Translation to the Next Level with LLM
  • GETTING STARTED
    • Quick Start
    • Account and Authentication
    • Your First API Request
    • Test Your API Requests
    • Service Level Agreement
    • FAQ
  • API REFERENCE
    • E-commerce Information Translation
      • Marco Translator
        • Marco Translator API Reference
      • Image Translation
        • Image Translation Pro Version API Reference
        • Image Translation Pro Version Result API Call Description
        • Image Translation Standard Version API Reference
    • E-commerce Image Editing
      • Image Background Removal
        • Image Background Removal API Reference
      • Image Upscaling
        • Image Upscaling API Reference
      • Image Cropping
        • Image Cropping API Reference
      • Image Elements Removal
        • Image Elements Removal API Reference
      • Image Elements Detection
        • Image Elements Detection API Reference
    • E-commerce Virtual Model
      • Virtual Model Alternation
        • Virtual Model Alternation Submit API Reference
        • Virtual Model Alternation Result Query API Reference
      • Virtual TryOn
        • Virtual Try-on Submit API Reference
        • Virtual Try-On Query API Reference
        • General Model Library Reference
      • Hands&Feet Repair
        • Hands&Feet Repair Submit API Reference
        • Hands&Feet Repair Query API Reference
    • Editor Documentation
      • AI Model Editor
      • AI Image Editor
        • Image Workbench
        • Background Removal
        • Elements Removal
        • Image Translation
Powered by GitBook
On this page
  • Image Elements Detection Submit
  • Request Parameters
  • Sample Request
  • Response Parameters
  • Errors

Was this helpful?

  1. API REFERENCE
  2. E-commerce Image Editing
  3. Image Elements Detection

Image Elements Detection API Reference

Image Elements Detection Submit

GET/POST /ai/image/detection

The image elements detection API is an efficient asynchronous batch processing API designed specifically for the identification of specific elements in e-commerce images. It can delve into the details within images to help users quickly identify the image subject and background elements such as text, logos, watermarks, and text-containing color blocks, greatly enhancing the efficiency and accuracy of image screening.

Request Parameters

Name
Type
Required
Description

imageUrl

String

Yes

URL of the image. The image should be in JPG, JPEG, PNG, or BMP format, with a resolution between 512x512 and 3000x3000 pixels, and a file size of no more than 10MB.

objectDetectElements

number[]

No

Detect elements on the subject of the image (1=Semi-Transparent Elements; 2=Specific Name; 3=Character;4=Color-Blocks with Characters).

nonObjectDetectElements

number[]

No

Detect elements not on the subject of the image (1=Semi-Transparent Elements; 2=Specific Name; 3=Character;4=Color-Blocks with Characters). It is not allowed to be empty at the same time as objectDetectElements.

returnCharacter

Integer

No

Whether to return the OCR result of the recognized area text (1 for yes, 0 for no). Default is not to return if not specified.

returnBorderPixel

Integer

No

Whether to return the distance of the subject's edge (1 for yes, 0 for no). Default is not to return if not specified.

returnProductProp

Integer

No

Whether to return the ratio of the subject area (1 for yes, 0 for no). Default is not to return if not specified.

returnProductNum

Integer

No

Whether to return the number of subjects (1 for yes, 0 for no). Default is 0 if not specified.

Sample Request

IopClient client = new IopClientImp(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("/ai/image/detection");
request.addApiParameter("imageDetectRequestList", "[{\"objectDetectElements\":[1,2,3,4],\"imageUrl\":\"https://qingguo-data.oss-cn-shanghai.aliyuncs.com/diffusion/temp/tt074.webp\",\"nonObjectDetectElements\":[1,2,3,4],\"requestBizId\":\"1234\"}]");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

Response Parameters

Name
Type
Required

resCode

Number

Response code; 200 represents a successful call, other response codes can refer to error code information.

data

Object

The structure of the returned result, which includes taskId to query the results.

requestId

String

Request ID; used to identify a unique request call.

success

Boolean

Whether it is successful; true represents success, false represents failure.

resMessage

String

Error message, such as "content has sensitive data, please try other input".

Errors

Error Code
Error Message
Descrption

200

success

The call was successful.

501

rate limit exceed

The current interface has reached the rate limit. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) to increase the current limit.

700

invalid input

The format of the input parameters does not meet the requirements. Detailed non-compliance information will be returned in resMessage.

801

model failed

An internal call exception occurred. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.

900

tpp url error

An internal call exception occurred. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com) for troubleshooting.

1000

content has sensitive data, please try other input

The request contains sensitive information, which is not supported at the moment. Please try other inputs.

1001

content control failed, please retry

The risk control service failed to run. Please retry. If the error persists after retrying, contact us via navigation bar or email us (aidge_support@service.alibaba.com).

1002

content risk filter failed, please contact us

The risk control service encountered an exception. Please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

Notice

By using this API, you confirm that you are a legal owner of all intellectual property rights pertaining to the data and content that you provide to us via the API, or have obtained the necessary authorizations for us to receive and use the same from you. You further agree that you will not use this product or any output thereof for any unlawful, unethical, unauthorized or harmful activities.

PreviousImage Elements DetectionNextE-commerce Virtual Model

Last updated 1 day ago

Was this helpful?