全部产品
云市场

GetImage 获取图片

更新时间:2019-02-25 14:48:37

描述

从媒体集 Set 中获取一张图片的信息。

请求参数

Parameter Type Required Comment
Project string Y Project 名称。
SetId string Y 媒体集 Set 的唯一标识。
ImageUri string Y 图片的 OSS Uri ,如 oss://imm-test/testcases/face1.jpg
OSS 地址规则为:oss://bucket/object,其中 bucket和当前 Project 在同一区域的 OSS 桶名, object 为文件路径。

返回参数

Parameter Type Comment
RequestId string 该次请求的唯一识别码。
SetId string 媒体集 Set 的唯一标识。

其他字段参考 Image

示例

请求示例

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

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

成功返回示例

  1. {
  2. "FacesModifyTime": "2018-12-10T13:21:04Z",
  3. "RemarksC": "",
  4. "RemarksD": "",
  5. "ExternalId": "",
  6. "Faces": [
  7. {
  8. "Age": 29,
  9. "GenderConfidence": 0.9999929666519165,
  10. "Attractive": 0.82,
  11. "EmotionDetails": {
  12. "SAD": 0.042305514216423035,
  13. "CALM": 0.01735937036573887,
  14. "ANGRY": 0.0006993188872002065,
  15. "HAPPY": 0.9367565512657166,
  16. "SCARED": 0.00042747409315779805,
  17. "DISGUSTED": 0.000687692838255316,
  18. "SURPRISED": 0.00029603135772049427
  19. },
  20. "Gender": "MALE",
  21. "FaceConfidence": 0.9912033081054688,
  22. "Emotion": "HAPPY",
  23. "FaceId": "784a46dd2c7c178bbe9263eadad975465e87f28b1ae466d053a367168d13944d",
  24. "FaceAttributes": {
  25. "GlassesConfidence": 0.9999994039535522,
  26. "Glasses": "SUNGLASSES",
  27. "RaceConfidence": 0.9999105334281921,
  28. "Beard": "BEARD",
  29. "MaskConfidence": 1,
  30. "Race": "WHITE",
  31. "BeardConfidence": 0.9999915957450867,
  32. "FaceBoundary": {
  33. "Top": 58,
  34. "Height": 232,
  35. "Width": 233,
  36. "Left": 369
  37. },
  38. "Mask": "NONE"
  39. }
  40. },
  41. {
  42. "Age": 26,
  43. "GenderConfidence": 0.9999945759773254,
  44. "Attractive": 0.84,
  45. "EmotionDetails": {
  46. "SAD": 4.52852269572368e-11,
  47. "CALM": 0.0000013925485973231844,
  48. "ANGRY": 7.444113034327238e-12,
  49. "HAPPY": 0.9999986290931702,
  50. "SCARED": 3.7784754491898553e-11,
  51. "DISGUSTED": 4.140164600041629e-11,
  52. "SURPRISED": 1.5267035413657482e-9
  53. },
  54. "Gender": "FEMALE",
  55. "FaceConfidence": 0.9771245121955872,
  56. "Emotion": "HAPPY",
  57. "FaceId": "1a620304298194be4ce3257f04bd0c6deffb06606d69160beb20b1f140985085",
  58. "FaceAttributes": {
  59. "GlassesConfidence": 1,
  60. "Glasses": "SUNGLASSES",
  61. "RaceConfidence": 0.9999966025352478,
  62. "Beard": "NONE",
  63. "MaskConfidence": 1,
  64. "Race": "WHITE",
  65. "BeardConfidence": 1,
  66. "FaceBoundary": {
  67. "Top": 182,
  68. "Height": 166,
  69. "Width": 167,
  70. "Left": 159
  71. },
  72. "Mask": "NONE"
  73. }
  74. }
  75. ],
  76. "SourcePosition": "",
  77. "Exif": "{\n \"FileSize\": {\"value\": \"63362\"},\n \"Format\": {\"value\": \"jpg\"},\n \"ImageHeight\": {\"value\": \"480\"},\n \"ImageWidth\": {\"value\": \"640\"},\n \"ResolutionUnit\": {\"value\": \"2\"},\n \"XResolution\": {\"value\": \"72/1\"},\n \"YResolution\": {\"value\": \"72/1\"}}",
  78. "ImageUri": "oss://imm-test/testcases/test.jpg",
  79. "ImageWidth": 640,
  80. "ImageFormat": "jpg",
  81. "SourceType": "image",
  82. "ModifyTime": "2018-12-10T13:21:02Z",
  83. "FileSize": 63362,
  84. "Tags": [
  85. {
  86. "TagConfidence": 0.6040770411491394,
  87. "TagLevel": 1,
  88. "TagName": "动物"
  89. },
  90. {
  91. "TagConfidence": 0.6040770411491394,
  92. "TagLevel": 2,
  93. "ParentTagName": "动物",
  94. "TagName": "宠物"
  95. },
  96. {
  97. "TagConfidence": 0.6040770411491394,
  98. "TagLevel": 3,
  99. "ParentTagName": "宠物",
  100. "TagName": "猫"
  101. },
  102. {
  103. "TagConfidence": 0.6040770411491394,
  104. "TagLevel": 4,
  105. "ParentTagName": "猫",
  106. "TagName": "狸花猫"
  107. }
  108. ],
  109. "SourceUri": "oss://imm-test/testcases/test.jpg",
  110. "CreateTime": "2018-12-10T13:21:02Z",
  111. "RequestId": "072C5C98-1284-46C6-80FB-0DD5B4C5EA87",
  112. "FacesStatus": "Success",
  113. "TagsStatus": "Success",
  114. "FacesFailReason": "",
  115. "TagsFailReason": "",
  116. "RemarksA": "",
  117. "SetId": "test-set",
  118. "ImageHeight": 480,
  119. "RemarksB": ""
  120. }

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