API for Masks

This page contains description how to get images with applied masks via API.

triangle-exclamation

Masks are additional results of image analysis, representing the spatial information about detected skin/hair health returned by the selected set of Algorithms.

circle-info

Check the Masks description for more details.

What can you do?

You can find more details on these actions in the Rasterisation section of Swaggerarrow-up-right.


Apply masks to image with API

Apply Mask V4 Http

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
company_idstring · uuidRequired
Body
image_idstring · uuid4Required
image_typestring · enumRequiredPossible values:
Responses
chevron-right
200

Successful Response

application/json
post
/service/rasterisation/v4/masks/

Required arguments are company_id and image_id.

It's important which image you want to visualize masks on: original or restored.

Then you need to compile a masks list:

  • algorithm_tech_name - it's internal ML algorithm tech_name (e.g. age or pores). We know that this is an incosistency, because we have 2 types of tech names throughout API. It will be changed in future.

  • optional fill_override - override mask color.

  • optional polyline_line_thickness - override mask line thickness.

  • optional main_metric - if API response should contain the metric for this algorithm.

  • optional sub_metrics - if API response should contain submetrics for this algorithm.

  • optional deprecated concentric_lines - if masks should be visualised as concentric lines. (Supported only for a few algorithms). Will be deleted in future.

This method returns signed URLs with images with applied masks.

Note We return 1 image per 1 mask, so if you request to apply 5 masks, you will receive 5 images, not 1 in response.

Last updated

Was this helpful?