
Programmatically create user avatars with Imgix face detection - zacman85
http://blog.imgix.com/post/121937903499/face-detection
======
slashink
Constantly impressed of what the imgix people are releasing. Everything from
crazy rack builds to these slick API improvements.

------
MarkMc
Reading the headline I thought the program would produce stylised pics like
this:

[http://www.newyorker.com/contributors/](http://www.newyorker.com/contributors/)

Question: is it possible to have a computer draw such images?

------
comex
Hmm... I don't use imgix, but what if a site using it wants to give the user
the option to correct the crop? Since even a good algorithm won't do the right
thing 100% of the time, it would seem sensible to give the user one of those
'zoom to crop' widgets with the starting position detected by the algorithm,
but the described services sounds like it only gives you a static cropped
image as output - it neither provides a widget itself nor supplies the
parameters required to make one. (Or maybe it does and it's just somewhere
else in the documentation?)

~~~
miggi
(I work at imgix)

There are a number of different ways that crops can be made including custom
rectangle cropping via pixel or percentage values, provided as url string
parameters. The face zoom crop is just an additional feature to save some
steps for these kinds of scenarios. Ideally this feature can be built into an
application providing a user with a suggested face crop, and then allow a to
use the alternate custom crop that access a different set of parameters via
imgix. imgix is an on demand dynamic api for these operations.

------
chromakode
This is a really cool service!

One nitpick, though: in the live demo of the circular cropped face, it appears
that the face is slightly off center, whereas in the first promo image of the
article [1] it appears more zoomed out and perfectly centered. I tweaked the
url parameters a bit to try to mimic the promo [2], but the weighting of the
image feels a little off -- towards the top right. If the auto face detection
doesn't produce perceptually centered images consistently, that is an
important caveat, and the promo should reflect that.

[1]
[https://assets.imgix.net/blog/avatar.jpg](https://assets.imgix.net/blog/avatar.jpg)

[2] [https://assets.imgix.net/blog/woman-
hat.jpg?w=200&h=200&fit=...](https://assets.imgix.net/blog/woman-
hat.jpg?w=200&h=200&fit=facearea&faceindex=1&facepad=2.3&mask=ellipse&dpr=1.38)

~~~
miggi
Thanks for your comment. I updated the promo in the blog post to reflect the
exact result from: [https://assets.imgix.net/blog/woman-
hat.jpg?w=640&w=250&h=25...](https://assets.imgix.net/blog/woman-
hat.jpg?w=640&w=250&h=250&faceindex=1&fit=facearea&facepad=2.3&mask=ellipse)

~~~
chromakode
Thanks for updating the promo and sharing the parameters! Cheers :)

------
jand
I am a little bit unsure about this service. Although i find it technically
highly appealing, the resulting privacy concerns are not to be ignored
(personal opinion, tell me otherwise).

Can somebody clarify how you validate the claimed 'Article 29 of Directive
95/46/EC'-compliance? It seems to me that this service somehow relies heavily
on the well-behaviour of the clients.

~~~
skuhn
(I work at imgix)

To follow up on Kelly's response:

Our service is only for use with images provided by our customers, and our
terms of use specifically require them to have the associated rights for the
images they use with us.

From a privacy standpoint, I don't see a practical difference between a
website serving a user's profile photo directly from their S3 bucket vs.
engaging imgix to serve it (in a more optimal fashion).

We do take security and privacy seriously. We do not sell or in any way
utilize our customer's data for any purpose besides operating the service or
reporting analytics metrics back to the customer. We do maintain caches of
fetched and rendered images, but this is all done in a secure fashion.

Any online service has the potential for a data breach or unintended behavior,
and we're not immune to bugs or mistakes. So far, our track record is
impeccable, and we'll continue to take the appropriate steps to keep it that
way.

------
kevin
This is awesome! I think faceindex and facepad are my new favorite parameters.
Is there a reason you decided to make faceindex not zero-based?

Also, will there be other options for "fit"? Like waldoarea?

~~~
kellysutton
We use 1-index on different types of parameters in the system as well, so we
kept with that to remain consistent.

imgix takes finding Waldo very seriously. As a result, we will never offer a
parameter to kill the fun.

