6 ms·
Undocumented Facebook API to identify friends in photos
- gcr 10y agoYup yup! This was the screenscraping technique we used to turn Facebook into an automatic face detector: https://arxiv.org/abs/1602.04504 https://arxiv.org/abs/1602.04504 It's a giant pain to screenscrape this using 'curl'. If I recall correctly, the bounding box coordinates I wanted are set as CSS properties inside inline HTML sent to the client wrapped up in a Javascript string literal as part of Javascript served to the client as the result of an AJAX call, if memory serves correctly. To get my screenscraper working, I had to do the AJAX call, parse the literal javascript, walk the AST to find the string literal I needed, parse the HTML to find the element I needed, then use the computed CSS properties. Looks like the author of this post found a much nicer way. (note: that work wasn't about recognition; it was about just finding the faces in images, not identifying them)
- bknarendra 10y agoYes if you see the code, I extract the JSON object from response by removing the for(;;); in the beginning and then parse the json to hash and flatten it to array of strings. As there is only 1 value that will have the html content, I found this by using some css selector of the content and then parse the html and used unique css selector class for the names of the users.
- tedmiston 10y agoI'd really like to read your paper. Everywhere I've found it referenced has a paywall. Is the full text freely available anywhere?
- jey 10y agoClick "PDF" on the right side and you get https://arxiv.org/pdf/1602.04504v1.pdf https://arxiv.org/pdf/1602.04504v1.pdf
- deleted 10y ago[deleted]
- sillysaurus3 10y agoThere's a little-known way to solve that problem for any paper: post the link to /r/scholar, and you'll get the full pdf within a couple hours.
- mablap 10y agoI wouldn't call it 'little-known', it's become quite "famous" in my academic circles at least. Just make sure you look up the DOI on libgen.
- fapjacks 10y agoSci-hub doesn't have it?
- anewhnaccount 10y agoThat's a link to arXiv which the biggest publicly available preprint server. That means you can get it for free legally.
- danielmorozoff 10y agoHave you quantified the number of people per account that FB is giving a suggested label to a detected face vs a users number of friends? It'd be interesting to see how FBs classifier performs.
- gcr 10y agoHm. I haven't quantified that, no. I think FB will only suggest labels that it's already very confident of.
- danielmorozoff 10y agoI'd assume the they would be thresholds but the statistics would be interesting.
- fallenshell 10y agoThis is scary.
- tokenizerrr 10y agoIt's not that bad. > I found this API has a limitation it only suggests people in the photo who are in your FB friend list
- beatpanda 10y agoYeah, OK, now think about the version Facebook (and thus law enforcement, intelligence agencies and advertisers) has access to.
- anc84 10y agoUhm... Duh?
- hk__2 10y agoWhy would FB share any of this with advertisers?
- beatpanda 10y agoFor money.
- hk__2 10y agoThey don’t need to share this for money. Advertisers don’t want your data, they want accurate targeting.
- mcintyre1994 10y agoI believe them when they say they don't share, but are you sure about that? Even advertisers that already have my full name and some data, they wouldn't want to link with what Google and Facebook have? To be concrete, my local supermarket and Amazon have my full name, and partial purchase information (the supermarket via a loyalty card). Both have ways to contact me with promotions. You don't think they'd like to know what I like on Facebook (if I did that) or what I search on Google that might suggest purchase intent? I think they'd love that data, the platforms just make more money by only allowing them to target with it.
- johansch 10y agoThe title (and half of the post) seems to say that there is some undocumented API that can do more than what the actual Facebook service does with its regular usage. This does not seem to be the case.
- dimino 10y agoThis is great! I tended to favor this technique for testing during my time in QA automation. People gravitate towards Selenium too quickly, when you really only need Selenium to test rendering.
- bknarendra 10y agoYes I think Selenium adds that additional headache of dependencies that need to setup. Also its a pain if you want it to run on headless server. With this too you need some setup but its minimum.
- bjt2n3904 10y agoI've never liked Facebook's "do you want to tag your friend" feature. It's a loaded question, like... have you stopped beating your wife? However you answer it, you've given Facebook feedback about their facial recognition. If I hit yes, I'm tagging friends who might not want to be tagged. Furthermore, I might end up in the same boat with friends tagging pictures of me! Either way, I help better Facebook's facial recognition, which unnerves me. On the surface, clicking "no" means that they got the facial recognition wrong. But what am else am I revealing? If the match was 98%, would they infer that one of us (or both) is concerned about privacy? That we have something to hide? The third alternative is to click nothing. The only information that gives Facebook is that I'm not interested in helping curate their data any more than I already am.
- feelix 10y agoThat's a good point and it also brings to mind a way to fight it. This http://arxiv.org/pdf/1412.1897v4.pdf http://arxiv.org/pdf/1412.1897v4.pdf could be one way. You could generate images which are not of someone who wants to protect his privacy, but tweak them to strongly correlate to an image of that person by the neural net, whereas it could be a picture of anything you have just optimized (the images could be just noise, or another person, etc). You could generate batches of those and upload them, and confirm to Facebook that they are indeed photos of the person who wants their privacy back. You could repeat this (automatically) and corrupt the weights in FB's neural net, which would overcome their face detection abilities for the individual in question.
- bjt2n3904 10y agoInteresting paper, but I'm not sure that's entirely practical. If I were Facebook, I'd look at the entropy of an image before attempting to classify it. Anything particularly high (noise) or low (squiggles) would be discarded before running through the classifier.
- programmarchy 10y agoSo, why do you still use Facebook again? FOMO > privacy?
- deleted 10y ago[deleted]
- Tinyyy 10y agoIs there a way to get the position (coordinates) of the face as well, just like it is on Facebook?
- bknarendra 10y agoYes there is. If you see the div tag for the box which has class "fbPhotosPhotoTagboxBase tagBox". Its css style contains the left and top and height and width face box.