> For the complete documentation index, see [llms.txt](https://docs.saas.haut.ai/haut.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-face-metrics-2.0/pigmentation.md).

# Pigmentation Result Scheme

Haut.AI provides an AI algorithm that estimates pigmented spots for different facial areas and the whole face.

## **Description**

{% content-ref url="/pages/7bV03Hpoo2pAXy1SrLDS" %}
[Pigmentation Algorithm](/haut.ai/haut.ai-features/algorithms/face-metrics-2-0/pigmentation-algorithm.md)
{% endcontent-ref %}

## `algorithm_tech_name`

`pigmentation`

## `area_name`

The algorithm returns metrics and sub-metrics for the following facial areas:

* `face`
* `nose_upper_triangle`
* `right_cheek_wide`
* `left_cheek_wide`
* `forehead`
* `chin_wide`

## `main_metric`

The main metric is an overall score indicating the pigmented spots for each `area_name`

```javascript
"main_metric": {
                "value": 95,
                "widget_type": "bad_good_line",
                "name": "Pigmentation score",
                "tech_name": "pigmentation_score",
                "widget_meta": null
            },
```

* **`value`** the pigmentation score ranges from `[0,100]`*The higher the value of this parameter, the fewer pigmented spots.*
* The score can be classified into six classes based on `value`:
  * `(90,100]` - Excellent
  * `(80,90]` - Great
  * `(70,80]` - Good
  * `(50,70]` - Average
  * `(30, 50]` - Poor
  * `[0,30]` - Bad
* `"widget_type": "bad_good_line"` indicates that a higher value is better
* `"name": "Pigmentation score"`
* `"tech_name": "pigmentation_score"`

## `sub_metrics`

The algorithm returns sub-metrics for each `area_name`

```javascript
"sub_metrics": [
                {
                    "value": 12,
                    "widget_type": "numeric",
                    "name": "Number of pigmentation spots",
                    "tech_name": "number_of_regions",
                    "widget_meta": null
                },
                {
                    "value": 0,
                    "widget_type": "density",
                    "name": "Pigmentation density score",
                    "tech_name": "density_score",
                    "widget_meta": null
                },
                {
                    "value": 0,
                    "widget_type": "density",
                    "name": "Average intensity of pigmentation",
                    "tech_name": "average_intensity_score",
                    "widget_meta": null
                },
                {
                    "value": 9,
                    "widget_type": "density",
                    "name": "Average size of pigmentation spots",
                    "tech_name": "average_region_size",
                    "widget_meta": null
                },
                {
                    "value": 5,
                    "widget_type": "density",
                    "name": "Standard deviation of pigmentation spots size",
                    "tech_name": "region_size_std",
                    "widget_meta": null
                }
            ]
```

* **`Number of pigmented spots`** estimates the number of detected pigmented spots
  * **`value`** the detected number of spots
  * `"widget_type": "numeric"`
  * `"name": "Number of pigmented spots"`
  * `"tech_name": "number_of_regions"`
* **`Pigmentation density score`** estimates the density of spots
  * **`value`** the density of pigmented spots
  * `"widget_type": "density"`
  * `"name": "Pigmentation density score"`
  * `"tech_name": "density_score"`
* **`Average size of pigmented spots`** estimates the average size of pigmented spots in comparison with the skin area
  * **`value`**
  * `"widget_type": "density"`
  * `"name": "Average size of pigmentation spots"`
  * `"tech_name": "average_region_size"`
* **`Standard deviation of pigmented spots' size`** estimates the standard deviation of pigmented spots' size
  * **`value`** the density of pigmented spots
  * `"widget_type": "density"`
  * `"name": "Standard deviation of pigmentation spots size"`
  * `"tech_name": "region_size_std"`
* **`Average intensity of pigmentation`** estimates the intensity of pigmented spots
  * **`value`** *the higher the value of this parameter, the more severe the spots*
  * `"widget_type": "density"`
  * `"name": "Average intensity of pigmentation"`
  * `"tech_name": "average_intensity_score"`

## `masks_restored`

The algorithm returns a vectorized masks of pigmented spots for a face-aligned image

* `"mask_type": "polygon_mask"`
* `features`

  * geometry
    * `"type": "MultiPoint"`

  See more on Masks [here](/haut.ai/haut.ai-features/algorithms/algorithm-results.md#masks)

## `masks_original`

The algorithm returns a vectorized mask of pigmented spots for an original image

* `"mask_type": "polygon_mask"`
* `features`

  * geometry
    * `"type": "MultiPoint"`

  See more on Masks [here](/haut.ai/haut.ai-features/algorithms/algorithm-results.md#masks)

## **Example (JSON)**

{% file src="/files/-MYEA-6VdDgGXLk5FGl8" %}
pigmentation.json
{% endfile %}

***

{% hint style="warning" %}
Not a Haut.AI client yet?
{% endhint %}

<a href="https://haut.ai/book-a-demo?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button primary" data-icon="user-vneck">Book a demo</a> <a href="https://haut.ai/product/ai-skin-analysis?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button secondary" data-icon="external-link">Platform overview on haut.ai</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-face-metrics-2.0/pigmentation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
