POST api/Biometric/Baidu/FaceRecognition/Distinguish
判断图片中的人脸数及是否为人脸。
Request Information
URI Parameters
None.
Body Parameters
IsFaceParmName | Description | Type | Additional information |
---|---|---|---|
image |
图片的base64编码 |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "image": "sample string 1" }
application/xml, text/xml
Sample:
<IsFaceParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm"> <image>sample string 1</image> </IsFaceParm>
application/x-www-form-urlencoded
Sample:
Sample not available.
application/bson
Sample:
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
判断图片中的人脸数及是否为人脸。
BaiDuFaceDetectBaseResultName | Description | Type | Additional information |
---|---|---|---|
error_code |
错误代码 |
string |
None. |
error_msg |
错误信息 |
string |
None. |
log_id | string |
None. |
|
timestamp | string |
None. |
|
cached | string |
None. |
|
result |
返回参数的集合 |
BaiDuFaceDetectResult |
None. |
Response Formats
application/json, text/json
Sample:
{ "error_code": "sample string 1", "error_msg": "sample string 2", "log_id": "sample string 3", "timestamp": "sample string 4", "cached": "sample string 5", "result": { "face_num": 1, "face_list": [ { "face_token": "sample string 1", "location": { "left": 1.1, "top": 2.1, "width": 3.1, "height": 4.1, "rotation": 5 }, "face_probability": 2.1, "angle": { "yaw": 1.1, "pitch": 2.1, "roll": 3.1 }, "age": 3.1, "expression": { "type": "sample string 1", "probability": 2.1 }, "face_shape": { "type": "sample string 1", "probability": 2.1 }, "gender": { "type": "sample string 1", "probability": 2.1 }, "glasses": { "type": "sample string 1", "probability": 2.1 }, "eye_status": { "left_eye": 1.1, "right_eye": 2.1 }, "emotion": { "type": "sample string 1", "probability": 2.1 }, "face_type": { "type": "sample string 1", "probability": 2.1 }, "mask": { "type": "sample string 1", "probability": 2.1 }, "landmark": [ {}, {} ], "landmark72": [ {}, {} ], "landmark150": [ {}, {} ], "quality": { "occlusion": { "left_eye": 1.1, "right_eye": 2.1, "nose": 3.1, "mouth": 4.1, "left_cheek": 5.1, "right_cheek": 6.1, "chin": 7.1 }, "blur": 1.1, "illumination": 2.1, "completeness": 3.1 }, "spoofing": 4.1 }, { "face_token": "sample string 1", "location": { "left": 1.1, "top": 2.1, "width": 3.1, "height": 4.1, "rotation": 5 }, "face_probability": 2.1, "angle": { "yaw": 1.1, "pitch": 2.1, "roll": 3.1 }, "age": 3.1, "expression": { "type": "sample string 1", "probability": 2.1 }, "face_shape": { "type": "sample string 1", "probability": 2.1 }, "gender": { "type": "sample string 1", "probability": 2.1 }, "glasses": { "type": "sample string 1", "probability": 2.1 }, "eye_status": { "left_eye": 1.1, "right_eye": 2.1 }, "emotion": { "type": "sample string 1", "probability": 2.1 }, "face_type": { "type": "sample string 1", "probability": 2.1 }, "mask": { "type": "sample string 1", "probability": 2.1 }, "landmark": [ {}, {} ], "landmark72": [ {}, {} ], "landmark150": [ {}, {} ], "quality": { "occlusion": { "left_eye": 1.1, "right_eye": 2.1, "nose": 3.1, "mouth": 4.1, "left_cheek": 5.1, "right_cheek": 6.1, "chin": 7.1 }, "blur": 1.1, "illumination": 2.1, "completeness": 3.1 }, "spoofing": 4.1 } ] } }
application/xml, text/xml
Sample:
<BaiDuFaceDetectBaseResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Result"> <cached>sample string 5</cached> <error_code>sample string 1</error_code> <error_msg>sample string 2</error_msg> <log_id>sample string 3</log_id> <result> <face_list> <BaiDuFaceDetectResult_Face> <age>3.1</age> <angle> <pitch>2.1</pitch> <roll>3.1</roll> <yaw>1.1</yaw> </angle> <emotion> <probability>2.1</probability> <type>sample string 1</type> </emotion> <expression> <probability>2.1</probability> <type>sample string 1</type> </expression> <eye_status> <left_eye>1.1</left_eye> <right_eye>2.1</right_eye> </eye_status> <face_probability>2.1</face_probability> <face_shape> <probability>2.1</probability> <type>sample string 1</type> </face_shape> <face_token>sample string 1</face_token> <face_type> <probability>2.1</probability> <type>sample string 1</type> </face_type> <gender> <probability>2.1</probability> <type>sample string 1</type> </gender> <glasses> <probability>2.1</probability> <type>sample string 1</type> </glasses> <landmark xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:anyType /> <d5p1:anyType /> </landmark> <landmark150 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:anyType /> <d5p1:anyType /> </landmark150> <landmark72 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:anyType /> <d5p1:anyType /> </landmark72> <location> <height>4.1</height> <left>1.1</left> <rotation>5</rotation> <top>2.1</top> <width>3.1</width> </location> <mask> <probability>2.1</probability> <type>sample string 1</type> </mask> <quality> <blur>1.1</blur> <completeness>3.1</completeness> <illumination>2.1</illumination> <occlusion> <chin>7.1</chin> <left_cheek>5.1</left_cheek> <left_eye>1.1</left_eye> <mouth>4.1</mouth> <nose>3.1</nose> <right_cheek>6.1</right_cheek> <right_eye>2.1</right_eye> </occlusion> </quality> <spoofing>4.1</spoofing> </BaiDuFaceDetectResult_Face> <BaiDuFaceDetectResult_Face> <age>3.1</age> <angle> <pitch>2.1</pitch> <roll>3.1</roll> <yaw>1.1</yaw> </angle> <emotion> <probability>2.1</probability> <type>sample string 1</type> </emotion> <expression> <probability>2.1</probability> <type>sample string 1</type> </expression> <eye_status> <left_eye>1.1</left_eye> <right_eye>2.1</right_eye> </eye_status> <face_probability>2.1</face_probability> <face_shape> <probability>2.1</probability> <type>sample string 1</type> </face_shape> <face_token>sample string 1</face_token> <face_type> <probability>2.1</probability> <type>sample string 1</type> </face_type> <gender> <probability>2.1</probability> <type>sample string 1</type> </gender> <glasses> <probability>2.1</probability> <type>sample string 1</type> </glasses> <landmark xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:anyType /> <d5p1:anyType /> </landmark> <landmark150 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:anyType /> <d5p1:anyType /> </landmark150> <landmark72 xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:anyType /> <d5p1:anyType /> </landmark72> <location> <height>4.1</height> <left>1.1</left> <rotation>5</rotation> <top>2.1</top> <width>3.1</width> </location> <mask> <probability>2.1</probability> <type>sample string 1</type> </mask> <quality> <blur>1.1</blur> <completeness>3.1</completeness> <illumination>2.1</illumination> <occlusion> <chin>7.1</chin> <left_cheek>5.1</left_cheek> <left_eye>1.1</left_eye> <mouth>4.1</mouth> <nose>3.1</nose> <right_cheek>6.1</right_cheek> <right_eye>2.1</right_eye> </occlusion> </quality> <spoofing>4.1</spoofing> </BaiDuFaceDetectResult_Face> </face_list> <face_num>1</face_num> </result> <timestamp>sample string 4</timestamp> </BaiDuFaceDetectBaseResult>
application/bson
Sample:
Binary JSON content. See http://bsonspec.org for details.