SegmentBody portrait segmentation

Updated at:

The SegmentBody operation detects human contours in an input image, separates them from the background, and returns a segmented 4-channel foreground portrait. This operation is suitable for various scenarios, such as images with a single person, multiple people, complex backgrounds, or various human poses.

Introduction

  • Name: Portrait Segmentation

  • Action: SegmentBody

Image limits

  • Image format: JPEG, JPG, PNG, BMP, and WEBP. 8-bit, 16-bit, or 64-bit PNG images are not supported.

  • Image size: Less than 3 MB.

  • Image resolution: The width and height of the image must be between 32 and 2,000 pixels.

You can run this operation directly in OpenAPI Explorer to avoid signature calculations. Upon successful execution, OpenAPI Explorer automatically generates software development kit (SDK) code examples.

Parameters

This operation accepts an image as input and returns a transparent PNG image of the segmented entity.

Request parameters

Name

Type

Required

Description

ImageUrl

string

Yes

The URL of the image.

Response fields

Name

Type

Required

Description

ImageUrl

string

Yes

The URL of the image after segmentation.

Examples

Input

{
   "imageUrl": "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/pop-sample/images/SegmentImage/segmentimage-src-hu.jpeg"
}

Outputs

{
  code: "0",
  message: "success",
  trackId: "0b0b62c715591127811257189e",
  reqeustId: "0b0b62c715591127811257189e",
  result: {
    imageUrl: 'http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/pop-sample/images/SegmentImage/segmentimage-src-hu-result.png'
  }
}