Google愿景API:如何检测图像是绘制图像还是真实图片?

时间:2017-05-18 07:15:16

标签: java google-cloud-vision

我在检测图像时遇到问题,无论是绘画图像还是真实拍摄的照片。我已经检查了Google Vision REST-API文档,似乎没有提到它。

感谢您是否可以共享算法如何检测它。enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

大多数情况下,您可以搜索JSON响应的webEntities数组。我尝试了你的seconde图片,得到了以下结果:

"webEntities": [
  {
    "entityId": "/m/068jd",
    "score": 0.71919,
    "description": "Photograph"
  },
  {
    "entityId": "/m/04dtx9",
    "score": 0.71809,
    "description": "Flickr"
  },
  {
    "entityId": "/m/07glzq",
    "score": 0.71192,
    "description": "Sketch"
  },
  {
    "entityId": "/m/0k0pj",
    "score": 0.64715505,
    "description": "Nose"
  },
  {
    "entityId": "/m/01kr8f",
    "score": 0.41121,
    "description": "Illustration"
  },
  {
    "entityId": "/m/03c51f4",
    "score": 0.39885,
    "description": "Tagged"
  },
  {
    "entityId": "/m/01dv4h",
    "score": 0.37724,
    "description": "Portrait"
  },
  {
    "entityId": "/m/02csf",
    "score": 0.37219,
    "description": "Drawing"
  },
  {
    "entityId": "/m/0jjw",
    "score": 0.36841,
    "description": "Art"
  },
  {
    "entityId": "/m/03b19x",
    "score": 0.36128,
    "description": "Digital painting"
  },
  {
    "entityId": "/m/0mfx0",
    "score": 0.31653,
    "description": "Doodle"
  },

我认为除了在这些标签中搜索" paint"," drawing"," sketch" ...之外,没有什么简单的方法可以做到这一点。