News for hackers. Stuff that matters.
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by cbhl on Tuesday April 14, 2020 @10:31AM (#22866418)
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.
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by aripickar on Tuesday April 14, 2020 @11:48AM (#22867417)
Theoretically, augmenting the blurred image with some sort of random, changing offset for the HSV values on each frame would prevent supersampling attacks, right?
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by contravariant on Tuesday April 14, 2020 @12:35PM (#22868028)
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).

Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by KaiserPro on Tuesday April 14, 2020 @05:09AM (#22863991)
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.

Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by sorenjan on Tuesday April 14, 2020 @11:04AM (#22866851)
Does it work on GPUs other than Nvidia?
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by KaiserPro on Tuesday April 14, 2020 @04:11PM (#22870866)
depends, the model is agnostic, but I've not looked at backend as everything we have here is nvidia.
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by mister_hn on Tuesday April 14, 2020 @08:08AM (#22864894)
Also dlib performs very well (especially in C++)
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by snovv_crash on Tuesday April 14, 2020 @09:45AM (#22865856)
Nice and clean. However, it looks like the blur has some (blue?) banding artifacts in it. Am I the only one who sees that?
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by ihuman on Tuesday April 14, 2020 @09:49AM (#22865901)
I see it too. I wonder if it's including the blue border you see in one of the earlier debugging images.
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by snovv_crash on Tuesday April 14, 2020 @09:55AM (#22865972)
Hah, yes, I guess they're doing the blurring on the image with the box overlaid, instead of the original.
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by cbhl on Tuesday April 14, 2020 @10:35AM (#22866482)
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...

Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by poxrud on Tuesday April 14, 2020 @01:33PM (#22868855)
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.
Re:YouTube-Style Face Detect – Crop and Blur Using Python an... by willem19x on Tuesday April 14, 2020 @05:22AM (#22864048)
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 .