References
Clothes Segmentation

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:

  1. background - Typically the area outside of the clothing.
  2. headwear - This category usually includes various hats, headscarves, and headwear items.
  3. hair - Encompasses areas covered by hair.
  4. gloves - Typically refers to hand coverings like gloves.
  5. glasses - This category includes eyeglasses and frames worn on the face.
  6. coat - Typically upper-body outerwear.
  7. dress - Dresses or similar one-piece garments.
  8. outerwear - Various types of coats, overcoats, and outerwear.
  9. socks - Typically foot coverings, such as socks.
  10. pants - Refers to various types of trousers or pants.
  11. skin - Encompasses exposed skin areas.
  12. scarf - Usually scarves or neckwear.
  13. skirt - Includes various types of skirts or miniskirts.
  14. face - This category typically covers the facial region, including eyes, mouth, and cheeks.
  15. shoes - Usually footwear worn on the feet.
  16. bag - Refers to various types of handbags, purses, and backpacks.
  17. accessory - Encompasses various accessories like necklaces, bracelets, and earrings.
  18. jumpsuit - Typically one-piece garments.
  19. 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.


taggedMasks    object array    Required
The tagged mask list. Each tagged mask is a Tagged mask object.

unifiedMasks    object array    Required
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 body
Indicates 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 body
Indicates 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.