Google Cloud Vision API可以贴标签吗? [英] Can Google Cloud Vision API label faces?

查看:333
本文介绍了Google Cloud Vision API可以贴标签吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在将google cloud-vision api用于一个项目.我想为面孔分配一个唯一的ID,以便它自动检测任何图像包含哪些ID.这样我就可以知道图像中的人.

I am currently using google cloud-vision api for a project. I want to assign a unique ID to a face, so that it automatically detects which IDs any image contains. This way I can know which person is in the image.

Cloud-vision是否可以区分面孔并为面孔返回一些唯一的ID?

Can cloud-vision distinguish faces and return some unique ID for a face?

推荐答案

,正如Armin所述,Google Vision API不支持面部识别或面部验证.它仅对图像执行面部检测.您实际上可以做的是使用tensorflow完成所需的操作.让我为您解释:

NO, and as Armin has already mentioned, Google Vision API doesn't support Facial Recognition or Face verification. It only performs face detection on an image. What you can actually do is to use tensorflow to complete what you want. Let me explain for you:

典型的人脸识别系统(管道)由两个阶段组成:

A typical face recognition system (pipeline) consists of couple of phases :

  1. 人脸检测:您可以使用Google Vision API来做到这一点
  2. 面部特征提取:您可以通过使用tensorflow提取面部特征并从步骤1中获取每个检测到的面部的面部嵌入来进行.提取面部特征可以通过使用预先训练的模型来完成,该模型在大型数据集(例如, (VGGFace2,CASIA-WebFace).
  3. 人脸识别(识别或验证):您可以使用来实现
    • Tensorflow可以从办公桌上读取面部嵌入(在第2步中获取并保存)(也可以从数据库中获取,这取决于您将其保存在何处)
    • python中的
    • 支持向量机( SVM )可以进行多类分类.
  1. Face detection: which you can do it by using Google Vision API
  2. Facial features extraction: which you can do by using tensorflow to extract facial features and get face embeddings of each detected face from step 1. Extracting the facial features could be done by using pre-trained model which are trained on large datasets like (VGGFace2, CASIA-WebFace).
  3. Face recognition (identification or verification): which you can achieve by using
    • Tensorflow to read the face embeddings (which are fetched and saved in step 2) from the desk (it could be also fetched from a database, it depends where you have saved them)
    • Support Vector Machines (SVM) in python to do multi-class classification.

(IMO)人脸识别系统中最重要的事情是正确检测人脸并正确提取人脸特征.第三步只是分类问题,它可以通过多种方式完成,例如,您还可以使用面部嵌入之间的欧几里得距离来了解两个面部是否相似(识别).

(IMO) The most important things in face recognition systems are correctly detecting faces and correctly extracting facial features. The third step is just a classification problem and it can be done in many ways, you can also for example use the Euclidean distance between the facial embeddings to know if two faces are similar or not (identify).

对于第二步和第三步,您可以看一下FaceNet https://github.com/davidsandberg /facenet 这是一个很好的例子,说明如何基于张量流开发自己的面部识别系统.

For the second and the third step you can take a look at FaceNet https://github.com/davidsandberg/facenet which is great example how you can develop your own facial recognition system based on tensorflow.

这篇关于Google Cloud Vision API可以贴标签吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆