Clothes Segmentation
💡
Before using the API, make sure you have read our Authorization documentation to get set up with Vmake's API authentication.
Clothes Segmentation API can detect the clothing areas in the image and use masks to mark them. The API currently supports the following types of mask:
- Tagged mask: This type of mask contains mask and tag containing all areas.
- Unified mask: This type of mask merges target areas into one mask.
Support Tags
The following tags are supported:
- background - Typically the area outside of the clothing.
- headwear - This category usually includes various hats, headscarves, and headwear items.
- hair - Encompasses areas covered by hair.
- gloves - Typically refers to hand coverings like gloves.
- glasses - This category includes eyeglasses and frames worn on the face.
- coat - Typically upper-body outerwear.
- dress - Dresses or similar one-piece garments.
- outerwear - Various types of coats, overcoats, and outerwear.
- socks - Typically foot coverings, such as socks.
- pants - Refers to various types of trousers or pants.
- skin - Encompasses exposed skin areas.
- scarf - Usually scarves or neckwear.
- skirt - Includes various types of skirts or miniskirts.
- face - This category typically covers the facial region, including eyes, mouth, and cheeks.
- shoes - Usually footwear worn on the feet.
- bag - Refers to various types of handbags, purses, and backpacks.
- accessory - Encompasses various accessories like necklaces, bracelets, and earrings.
- jumpsuit - Typically one-piece garments.
- stand - Typically the area where the person stands.
Request Clothes Segmentation
🌐
POST https://open.vmake.ai/api/v2/image/clothes-segmentation
Make a request for clothes segmentation. You must at least specify one of the following fields in the request body:
unifiedMasks
: The unified masks to be returned.taggedMasks
: The tagged masks to be returned.
Request body
image string Required
Input an
image
URL or Base64 encoded image data.maskDataType string Optional Defaults to base64
Indicates the default data type of the returned masks, including the unified mask and tagged masks. You can override mask data type by specifying the
maskDataType
in the Unified mask configs object or Tagged mask configs object.Allowed values:
base64
: Indicates that the returned mask is in Base64 encoded image data.url
: Indicates that the returned mask is downloadable via URL.
Response body
The standard response body will be returned.
The tagged mask list. Each tagged mask is a Tagged mask object.
The unified mask list. Each unified mask is a Unified mask object.
Unified mask configs object
Represents the configs of each unified mask in the request.
tags array Optional Defaults to null
The tags of the unified mask. See Support Tags for more details. If
null
is specified, all tags will be used.maskDataType string Optional Defaults to
maskDataType
of the request bodyIndicates the data type of the returned unified mask.
Allowed values:
base64
: Indicates that the returned unified mask is in Base64 encoded image data.url
: Indicates that the returned unified mask is downloadable via URL.
Unified mask object
Represents a returned unified mask with specified tags.
tags array Required
The tags associated with the unified mask. See Support Tags for more details.
mask string Required
The mask data in Base64 encoded image data or URL.
Tagged mask configs object
Represents the configs of each tagged mask in the request.
tag string Required
The tag of the mask. See Support Tags for more details.
maskDataType string Optional Defaults to
maskDataType
of the request bodyIndicates the data type of the returned tagged mask.
Allowed values:
base64
: Indicates that the returned tagged mask is in Base64 encoded image data.url
: Indicates that the returned tagged mask is downloadable via URL.
Tagged mask object
Represents a returned mask with a tag.
tag string Required
The tag of the mask. See Support Tags for more details.
mask string Required
The mask data in Base64 encoded image data or URL.