5 ms·
I recently found myself in a position where I had to blur a ton of faces from multiple pictures (about 100/day). It’s really tedious to do it manually and some
by shivekkhurana 6y ago
I recently found myself in a position where I had to blur a ton of faces from multiple pictures (about 100/day).
It’s really tedious to do it manually and something like OpenCV shines.
We found a repo [1] with python code that automatically detects and blurs faces. This script was one of many, except it had a very high accuracy. Over 90%.
Removing exif data is a great idea.
[1] github.com/telesoho/faceblur
- draw_down 6y agoFor protest photos, removing face is not enough. This tool says “face and other identifying info”, but not clear what that means exactly
- elliekelly 6y agoI’m reminded of a reddit thread a while back about the US government paying a large sum to create an “unblur” function for photoshop. Someone in the comments was able to rotate and flip a photo and use the photoshop blur tool to effectively undo a blur for free. Perhaps it’s better to remove the section of photo with a person’s face instead? Or draw a shape over their face and flatten the image? It seems to me as long as the pixels are there the identifying data is there for anyone willing to spend the time and effort to find it. Edit: Apparently it was interpol, not the US government. I can't find the reddit thread but here's a NYT article with the photo: https://thelede.blogs.nytimes.com/2007/10/08/interpol-untwirls-a-suspected-pedophile/ https://thelede.blogs.nytimes.com/2007/10/08/interpol-untwir...
- dmos62 6y ago> rotate and flip a photo and use the photoshop blur tool to effectively undo a blur I'm not sure I follow. Did he say "enhance" at any point during the process?
- andrewprock 6y agoIn the case you posted, the image is not blurred. Instead pixels are simply moved from one location to another via the "swirl" effect. Very little pixel information is lost in this process, and if you can recover the position transformation, you can easily undo it.
- thephyber 6y agoThis makes 100% sense compared to "undoing a blur" by applying another blur (with negative radius?).
- wongarsu 6y agoBlurring isn't that good at destroying information, I think we mostly use it because it's the best looking censoring attempt. I would pixelate the faces to be just 4x4 giant pixels. It destroys nearly as much information as blacking them out while still not disrupting the image too much
- noja 6y agoI would guess that pixelisation for videos rather than pictures probably reveals more information the longer the video.
- GreedCtrl 6y agoYes, you would need to fix the pixels to an initial or average value. I remember Nintendo didn't do this a couple years ago, accidentally leaking the name of a new game mode [1] for Smash Ultimate. [1] https://twitter.com/Lattie9001/status/1027204063811850240 https://twitter.com/Lattie9001/status/1027204063811850240
- dehrmann 6y agoHere's a good read on undoing blurs: https://yuzhikov.com/articles/BlurredImagesRestoration1.htm https://yuzhikov.com/articles/BlurredImagesRestoration1.htm The short explanation is blurs are kernels that spread a pixel's value across other pixels, so knowing this, you can treat blurred pixel values as a system of equations to solve.
- SiempreViernes 6y agoIf final appearance is important, just blur a bunch of pictures of Trump and paste the appropriate one over the face. Or an unblurred face for that matter.
- egypturnash 6y agoShit, how about just pasting Trump’s face over everyone’s and not bothering to blur it? There’s probably enough pictures of him out there to match any angle and expression. Detect face, deep fake that area into Trump.
- siberianbear 6y agoThat wasn't really a "blur", though. A swirl like that is just moving pixels around. If know how the algorithm works, you can reverse it. Probably, it was done with a common program like Adobe Photoshop or Gimp or something. One could write a program that would just "unswirl" with various parameters and generate a bunch of images, and a human could pick out the one that looks like an unswirled image. If you can pick out the right paramaters to the unswirl, then no image information is lost. That can't be done with a blur. In a blur, pixels are merged or averaged together and information is lost. In some cases you could sharpen it a little, but it's still not going to be as good as the original image. In a really good blur, even the best sharpen algorithm isn't going to give you something that looks like an identifiable face.
- DanBC 6y agoThe swirl was done with photoshop, and Interpol got Adobe to create an unswirl tool. Interpol was involved because a man had been sexually abusing children, and photographing the abuse, and he released those photographs. https://en.wikipedia.org/wiki/Christopher_Paul_Neil https://en.wikipedia.org/wiki/Christopher_Paul_Neil
- MauranKilom 6y ago> That can't be done with a blur. In a blur, pixels are merged or averaged together and information is lost. I'd be careful with that assumption. The only thing that really loses information is the discretization back into 0-255 range, and that naturally loses very little information. If you consider the pixels as a large vector of values, you're effectively multiplying it by a matrix (plus discretization afterwards). If that matrix has (near) full rank, you can restore (close to) all the information. Consider an grayscale image with two pixels a = 10, b = 20. I apply a blur that transfers 10% of each pixel to the other one. I end up with 11, 19. I'm left with the information 0.9 a + 0.1 b = 11, 0.1 a + 0.9 b = 19. Clearly this system can be solved uniquely. Or equivalently, the blur matrix (and I don't mean the kernel but the full blur operation matrix) is [[ 0.9 0.1 ] [ 0.1 0.9]], which has full rank and is thus invertible. You'd be surprised at the amount of image detail that can be recovered by filtering when the original distortion function is known. See also https://en.wikipedia.org/wiki/Deconvolution https://en.wikipedia.org/wiki/Deconvolution and the lower half of that page's "See also" links section.
- symisc_devel 6y agoThere is also the PixLab API which let you automatically apply a blur filter for each detected face or any other target regions you want using only two Rest API endpoints. Python: https://gist.github.com/symisc/6ecdea76ba0d33d73ea7f23cade0d216 https://gist.github.com/symisc/6ecdea76ba0d33d73ea7f23cade0d... PHP: https://gist.github.com/symisc/d54808915093e5375fdcb841e436580d https://gist.github.com/symisc/d54808915093e5375fdcb841e4365... Docs: https://pixlab.io/cmdls https://pixlab.io/cmdls
- chaps 6y agoUploading images to a blurring service is probably a really bad idea. At least OP's link does it in-browser.