Generic Algorithm Result Sheme

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 algorithm

  • image_type - type of image. In this case, it is equal to "selfie"

  • area_results- algorithm results of different facial skin areas

  • masks_restored- masks of detected objects that can be overlaid on a face-aligned image

  • masks_original- masks of detected objects that can be overlaid on an original image

area_results

The 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 calculated

    • facea whole face

    • forehead forehead

    • forehead_n_bridgeforehead and nasal bridge

    • nose nose

    • nose_bridge nose and nasal bridge

    • nose_upper_triangle nose

    • right_cheek right cheek

    • right_cheek_wide right cheek

    • right_cheek_large right cheek

    • left_cheek left cheek

    • left_cheek_wide left cheek

    • left_cheek_large left cheek

    • left_eye_outer area around the left eye

    • right_eye_outer area around the right eye

    • chin_wide chin

    • chin chin

  • main_metric- the main output of an algorithm

  • sub_metrics- the auxiliary output of an algorithm with additional features

masks_restored

Masks 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_type is a type of mask. The API returns three types of masks:

    • polygon_mask - mask consists of polygons and their coordinates

    • point_mask - mask consists of dots and their coordinates

    • heatmap_mask - mask represents a heatmap

  • features - mask features

    • geometry- information about the geometry of detected objects

      • type

        • MultiPolygon

        • MultiPoint

      • coordinates - coordinates of detected objects

    • properties

      • intensity - recommended color intensity for visualization

    • type - ignore this field

  • view_box - the size of an image

  • name - mask name

  • tech_name - technical mask name

  • fill- recommended color for visualization

  • type - ignore this field

For further information about mask visualization, read more here

masks_original

The 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