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 only the target areas associated with a specified tag. For example, a mask with the coat tag will solely contain the coat areas.
- Unified mask: This type of mask merges target areas into one mask, representing them using a specified color model. For example, a mask featuring the white color model will depict all target areas in white.
Support Tags
The following tags are supported, each tag is associated with a unique color when maskColorModel
is set to multicolor
:
- background - Typically the area outside of the clothing. Color: #C0C0C0
- headwear - This category usually includes various hats, headscarves, and headwear items. Color: #F53F3F
- hair - Encompasses areas covered by hair. Color: #7816FF
- gloves - Typically refers to hand coverings like gloves. Color: #00B42A
- glasses - This category includes eyeglasses and frames worn on the face. Color: #165DFF
- coat - Typically upper-body outerwear. Color: #FF7D00
- dress - Dresses or similar one-piece garments. Color: #EB0AA4
- outerwear - Various types of coats, overcoats, and outerwear. Color: #7BC616
- socks - Typically foot coverings, such as socks. Color: #868C9C
- pants - Refers to various types of trousers or pants. Color: #DB9E00
- skin - Encompasses exposed skin areas. Color: #B71DE8
- scarf - Usually scarves or neckwear. Color: #0FC6C2
- skirt - Includes various types of skirts or miniskirts. Color: #FFB400
- face - This category typically covers the facial region, including eyes, mouth, and cheeks. Color: #168DFD
- shoes - Usually footwear worn on the feet. Color: #FF5722
- bag - Refers to various types of handbags, purses, and backpacks. Color: #FF16A2
- accessory - Encompasses various accessories like necklaces, bracelets, and earrings. Color: #16FFB9
- jumpsuit - Typically one-piece garments. Color: #F711D4
- stand - Typically the area where the person stands. Color: #D4576A
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.
maskColorModel string Optional Defaults to
white-black
Indicates the default color model of the mask, including the unified mask and tagged masks. You can override mask color model value by specifying the
maskColorModel
in the Unified mask configs object or Tagged mask configs object.Allowed values:
white-black
: Indicates that the mask represents target areas in white and other areas in black.black-white
: Indicates that the mask represents target areas in black and other areas in white.multicolor-white
: Indicates that the mask represents target areas in different colors and other areas in white.multicolor-black
: Indicates that the mask represents target areas in different colors and other areas in black.multicolor-transparent
: Indicates that the mask represents target areas in different colors and other areas in transparent.
Indicates the unified masks to be returned. Each array item is a Unified mask configs object. If
null
is specified, no unified mask will be returned.Indicates the tagged masks to be returned. Each array item is a Tagged mask configs object. If
null
is specified, no tagged mask will be returned.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.
maskColorModel string Optional Defaults to
maskColorModel
of the request bodyIndicates the color model of the unified mask.
Allowed values:
white-black
: Indicates that the mask represents target areas in white and other areas in black.white-transparent
: Indicates that the mask represents target areas in white and other areas in transparent.black-white
: Indicates that the mask represents target areas in black and other areas in white.black-transparent
: Indicates that the mask represents target areas in black and other areas in transparent.multicolor-white
: Indicates that the mask represents target areas in different colors and other areas in white.multicolor-black
: Indicates that the mask represents target areas in different colors and other areas in black.multicolor-transparent
: Indicates that the mask represents target areas in different colors and other areas in transparent.
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.
maskColorModel string Optional Defaults to
maskColorModel
of the request bodyIndicates the color model of the tagged mask.
Allowed values:
white-black
: Indicates that the mask represents target areas in white and other areas in black.white-transparent
: Indicates that the mask represents target areas in white and other areas in transparent.black-white
: Indicates that the mask represents target areas in black and other areas in white.black-transparent
: Indicates that the mask represents target areas in black and other areas in transparent.multicolor-white
: Indicates that the mask represents target areas in different colors and other areas in white.multicolor-black
: Indicates that the mask represents target areas in different colors and other areas in black.multicolor-transparent
: Indicates that the mask represents target areas in different colors and other areas in transparent.
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.