全部产品
云市场

DetectImageFaces 人脸检测分析

更新时间:2019-02-25 14:47:30

描述

传入一张图片 ,检测其中的人脸。该功能不依赖媒体集 Set 。

请求参数

Parameter Type Required Comment
Project string Y Project
ImageUri string Y 图片 OSS URI,如 oss://imm-test/testcases/test.jpg
OSS 地址规则为:oss://bucket/object,其中 bucket和当前 Project 在同一区域的 OSS 桶名, object 为文件路径。

返回参数

Parameter Type Comment
RequestId string 该次请求的唯一识别码。
Faces []Face 人脸列表
ImageUri string 图片 URI

示例

请求示例

  1. POST https://imm.cn-shanghai.aliyuncs.com
  2. ?Action=DetectImageFaces
  3. &Project=test-project
  4. &ImageUri=oss://imm-test/testcases/test.jpg
  5. ...

此处的示例,目的是展示关键参数,还需要其他的公共参数才能正常调用,推荐使用 SDK 来发送 API

成功返回示例

  1. {
  2. "RequestId": "657DE4A1-AF37-4502-A463-E5D660E458C4",
  3. "Faces": [
  4. {
  5. "Age": 29,
  6. "GenderConfidence": 0.9999929070472717,
  7. "Attractive": 0.82,
  8. "EmotionDetails": {
  9. "SAD": 0.042472198605537415,
  10. "CALM": 0.01739625819027424,
  11. "ANGRY": 0.0007031452259980142,
  12. "HAPPY": 0.9365360140800476,
  13. "SCARED": 0.00042889462201856077,
  14. "DISGUSTED": 0.0006919803563505411,
  15. "SURPRISED": 0.00029711987008340657
  16. },
  17. "Gender": "MALE",
  18. "FaceConfidence": 0.9912033081054688,
  19. "Emotion": "HAPPY",
  20. "FaceId": "475c552af41187ddc593785bac3d05698aa95073857a501b160b130e73194221",
  21. "FaceAttributes": {
  22. "GlassesConfidence": 0.9999994039535522,
  23. "Glasses": "SUNGLASSES",
  24. "RaceConfidence": 0.9999100565910339,
  25. "Beard": "BEARD",
  26. "MaskConfidence": 1,
  27. "Race": "WHITE",
  28. "BeardConfidence": 0.9999916553497314,
  29. "FaceBoundary": {
  30. "Top": 58,
  31. "Height": 232,
  32. "Width": 233,
  33. "Left": 369
  34. },
  35. "Mask": "NONE"
  36. }
  37. },
  38. {
  39. "Age": 26,
  40. "GenderConfidence": 0.9999946355819702,
  41. "Attractive": 0.84,
  42. "EmotionDetails": {
  43. "SAD": 4.490751867591847e-11,
  44. "CALM": 0.0000013855681118002394,
  45. "ANGRY": 7.354262164527281e-12,
  46. "HAPPY": 0.9999986290931702,
  47. "SCARED": 3.7438101230247156e-11,
  48. "DISGUSTED": 4.075151674443056e-11,
  49. "SURPRISED": 1.5144473453077012e-9
  50. },
  51. "Gender": "FEMALE",
  52. "FaceConfidence": 0.9771245121955872,
  53. "Emotion": "HAPPY",
  54. "FaceId": "e95764db9598028b745ac61273aee5f580370fd1907f6409981753f5667cf303",
  55. "FaceAttributes": {
  56. "GlassesConfidence": 1,
  57. "Glasses": "SUNGLASSES",
  58. "RaceConfidence": 0.9999966621398926,
  59. "Beard": "NONE",
  60. "MaskConfidence": 1,
  61. "Race": "WHITE",
  62. "BeardConfidence": 1,
  63. "FaceBoundary": {
  64. "Top": 182,
  65. "Height": 166,
  66. "Width": 167,
  67. "Left": 159
  68. },
  69. "Mask": "NONE"
  70. }
  71. }
  72. ],
  73. "ImageUri": "oss://imm-test/testcases/test.jpg"
  74. }

若在使用中有疑问,请参考 FAQ,或者进入 钉钉用户群 实时交流。