3 ms·
I've been digging through the latest related commit in the repo: https://github.com/signalapp/Signal-Android/commits/master https://github.com/signalapp/Signal-
by simias 6y ago
I've been digging through the latest related commit in the repo: https://github.com/signalapp/Signal-Android/commits/master https://github.com/signalapp/Signal-Android/commits/master
They appear to use "com.google.firebase:firebase-ml-vision-face-model:20.0.1" to detect the faces.
The actual blur appears to be done here: https://github.com/signalapp/Signal-Android/blob/514048171bf6a3530fbdf48e9d51b3cc135f2783/app/src/main/java/org/thoughtcrime/securesms/scribbles/UriGlideRenderer.java#L226-L239 https://github.com/signalapp/Signal-Android/blob/514048171bf...
Not sure what "ScriptIntrinsicBlur" stands for exactly, it appears to come from the android SDK itself: import android.renderscript.RenderScript;
EDIT: https://developer.android.com/reference/kotlin/android/renderscript/ScriptIntrinsicBlur https://developer.android.com/reference/kotlin/android/rende...
It's a gaussian blur filter with a radius of 25px if I understand the code correctly.
- pfortuny 6y agoOuch: gaussian blur might be invertible if you are not careful. That is why you need the explicit parameters of the convolution. Thanks for digging.
- greysonp 6y agoFWIW this was updated before release to also scale down the image before blurring it. We cut the size in half, or cap it to 300x300, whichever is smaller. This was to ensure that the effectiveness of the blur isn't reduced on higher-resolution images. https://github.com/signalapp/Signal-Android/blob/master/app/src/main/java/org/thoughtcrime/securesms/scribbles/UriGlideRenderer.java#L238 https://github.com/signalapp/Signal-Android/blob/master/app/...
- pfortuny 6y agoYou should perform a non-invertible blur though... Or even easier, use the same noise image for all faces. EDIT: come to think of it, you can generate random noise using a palette from the color in the blur area (say, take four or five colors and mix them). Applying convolutional blur for anonymizing is very very risky. Because you might end up with something either invertible or nearly so.