13 comments

[ 3.9 ms ] story [ 42.0 ms ] thread
nice work.

If you have GPU power, I recommend using tinyfaces (https://www.cs.cmu.edu/~peiyunh/tiny/) as your face detector. But you won't get realtime performance...

We used a similar model to detect and blur faces from raw user uploaded images at scale, using a multi-stage pipeline.

Also dlib performs very well (especially in C++)
Does it work on GPUs other than Nvidia?
depends, the model is agnostic, but I've not looked at backend as everything we have here is nvidia.
nice work! I liked low on CPU since nowadays its hard to implement things without a GPU(DL) for things that involve to multiple crops/blur .
Nice and clean. However, it looks like the blur has some (blue?) banding artifacts in it. Am I the only one who sees that?
I see it too. I wonder if it's including the blue border you see in one of the earlier debugging images.
Hah, yes, I guess they're doing the blurring on the image with the box overlaid, instead of the original.
Yes, I would also guess they're blurring the image with the box overlaid.

In a production implementation, you may also want to consider how you do edge handling here. (For faces in the middle of the frame, you want to use the real pixels from the underlying source image? Do you want to extend the pixels from inside the border? What are the aesthetic and information theory implications of each technique?)

https://en.wikipedia.org/wiki/Kernel_(image_processing)#Edge...

In my personal opinion, a naive gaussian blur could be susceptible to supersampling attacks, especially in a video where you can take samples over multiple frames. In a production implementation, I would consider adding some steps to mitigate this.
Theoretically, augmenting the blurred image with some sort of random, changing offset for the HSV values on each frame would prevent supersampling attacks, right?
Adding noise is definitely helps, but removing noise is more or less the main feature of supersampling.

If you didn't have any noise you could just simply invert the Gaussian blur, as blurring is a reversible operation (in theory, in practice you have noise, hence the need for supersampling).

Annoyingly it's hard to come up with a method that doesn't leak any information, although heavily pixelating the image (and optionally blurring the few leftover pixels) would probably make it infeasible to recover the original (except maybe with a truly stupendous amount of footage).

They are using the haar cascade face detection, which works well for when the person is facing the camera straight ahead. Doesn't work great when the face is at an angle.