Face Landmark 샘플 예제

Required Parameter

  • image
    • - Multipart form 메시지에 이름이 image라는 메시지로 이미지의 바이너리 데이터를 전달(파일 이름은 상관없음)
  • POST /nugufacecan/v1/landmark HTTP/1.1 Host: apis.openapi.sk.com Content-Type: multipart/form-data; boundary={boundary-text} app-id: {발급받은 App ID} Content-Length: 96703 --{boundary-text} Content-Disposition: form-data; name="image"; filename="test.jpg" Content-Type: image/jpeg {image binary data} --{boundary-text}--

    curl 예제

    curl -XPOST https://apis.openapi.sk.com/nugufacecan/v1/landmark -H "app-id: APPID" -F image=@image.jpg

    응답 예시

  • status_code : 200
    • - 얼굴 검출 성공
  • status_code : 400
    • - 얼굴 검출 실패 : 3004
    • - 사진 속 얼굴이 없는 경우
  • face landmark
    • - 얼굴 특징점 좌표 68 포인트의 x,y 좌표 정보를 리턴
    • - 얼굴점 순서는 아래 이미지의 순서를 따름
  • 390

    face attribute

    nametypeclass / 범위설명
    ageint0~100사진을 통해 유추한 나이 (apparent age)
    genderstrunknown, male, female아이의 경우 unknown으로 return
    expressionstrneutral, smile, sad, surprise, fear, angry, etc인간의 기본적인 6가지 감정을 토대로 top-1 표정을 return
    expression_scorefloat0 ~ 1top-1 표정의 confidence 값
    attributestrnormal, glasses, sunglasses, mask, occlusion, blur, not-face, profile-face얼굴에 포함된 다양한 속성 정보 중 top-1 속성을 return
    attribute_scorefloat0 ~ 1top-1 속성의 confidence 값

    예제

    { "faces": [ { "face_box": { "topLeftX": 194, "topLeftY": 77, "faceWidth": 229, "faceHeight": 313 }, "face_landmark": [ [ 189.69, 214.37 ], [ 194.09, 249.9 ], [ 202.2, 284.83 ], [ 215.81, 317.94 ], [ 237.28, 346 ], [ 266.32, 366.26 ], [ 299.08, 379.85 ], [ 333.98, 388.09 ], [ 368.75, 385.18 ], [ 390.02, 368.52 ], [ 401.58, 344.22 ], [ 410.99, 318.63 ], [ 417.02, 292.28 ], [ 421.04, 266.07 ], [ 422.1, 239.61 ], [ 417.52, 214.28 ], [ 411.32, 190.26 ], [ 240.61, 182.49 ], [ 256.92, 171.7 ], [ 276.35, 166.04 ], [ 297.02, 165.91 ], [ 316.83, 169.68 ], [ 363.05, 168.24 ], [ 373.59, 161.82 ], [ 385.65, 157.4 ], [ 397.77, 157 ], [ 407.4, 161.52 ], [ 345.58, 196.95 ], [ 352.44, 214.25 ], [ 359.66, 231.37 ], [ 366.69, 248.35 ], [ 339.73, 274.11 ], [ 352.67, 272.29 ], [ 362.87, 272.68 ], [ 370.45, 269.57 ], [ 377.64, 268.44 ], [ 264.17, 210.68 ], [ 273.68, 202.83 ], [ 302.3, 199.61 ], [ 312.58, 209.46 ], [ 301, 214.06 ], [ 273.97, 214.62 ], [ 365.19, 204.36 ], [ 371.99, 194.36 ], [ 394.6, 191.63 ], [ 401.63, 197.95 ], [ 395.85, 203.74 ], [ 375.38, 206.98 ], [ 318.03, 321.53 ], [ 331.82, 310.96 ], [ 348.42, 301 ], [ 360.29, 298.16 ], [ 371.43, 297.05 ], [ 383.17, 303.53 ], [ 388.09, 313.1 ], [ 384.92, 324.21 ], [ 376.8, 334.46 ], [ 363.05, 339.37 ], [ 345.33, 337.6 ], [ 329.87, 330.24 ], [ 324.08, 320.77 ], [ 340.26, 313.79 ], [ 359.68, 309.51 ], [ 374.23, 308.44 ], [ 384.15, 313.46 ], [ 375.34, 318.85 ], [ 361.17, 322.85 ], [ 341.12, 323.46 ] ], "face_score": 1, "expression": { "neutral": 0.99178928, "smile": 0.00136275, "sad": 0.00093973, "surprised": 0.00248117, "fear": 0.00110723, "angry": 0.00117349, "etc": 0.00170181 }, "age": 24, "gender": "female", "attribute": "normal" } ], "image_width": 540, "image_height": 577, "transaction_id": "X00003C905AW" }