622 points · by dsr12 · 6y ago · 379 comments
1) The code, for now, runs locally. This is good. To avoid the possibility of the code being tampered with at a later day (for example, it could be modified to send copies of the image to a server), download the webpage and use the saved copy, not the live copy.
2) Do not use the blur functionality. For maximum privacy, this should be removed from the app entirely. There are _a lot_ of forensic methods to reverse blur techniques.
3) Be weary of other things in the photograph that might identify someone: reflections, shadows, so on.
4) Really a subset of 2 and 3, but be aware that blocking out faces is often times not sufficient to anonymise the subject in the photo. Identifying marks like tattoos, or even something as basic as the shoes they are wearing, can be used to identify the target.
Could you train a model with your own face as a start, and then run your photos through an existing consumer face-swap app? Or perhaps use a celebrities likeness? I wonder how much the visual 'likeness' of a stranger is worth.
But remember that facial recognition is far from the only way to identify protesters. Assume that the full power of the DHS is there (drones, Stingrays / IMSI catchers, license plate readers)
Even images without chain of evidence reliability might get you on "a list"...
Do you reckon cops invited to "run wild" with clearview ai _AREN'T_ gonna be running protester photos through it to see who to "profile"?
https://www.buzzfeednews.com/article/ryanmac/clearview-ai-co...
Any examples? You can't reverse it if the data is gone.
One method is the Lucy-Richardson deconvolution [1], which is an iterative algorithm, and here [2] is the best practical example I could find right away. Unfortunately the text is not in English, but the illustrations and formulae might be enough to give some intuition of the process.
[1] https://en.wikipedia.org/wiki/Richardson%E2%80%93Lucy_deconv...
Deconvolution was used to fix the Hubble Space Telescope.
https://en.wikipedia.org/wiki/Hubble_Space_Telescope#Flawed_...
Even more impressive, you can see around corners with similar reconstruction techniques
https://graphics.stanford.edu/papers/dual_photography/
https://www.quantamagazine.org/the-new-science-of-seeing-aro...
That's the problem - the data you think is gone isn't gone. High frequencies are gone.... but you left all the low frequencies, didn't you? You can read a face from the low frequencies.
How about replace each face with a "this is not a person" AI generated face, then blur+mosaic. Or just a non-person face using a deepfake system that matches the facial expression?
But instead, "reverse" is being used here to mean something like analyze or to apply countermeasures to defeat the obfuscation.
https://lifehacker.com/how-to-uncover-blurred-information-in...
E-13B is a bit of an ideal use case for this method because of the highly constrained character set used on checks and the unusually nonuniform density of E-13B. The same thing can be done on text more generally but gets significantly more difficult.
Then again, maybe groups of people can be associated together, and a poor match is good enough given other clues.
So, much better to be safe than sorry.
I'm not sure if I had a particular good point to make, other than that blurring does remove information that cannot easily be reversed. You can probably make very convincing reconstructions, but they might not look like the original person.
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
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-untwir...
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.
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 and the lower half of that page's "See also" links section.
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
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.
I'm not sure I follow. Did he say "enhance" at any point during the process?
Python: https://gist.github.com/symisc/6ecdea76ba0d33d73ea7f23cade0d...
PHP: https://gist.github.com/symisc/d54808915093e5375fdcb841e4365...
Docs: https://pixlab.io/cmdls
$ exiftool -all= foo.jpg
And even better, save image first as .bmp or other format that doesn’t support metadata. Then reload and convert to jpeg, and run the exiftool on this image.
[0] https://www.linux-magazine.com/Online/Blogs/Productivity-Sau...
Here is how you read the existing metadata:
exiftool -a -u -g1 IMG_0708.JPG | more
... and here is how you scrub it: exiftool -all= IMG_0708.JPG
(you could read it again, after scrubbing, to demonstrate it is gone ...) stripexif ()
{
exiftool -all= "$@"
}I nearly always scale+compress photos that leave my possession, and usually using convert, so adding -strip is a nice streamlined way of doing all at once.
Anonymizing photos of the violent ones is therefore likely to support their actions by making accountability less likely. To scrub ethically, limit it to the non-violent protestors. To support non-violence, better to help identify the violent people -- police or civilian -- the opposite of anonymizing them.
I even saw a video where one of them killed a guy while three others watched.
Who is getting away with what? They are under arrest right now. Or do you want them dragged through the streets?
One of the four officers is charged.
With a lesser charge than some are calling for (third-degree instead of first-degree murder).
I don't think the other three officers are under arrest right now. Some people regard them as involved and getting off too lightly so far.
Who is "they"?
The thing is people are already being held accountable for their skin tone, and the likelihood of changing your behavior when you have lived your entire life in an environment of constant oppression for fear of being identified in a protest is marginal, specially during catharsis, otherwise you wouldn't see for instance people burning police cars in front of a camera.
Keep in mind also that many (most?) of these "violent protestors" are simply reacting against violent cops in a power trip. I can't say I wouldn't react violently against a cop intentionally running over me and others with its SUV, but I can say that I would be thankful if my face was anonymized no matter how I reacted.
Actually, a lot more whites are killed by cops than blacks. And before you say that's because there are more white people than black people, blacks represent only 13% of the population but commit 52% of the crime. So, you are less likely to get killed committing a crime as a black person than as a white person.
https://www.statista.com/statistics/585152/people-shot-to-de... https://www.channel4.com/news/factcheck/factcheck-black-amer...
You've made a number of unfounded leaps on top of that: That "Black people commit 52% of crime." This is wrong in several ways. You're assuming that conviction rates accurately represent rates of crimes, and also that "all crime" has the same statistics as homicide. But instead, we see that black people are convicted of only 27% of overall crime. That's including the fact that certain categories are known to be racially disparate in conviction and sentencing - e.g. white & black people use marijuana at approximately equal rates, yet black people are nearly 4 times as likely to be arrested for it. That the people killed by cops were all committing a crime at the time. I don't have statistics on hand for this, but a well-known counterexample is Tamir Rice.
Odd, my dogs are barking
I should add: In all of the streams and pictures I've seen, all (most?) the looters or violent people were wearing masks, ensuring their anonymity. If anybody's being protected by measures like this, it's your average peaceful protestor.
Yes, deliberately preventing anyone from providing care or defense for a person who's being murdered makes you an accomplice to the murder.
>If your city charged these cops justly then nobody would be burning it down
Doubtful. Here's a video of East 4th street in downtown Cleveland being destroyed by pillagers last night: https://www.news5cleveland.com/news/local-news/cleveland-met...
There's over a thousand service industry workers who've already been out of work for months due to the pandemic that the businesses on this street support. Many of them have struggled to get enough financing to even reopen, some have had to permanently close. Many (possibly most) of these businesses are destroyed and can not afford to rebuild. Who should the city of Cleveland have charged justly to prevent this? How many more innocent and unrelated people's livelihoods need to be burned down and how many more times (this has happened before, more than once)? There seem to be a lot of accomplices in the video.
https://www.theroot.com/ferguson-activists-are-dying-and-it-...
"Crawford was found shot to death Thursday night in his car, just like activist Darren Seals in 2016 and protester DeAndre Joshua the night of the Ferguson verdict in 2014. The latter two had gunshot wounds to the head and their cars were lit on fire. Crawford, it is believed by police, shot himself in the back seat of his car either in an attempted suicide or by accident."
In a situation where police feel justified to kill extra-judicially over a possibly fake 20 dollar bill, what hope do we have that protesters won't be targeted in unfair ways? Or worse, that organizers won't be hunted down like animals and murdered like in Furguson? It would be unethical to not do everything in your power to protect those in this position.
secondly how do you plan to identify violent vs non-violent protesters from a static image? How would you find their identity afterwards? There is overwhelming evidence to suggest these methods are at best ineffective and at worst racist, and in either case will lead to innocent people being charged.
https://www.newscientist.com/article/2109887-police-mass-fac...
From my time in Portland, working at the courthouse as a court clerk during the Occupy movement, when hundreds of transient “protesters” camped out in the park, it is not surprising that some of those folks would OD or end up dead for reasons entirely not related to protesting but instead related to their unfortunate life circumstances. I do not know if the same is true of Ferguson, but the article does not seem to provide any evidence of calculated retaliation against protesters.
Only responding to this part. I've seen enough people get dox'd on the internet from static photos that I continue to be impressed each time by the skill of volunteer/angry people on <internet forum>
Sometimes the "other side of the story" (as White Supremacists would say) does NOT need to be heard. Not now.
that's exactly what the murderers want to achieve
Edit: For those downvoting, is there a problem with considering this possibility? I think it's incredibly unlikely, but ignoring black swans can one day come back to bite you. Ideally, everyone should be aware of the theories out there, however ludicrous, on the off chance that they are correct and require critical and swift action.
That contains as much conspiracy as "somebody is hunting down the protestors".
There are simpler possible explanations, I believe, e.g. people who join (or organize) riots are usually not the stable boring kind that live long, predictable lives full of planning and quiet afternoons. Drugs, crime, violence and mental health issues are probably more prevalent in that group than in the general population.
It is better that ten innocent persons suffer than that one guilty escape.
-- Bizzaro William BlackstoneIt doesn't matter that it theoretically all happen in the browser. You can serve different versions to different IPs etc. Every heuristic in me would be screaming don't use that if I would have a need for such tool.
The only way an attack vector is possible here is if you think GitHub themselves would maliciously inject an altered version of the code in the repo, and even then you'd be able to see the code and network requests in your developer tools.
Just distribute the code for local execution? Sure, it's less accessable for the target audience, but it is more transparent.
But what else is new? Most users are willing to sacrifice privacy and security for convenience. That's how we got into this whole mess.
I mean, I get what you mean, but this is literally what's already happening. It's distributed via HTTP, and executed in your browser. You can save it (Ctrl-S, still a thing browsers do), and -- since it's distributed in source form -- easily inspect it, or reopen it later, in a different browser on a different computer. A zip file of the same thing is available on the repo (it's a zip of the repo).
If you don't trust that it won't access the web, disable your internet while running it or some such, as with other code you don't trust. If you don't trust it to mess with your files, well, you're in luck because modern browsers are probably the best audited sandbox out there.
I say I get what you mean, because most people won't do any of it. Instead of saving the page and running what they trust or have verified to be a safe snapshot of the page, they'll reopen the hosted version, trusting that it's still safe, even though the page may have been replaced with one that does upload their files.
A better example is Protonmail, a secure email service. It has a nice web client and there is an 3rd party desktop/electron version of the same size called Electronmail. While both essentially run identical code, the electron version is more secure because even Protonmail insert a backdoor for a single or # of users. They would have to at least publish the backdoor in the vanilla code at which point, the maintainers of Electronmail will probably raise the alarm.
[1] https://developer.mozilla.org/en-US/docs/Web/Security/Subres...
https://chiselapp.com/user/rkeene/repository/bash-drop-netwo...
In this case its possible that the site encodes the data back in to the image but that seems unlikely.
(Sorry for commenting on you twice in this thread--I promise I'm not trying to follow you around. I'm all about dissecting the quality of a system or toolchain! A false sense of security can be more dangerous than naïveté! Caution and skepticism are often our only protection! Trusting random websites is Not a Good Idea! But, security tools average people can't use are also meaningless here.)
See also https://haveibeenpwned.com/Passwords.
https://www.troyhunt.com/ive-just-launched-pwned-passwords-v...
Users are disclosing to the website what they hope has not been discovered by someone else -- e.g., usernames and email addresses, or in this case photos, they hoped to keep private. Unfortunately, the website is "someone else".
It could be useful to protect people from relatiation under an authoritarian government, such as in Hong Kong. I dislike the idea of a government using mass automatic identification, that could be used again by authoritarians for terrible goals. I also dislike the idea of the opposite and using automatic anonymizing to protect criminals during riots. We're probably going to keep seeing an arms race in this, with good and bad actors on all sides.
Showing the face of a protestor smashing in a window will not lead to that protestor being brought to court and handed a sentence for community service, a fine, or some light jail time. It will lead to extrajudicial retaliation and possibly death.
Again, it would be nice if that weren’t the case and we could trust law enforcement to behave appropriately. But given that they and their supporters are known to hunt down and kill people who protest against them, we cannot in good conscience make it easier for them to do so.
If we are to trust the cops again, they need to show us they are worthy of trust. And they sure aren’t doing that right now.
What? I’m not sure what country you’re talking about. Are you talking about America? Our police find rioters and shoot them dead in the street?
Man, I feel like you live in a different country than me, and I’ve lived in 9 states in every part of the country, and across nearly every income brackets (save extreme poverty or extreme wealth) and feel like your perspective is so disconnected from reality.
Yeah, white America. We call it "fascism" when that gets ruled the same way black America always has been.
This is the country you live in, if you want ignore that fact its on you.
Would you like to provide an example of someone being killed for smashing a window?
What I've seen in the past 2 days is that the police are doubling down on being oppressors, not public servants. I expect it to get much worse before it (possibly) gets better. And it may not get better.
Protest turned to riots, literally burning down police stations. Police action wasn't until much later, and they were perfectly fine with the daytime, civil unrest. During the evening, the 'protestors' went home and the agitators came out to fight police, and that's that.
When people are looting every store on a street, the police have no choice but to physically move in. There are very few options for anyone at that point.
Good. Black people factually live under an authoritarian regime in the US.
The problem in this case is that its institutionally racist towards, and extrajudicially assassinates, black people with impunity.
We must be more precise because otherwise it allows _this_ to happen.
Peaceful protest is being squashed and de-legitimized. This is the flowering of fascism.
This is really not true. The protests turned quickly into riots and the more heavy-handed police tactics literally started only days later.
The rioters burnt down a police station for gosh sakes.
There are no 'protetors' clashing with police in a violent way. I think decent folks move on after curfew.
It's the adventure-seeking rabble, those out for some photos, who want to see the action first hand, who might want to light something in fire. The people not dispersing at curfew I don't think are ideological or protesters in any sense of the word. It's just youth in antagonism for every and all reasons, as old as time.
> “Like snowflakes, no two smartphones are the same. Each device, regardless of the manufacturer or make, can be identified through a pattern of microscopic imaging flaws that are present in every picture they take,” says Kui Ren, lead author of a new study describing the smartphone-identifying technology. “It’s kind of like matching bullets to a gun, only we’re matching photos to a smartphone camera.”
https://www.futurity.org/smartphones-cameras-prnu-1634712-2/
[1] https://www.linkedin.com/posts/creativetech_tensorflowjs-bod...
This depends a lot on the implementation details. If you blur an image using arbitrary-precision real numbers, then blurring is invertible. If you add a bit of random noise, or quantize your pixels into a finite-precision data type, then it becomes essentially one-way, and you cannot recover the original image.
Technically you are correct - you cannot recover the exact original image. The same is the true for saving an image as JPEG. But the question at hand is whether you can still recognize faces, not whether you can restore a byte-for-byte of the original. And whether JPEG or blurring, the answer is generally "yes".
It does depend on the implementation (and whether you know the implementation) how close you can get.
In the case of upscaling an image, deconvolution involves looking for images which, when scaled down, resemble the original image being upscaled. That kind of pre-image approach can be applied to blur as well (if the blur process is deterministic).
If you’d like to have a smooth looking censored image you can then blur the mosaic result to have a smooth transition between the censored and original image.
If you simply blur or simply downsample there’s a significant ability to recover data or iterate over data to recover likely inputs. Other posts have discussed deconvolution, but think of a downsample as a hash - you can build a rainbow table of inputs, easily for numbers, with more difficulty for faces. If you have a limited pool of “suspects” this technique can work well. Just as with hashing, you should add a salt to the image before downsampling or blurring to make recovery of the original input more difficult. In this case the “salt” is random noise.
So, at least in my town, it looks a lot like violent protests of the sort you decry do help. Certainly nothing else has done as well.
In all these riot situations, it is portrayed as the poor sticking it to the rich, who presumably are using the police to oppress the poor. But I suspect that in reality it is mostly the poor becoming even more downtrodden by the criminal elements, and the rich remain unaffected. Perhaps the rich even profit a bit from what happens, such as politicians winning more government money to "help with all the troubles".
By contrast, nothing will bring back George Floyd, let alone the countless black people afflicted by police brutality that weren't caught on camera. With millions still unemployed and a sense that society has left so many behind, COVID in the US was a powder keg looking for a match, and a breakdown of order shouldnt really be unexpected.
It’s probably also worth asking: when have violent protests ever helped the cause?
I think that the violence of the protests helped to get Derek Chauvin arrested. But I’m not sure that continued violence will help the broader movement.
MLK, Letter From a Birmingham Jail
Some agitators are anti-government. Others are full on anarchists. Others want to bait people into race wars (a la the Turner Diaries, cited by white nationalist mass shooters and the Oklahoma City bomber).
The problem is converting that into something tangible that furthers their goals.
Is it because people are committing more crime than the original offense?
Nah. They would never do anything like that.
As everyone knows, all police are paragons of moral excellence in every country in the world at all times.
Governments have definitely never, ever gone after innocent protesters.
</sarcasm>
i.e. how skewed are different professions w.r.t. morals?
Do you think lawyers are worse? Politicians? The Media? Where do police fit into this spectrum?
Are all police bad? What percentage?
<perspective> (you can close this tag if you wish)
With power comes a responsibilty to be better than others, and if that's not something you can count on, which it isn't, we need to protect others.
If you want to make sure the actual, original image gets stored safely on another device automatically, use SyncThing or Resilio Sync.
This is NOT true, at least for the "original" setting. Upload an image, download it again - the checksums are identical.
If you modify the time/date or add comments within Google Photos, that new information is kept in a .json file instead of the exif data, but Google NEVER modifies the original photo if you select "original" quality.
If you fetch your image via takeout or via the API, the image bytes are the same, but the EXIF headers have been changed.
I've tried in both a standard Gmail account and a custom domain. Same behavior.
Are you saying your file SHA is the same from your device and your takeout?
I wonder if I am seeing US-account-exclusive behavior?
I can see some diligent prosecutors going back and looking at data to gather evidence.
everything you said was good except this. google is not your (or the protesters') friend.
All I was really concerned about was getting rid of metadata tied to my phone.
https://0xacab.org/jvoisin/mat2/ https://0xacab.org/jvoisin/mat2-web/
Twitter often shows geodata for users, but I think that's app-based and not derived from photo uploads.
http://www.ws.binghamton.edu/fridrich/Research/double.pdf
http://www.ws.binghamton.edu/fridrich/Research/EI7254-18.pdf
If you're worried about attracting that kind of attention, use a burner device.Other things are external to the EXIF but could be combined with it. The sequence numbers in the filenames are the most obvious signal. The precise number of megapixels of the image might also tell you what sensor was used -- so maybe an anonymizer should resample the image to a new size.
I guess these seem unlikely to be investigated, but then again nobody initially thought that telling every web server what fonts you have installed on your machine would be used against you, or that the existence of "Do Not Track" would make browsers easier to track. It just depends on how much it's worth to someone to write this stuff once -- then it's free for all future uses.
I just looked at https://en.wikipedia.org/wiki/Exif and there are lots of interesting possibilities.
There are also a few that do face detection and blur on the AppStore.
There should be an undo button, though. Especially without a brush size preview.
Unfortunately it isn’t fully functionally via safari mobile.
[0]: https://twitter.com/realDonaldTrump/status/12671296442282475...
Reference: https://help.github.com/en/github/working-with-github-pages/...
The practical effect is that if you're accused of being a member of "antifa" there's no coherent way to demonstrate you aren't, and certainly people opposed to fascism, whether or not they themselves identify with the label, are going to get accused of being "antifa."
(Also, to be clear on the news, he simply said that he intends to do this in a tweet - even if it were a coherent thing to do, there is no procedure for designating domestic groups as terrorist organizations.)
> Antifa is not an interconnected or unified organization, but rather a movement without a hierarchical leadership structure, comprising multiple autonomous groups and individuals