Generic Algorithm Metric Scheme
This page explains the output of the API
Structure of response
The API response of each algorithm has the following structure:
{
"algorithm_tech_name": ,
"image_type": ,
"area_results": ,
"masks_restored": ,
"masks_original":
}algorithm_tech_name— technical name of an algorithmimage_type— type of image. In this case, it is equal to"selfie"area_results— algorithm results of different facial skin areasmasks_restored— masks of detected objects that can be overlaid on a face-aligned imagemasks_original— masks of detected objects that can be overlaid on an original image
area_results
area_resultsThe block of API output that contains information about the algorithm output:
"area_results": [
{
"area_name": ,
"main_metric": ,
"sub_metrics": ,
},
...
{
"area_name": ,
"main_metric": ,
"sub_metrics": ,
},
]area_name- name of the facial area in which a particular algorithm result is calculatedfacea whole faceforeheadforeheadforehead_n_bridgeforehead and nasal bridgenosenosenose_bridgenose and nasal bridgenose_upper_trianglenoseright_cheekright cheekright_cheek_wideright cheekright_cheek_largeright cheekleft_cheekleft cheekleft_cheek_wideleft cheekleft_cheek_largeleft cheekleft_eye_outerarea around the left eyeright_eye_outerarea around the right eyechin_widechinchinchin
main_metric- the main output of an algorithmsub_metrics- the auxiliary output of an algorithm with additional features
masks_restored
masks_restoredMasks are a set of coordinates on an image that describe the location of particular objects in that image, e.g., coordinates of wrinkles or acne spots. masks_restored is a mask that is calculated for a face-aligned image (or restored image).
"masks_restored": [
{
"mask_type": "polygon_mask",
"features": [
{
"geometry": {
"type": "MultiPolygon",
"coordinates": [ ]
},
"properties": {
"intensity":
},
"type":
}
],
"view_box": ,
"name": ,
"tech_name": ,
"fill": ,
"type":
}
mask_typeis a type of mask. The API returns three types of masks:polygon_mask- mask consists of polygons and their coordinatespoint_mask- mask consists of dots and their coordinatesheatmap_mask- mask represents a heatmap
features- mask featuresgeometry- information about the geometry of detected objectstypeMultiPolygonMultiPoint
coordinates- coordinates of detected objects
propertiesintensity- recommended color intensity for visualization
type- ignore this field
view_box- the size of an imagename- mask nametech_name- technical mask namefill- recommended color for visualizationtype- ignore this field
For further information about mask visualization, read more here
masks_original
masks_originalThe same as masks_restored, but the mask is calculated for the original input image.
For further information about mask visualization, read more here
Last updated
Was this helpful?