Skip to main content

AILabTools API - Skin analyze - API

Request

  • URL: https://www.ailabapi.com/api/portrait/analysis/skin-analysis
  • Method: POST
  • Content-Type: multipart/form-data

Image requirements

  • Image format: JPG JPEG
  • Image size: No more than 2 MB.
  • Image resolution: Larger than 200x200px, smaller than 4096x4096px.
  • Minimum face pixel size: To ensure the effect, it is recommended that the minimum value of the face box (square) side length in the image is not less than 200 pixels. Calibration size: minimum of 160 pixels. The minimum value of the face frame edge length is not less than one-tenth of the shortest edge of the image.
  • Face quality: The higher the face quality, the more accurate the skin analysis. Factors affecting face quality include: occlusion of the five facial features, blurred images, improper lighting (bright, dark, backlight), excessive face angle (roll ≤ ±45°, yaw ≤ ±45°, pitch ≤ ±45° are recommended), etc.
FieldRequiredTypeDescription
ailabapi-api-keyYESstringApplication API KEY.

Body

FieldRequiredType
imageYESfile

Response

Parameters

FieldTypeScopeDescription
error_codeintegerStatus Code.
error_code_strstringError Code.
error_msgstringError Message.
request_idstringRequest ID.
log_idstringLog ID.
warningarray
  • imporper_headpose
  • Interference factors affecting the calculation results.
  • imporper_headpose: Improper head angle (Judgment condition roll,yaw,pitch exceeds [-45,45]).
  • face_rectangleobjectThe position of the face rectangle box.
    +topfloatThe vertical coordinate of the pixel point in the upper-left corner of the rectangle box.
    +leftfloatThe horizontal coordinate of the pixel point in the upper-left corner of the rectangle.
    +widthfloatThe width of the rectangle box.
    +heightfloatThe height of the rectangle box.
    resultobjectResults of face skin analysis.
    +left_eyelidsobjectResults of the double eyelid test on the left eye.
    ++valueinteger
  • 0
  • 1
  • 2
  • Type.
  • 0: Single eyelids
  • 1: Parallel Double Eyelids
  • 2: Scalloped Double Eyelids
  • ++confidencefloat[0, 1]Confidence.
    +right_eyelidsobjectResults of the double eyelid test on the right eye.
    ++valueinteger
  • 0
  • 1
  • 2
  • Type.
  • 0: Single eyelids
  • 1: Parallel Double Eyelids
  • 2: Scalloped Double Eyelids
  • ++confidencefloat[0, 1]Confidence.
    +eye_pouchobjectEye bag test results.
    ++valueinteger
  • 0
  • 1
  • With or without eye bags.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +dark_circleobjectDark circles test results.
    ++valueinteger
  • 0
  • 1
  • With or without dark circles under the eyes.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +forehead_wrinkleobjectResults of the head-lift test.
    ++valueinteger
  • 0
  • 1
  • With or without headlines.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +crows_feetobjectFishtail test results.
    ++valueinteger
  • 0
  • 1
  • With or without crow's feet.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +eye_finelinesobjectResults of the eye fine lines test.
    ++valueinteger
  • 0
  • 1
  • The presence or absence of fine lines under the eyes.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +glabella_wrinkleobjectResults of the interbrow line test.
    ++valueinteger
  • 0
  • 1
  • With or without interbrow lines.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +nasolabial_foldobjectResults of the forehead line test.
    ++valueinteger
  • 0
  • 1
  • With or without lines.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +skin_typeobjectSkin texture test results.
    ++skin_typeinteger
  • 0
  • 1
  • 2
  • 3
  • Type.
  • 0: Oily skin.
  • 1: Dry skin.
  • 2: Neutral skin.
  • 3: Combination skin.
  • ++detailsobjectThe confidence level of each classification.
    +++0objectOily skin information.
    ++++valueinteger
  • 0
  • 1
  • Oily skin.
  • 0: No.
  • 1: Yes.
  • ++++confidencefloatConfidence.
    +++1objectDry skin information.
    ++++valueinteger
  • 0
  • 1
  • Dry skin.
  • 0: No.
  • 1: Yes.
  • ++++confidencefloatConfidence.
    +++2objectNeutral skin information.
    ++++valueinteger
  • 0
  • 1
  • Neutral skin.
  • 0: No.
  • 1: Yes.
  • ++++confidencefloatConfidence.
    +++3objectCombination skin information.
    ++++valueinteger
  • 0
  • 1
  • Combination skin.
  • 0: No.
  • 1: Yes.
  • ++++confidencefloatConfidence.
    +pores_foreheadobjectForehead pore test results.
    ++valueinteger
  • 0
  • 1
  • With or without enlarged pores.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +pores_left_cheekobjectResults of the left cheek pore test.
    ++valueinteger
  • 0
  • 1
  • With or without enlarged pores.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +pores_right_cheekobjectResults of the right cheek pore test.
    ++valueinteger
  • 0
  • 1
  • With or without enlarged pores.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +pores_jawobjectChin pore test results.
    ++valueinteger
  • 0
  • 1
  • With or without enlarged pores.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +blackheadobjectBlackhead test results.
    ++valueinteger
  • 0
  • 1
  • With or without blackheads.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +acneobjectAcne test results.
    ++valueinteger
  • 0
  • 1
  • With or without Acne.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +moleobjectMole test results.
    ++valueinteger
  • 0
  • 1
  • With or without moles.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.
    +skin_spotobjectSpot detection results.
    ++valueinteger
  • 0
  • 1
  • With or without spotting.
  • 0: No
  • 1: Yes
  • ++confidencefloat[0, 1]Confidence.

    Example

    {
    "error_code": 0,
    "error_code_str": "",
    "error_msg": "",
    "request_id": "",
    "log_id": "",
    "warning": [],
    "face_rectangle": {
    "top": 0,
    "left": 0,
    "width": 0,
    "height": 0
    },
    "result": {
    "left_eyelids": {
    "value": 0,
    "confidence": 0.89
    },
    "right_eyelids": {
    "value": 0,
    "confidence": 0.89
    },
    "eye_pouch": {
    "value": 0,
    "confidence": 0.89
    },
    "dark_circle": {
    "value": 0,
    "confidence": 0.89
    },
    "forehead_wrinkle": {
    "value": 0,
    "confidence": 0.89
    },
    "crows_feet": {
    "value": 0,
    "confidence": 0.89
    },
    "eye_finelines": {
    "value": 0,
    "confidence": 0.89
    },
    "glabella_wrinkle": {
    "value": 0,
    "confidence": 0.89
    },
    "nasolabial_fold": {
    "value": 0,
    "confidence": 0.89
    },
    "skin_type": {
    "skin_type": 0,
    "details": {
    "0": {
    "value": 1,
    "confidence": 0.89
    },
    "1": {
    "value": 1,
    "confidence": 0.89
    },
    "2": {
    "value": 1,
    "confidence": 0.89
    },
    "3": {
    "value": 1,
    "confidence": 0.89
    }
    }
    },
    "pores": {
    "value": 0,
    "confidence": 1
    },
    "pores_forehead": {
    "value": 0,
    "confidence": 1
    },
    "pores_left_cheek": {
    "value": 0,
    "confidence": 1
    },
    "pores_right_cheek": {
    "value": 0,
    "confidence": 1
    },
    "pores_jaw": {
    "value": 0,
    "confidence": 1
    },
    "blackhead": {
    "value": 0,
    "confidence": 1
    },
    "acne": {
    "value": 0,
    "confidence": 1
    },
    "mole": {
    "value": 0,
    "confidence": 1
    },
    "skin_spot": {
    "value": 0,
    "confidence": 1
    }
    }
    }

    Code example