🟡API for Beautification Application

Use this application to beautify the selfie by improving the skin condition or adding makeup. The app has three different modes.

This page will soon be updated.

Attach an application to your dataset:

The Beautification application can be attached to the dataset, just like the Face Application.

#Face Beautification
BEAUTIFICATION_APPLICATION_ID = "c879e501-b203-47fa-b333-d4877f0eef99" 

resp = requests.post(
    f"{SAAS_HOST}/api/v1/companies/{company_id}/"
    f"applications/{BEAUTIFICATION_APPLICATION_ID}/runs/",
    json={
        "dataset_id": dataset_id,
        "algorithms_flags": [
            {
                "name": "beautification_config",
                "values": ["healthy_colored", "healthy", "light_healthy"],
            }
        ],
    },
    headers={"Authorization": f"Bearer {token}"},
)

resp.raise_for_status()

print(
    "Beautification application has been successfully attached to dataset:",
    dataset_id,
)

The field algorithms_flags should contain a values list that describes the degree of beautification effect. The image can be beautified with only one mode"values": [ "healthy_colored" ]as well as with two or three modes "values": [ "healthy", "healthy_colored" ]. By default "values":["healthy"]

NB! Please note that once you have attached an application to a dataset with the configuration described in algorithms_flags, you cannot change them; if you would like to configure the application differently, you will need to create a new dataset and attach it to the application with another algorithms_flags.

Upload an image to your dataset

The application supports only frontal facial images, i.e., you should specify side_id == 1 during the uploading process

Beautification options

The app has the following three beautification options:

  1. Light healthy: apply this mode to slightly improve facial skin quality, reduce skin pigmentation, and decrease scarring (see light_healthy in the illustration below).

  2. Healthy: apply this mode to increase skin evenness, reduce redness, and decrease skin irritation. Facial skin will look visibly younger (see healthy in the illustration below).

  3. Healthy colored: apply this mode to combine the “Healthy” mode with lightly colored makeup (see healthy_colored in the illustration below).

Results

The results can be parsed from aux_image_type from an API response

"aux_image_type":[
                  {
                  "id": 46,
                  "name": "Light healthy",
                  "tech_name": "beautification_original_light_healthy"
                  },
                  {
                  "id": 47,
                  "name": "Healthy",
                  "tech_name": "beautification_original_healthy"
                  },
                  {
                  "id": 47,
                  "name": "Healthy colored",
                  "tech_name": "beautification_original_healthy_colored"
                  }
                 ]

Last updated