Face Detection Using Google Cloud Vision API

And count the number of faces in an image

Jeevan Anand
6 min readOct 26, 2017
Source: Google Cloud

In this tutorial, we will try to explore detecting number of faces in an image using Cloud Vision API part of Google Cloud Platform via Python.

Setting up Compute Engine

  • Please follow this article written by me for signing up to Google Cloud Platform.
  • For compute heavy tasks, recommend you to opt for GPU hardware which enables massively parallel processing capability, while creating Compute Engine. Below are the steps for selecting GPU, as we are just working on few images, we will stick to CPU in this article.
  • Create an instance, select appropriate name (which is unique), zone (which is near to you, to avoid latency issues).
  • If you click on “Customize” in the Machine type, you would be able to customize CPU, memory and also GPU.
  • Extend “GPUs”. You can select the number of GPUs and GPU type.

--

--