Face Detector Plugin

is there a plugin that you can install to detect faces when a user uploads an image? We want to enforce having a profile picture but some of our users that sign up/ login with Gmail don’t have any profile pictures for us to attach to their profile pictures.


Don’t think there’s a plugin, but Microsoft Azure has an API that might do the trick: https://azure.microsoft.com/en-us/services/cognitive-services/face/

1 Like

@petter, thanks for getting back to me, would we use the bubble API connector to connect with this azure api?

Yes, I don’t know the specifics of this API, but usually the API Connector will do the trick.

@petter thanks. Will let you know how this goes.

1 Like

A couple things to consider:

  • Face detection is not the same as face recognition. It sounds like you’re looking for the latter.
  • I, for one, would be thoroughly annoyed if my mug (or an image that some AI thought was my mug) appeared in my profile without my explicit consent.

@sudsy thats right, we want to recognize faces and make sure user’s profile pictures aren’t these random generated gmail letter faces…

@sudsy I rather thing he’s looking for face detection and not face recognition.
He simply want to know if an uploaded photo contains a human face. Not a any particular human (that will be recognition) but any human face.

@calvin1 if you google facial detection api you will likely find one that meets your need.
You could even create your own face detection api hosted on Algorithmia if you’re comfortable with some basic coding.
I know there are already some existing face detection api in algorithmia but they may not be free.

1 Like

If all you’re interested in is to detect if an image is not one of those gmail letter faces then that’s even a simple problem.
You can simply count the number of colors in the image and if its two, then it’s one of those gmail placeholder images. Those images are always made up of a background colour and white single or double character.
There are many libraries including client-side ones that can quickly count number of colors in an image in plain javascript.

Now note that such an implementation will accept anything other than the gmail placeholder images.
So someone having the picture of a tree will still be seen as a valid profile picture. Maybe thats what you want because people use different images as profile picture. Case in point, my profile picture in this forum.
Even if you went with a true face recognition algorithm, a lot of the basic fast ones can only accurately detect frontal faces.

Personally I will recommend you go with the color detection approach I describe since you shouldn’t what kind of photo someone wants to use as their profile photo. I for one will be angry if whatever algorithm you’re using refuse to accept my profile picture on this forum as a valid photo.

An alternative to the color detection method is simply a letter/character recognition with tesseract.


This might help, it detects the main contents of images:

@marcusandrews that can work.
Only consideration is that Clarifai is not a free service.
Also I’m concerned when a service is going to index images i sent to it. From the plugin description:

Clarifai’s Search API takes image inputs from a user and creates a search index, which users can later search by keyword or by inputting other images.

Are you going to get your users consent before sending their photos to a third-party service that may index their photos?
I think his problem is very simple and he can cook up some simple local solution himself.

Never really looked into that plugin, thanks for clarifying though.

Oh, I see. I misunderstood. I thought the idea was to try to identify that specific user in an uploaded photo.

There appear to be quite a few services which offer APIs for facial recognition and detection.

That might work much of the time, but I can see it returning a false positive for certain logos and such.

EDIT: (I wonder if anything could be gleaned by simply examining the URL and/or filename.)

Hi @calvin1,

I may suggest the AWS Rekognition - Faces Recognition plugin, I think it fulfils your requirements :slight_smile:.

Alternatively, if you are just looking for whether a human face is on your picture, both Google Vision - Image Recognition and 🖼 [New Plugin] AWS Rekognition - Image Recognition plugins would suit your needs !

Do you know how to set it up on algorithma so that the submission of the photo, has face detection? Making it so the users can only upload photos of their face?