Live data from Hacker News

What is the best way to programatically detect porn images? (2009)

stackoverflow.com

101–110 of 110 posts

Re: What is the best way to programatically detect porn images? (2009)

#101
post #38

I used pifilter (now WeSEE:Filter , http://corp.wesee.com/products/filter/ ) for a production, realtime, anonymous confession site (imeveryone.com) in 2010. It cost, IIRC, a tenth of a cent per image URL. Rather than being based on skin tone, it was created based on algos to specifically identify labia, anuses, penises, etc. REST API: send a URL, get back a yes/no/maybe. You decided what to do with the maybes. My exp…

> Small breasted women (being that breasts are considered 'adult' in the US) was the only thing that would get through and wasn't a huge concern.

But that could also be developing breasts on a youth, and that would mean the image is something you very much want to block and report.

Re: What is the best way to programatically detect porn images? (2009)

#102
post #99
post #86

Earlier quoted context omitted.

Good lord I've read that case and its about as far from the pr0n filter example as you can possibly get. That place was beyond nuts and so was the trial. They deserved every penny they got because the workplace was out of control crazy, and merely coincidentally happened to involve male/female issues. That is NOT a case about accidentally clicking on a web page or debating if huffpo headline stories are sometimes a l…

I should have been more specific. The defense "I sexually harass everyone, so it isn't sexual harassment" is just not in any way valid. Full stop. Period. I used the first class action sexual harassment lawsuit as an example to illustrate the point of "just because it's company culture/I do it to everyone/he's just like that" doesn't make it not harassment. The GP was giving false information that if you sexually har…

One important point to make about Taconite and your examples are I cannot comprehend how any of it could remotely relate to work; management needs to write them up and fire them not because the victims were women or it somehow had something to do with sex but because the workplace is apparently completely out of control. This isn't some pie in the sky daydream, this is decades of observation at a variety of F500 companies in the midwest.

The problem with some jerk harassing female coworkers with .. full stop ... harassing coworkers comma, is he's not doing his job, and he's preventing others from doing their job, and the only mystery is why that problem is not being taken care of at that level. Its not pass the buck time, why didn't some dude in another department find some hairbrained technical scheme to try to temporarily stop the nutcase from bothering people... he's got a boss who's already responsible for that task.

Is this one of those weird coastie vs heartland type issues where we have real bosses so coastie stories sound weird, or ...

That's the crazy part of the story. If the boss simply doesn't care, then blocking certain pix on port 80 is merely going to result in your example of hanging up pictures, or carrying in zip drives, or whatever, obviously the boss won't care about those either. So the net result is a huge waste of time and money for ... nothing?

I would think there's some CYA going on if you know there's about to be another 3.5 million dollar "taconite" type lawsuit filed, and its going to be a slam dunk, whoever it is ordering hairbrained technical solutions doomed to failure probably won't be punished as hard as the guy doing the harassment or his boss who doesn't care, or his bosses boss. But a legal hit like that means tune up the resume anyway, its not looking good.

Re: What is the best way to programatically detect porn images? (2009)

#103
post #96
post #4

detecting all porn seems to be an almost impossible problem. Many kinds of advanced porn (BDSM, etc.) don't have much skin - often the actors are in latex, tied up, or whatever. It's obviously porn when you see it, but detecting it seems incredibly hard. Detecting smurf-porn(1) (yes that's a thing...) is even harder since all the actors are blue. http://pinporngifs.blogspot.dk/2012/09/smurfs-porn.html?zx=7... - obvio…

Couldn't help but read your second line as talking about the smurf-porn(1) man page. :/ man 1 smurf-porn ?!?!

Obligatory: http://xkcd.com/305/

Re: What is the best way to programatically detect porn images? (2009)

#104

In The Olden Pre-Digital Days porn was either in print or on a television screen. Back then (we are talking two whole decades ago) experienced broadcast engineers could instantly spot porn just by catching a look at an oscilloscope (of which there were usually many in a machine room). Notionally the oscilloscope would be there to show that the luminance and chroma was okay in the signal (i.e. it could be broadcast ov…

It's probably related to the type of cameras available in the day rather than anything else...

Re: What is the best way to programatically detect porn images? (2009)

#106

Here's an idea... Develop a bot to trawl NSFW sites and hash each image (combined with the 'skin detecting' algorithms detailed previously). Then compare the user uploaded image hash with those in the NSFW database. This technique relies on the assumption that NSFW images that are spammed onto social media sites will use images that already exist on NSFW sites (or are very similar to). Then it simply becomes a case o…

Is it possible to hash an image so that you can partially match it with subsets of that image (like cropped regions or resizes)? Or a slight modification of that image (colors shifted, image flipped, etc).

Yep. Google "perceptual hash functions".

Re: What is the best way to programatically detect porn images? (2009)

#107
post #106

Earlier quoted context omitted.

Is it possible to hash an image so that you can partially match it with subsets of that image (like cropped regions or resizes)? Or a slight modification of that image (colors shifted, image flipped, etc).

Yep. Google "perceptual hash functions".

shameless self-promotion - I wrote a perceptual hasher for PHP : https://github.com/kennethrapp/phasher

FWIW the biggest problem with this is false positives, though admittedly I may just not be clever enough to do it with enough finesse.

Re: What is the best way to programatically detect porn images? (2009)

#109
post #47

I did this for my bachelor thesis for a company that shall remain unnamed. I am pretty confident that my approach works better than any of the answer posted on stackoverflow. I used the so called Bag of Visual Words approach. At that time the state of the art in image recognition (now it's neural networks). You can read about on Wikipeida. The only main change from the standard approach (SHIFT + k-means + histograms…

It would be interesting to see the images that would be generated if you took that system and "ran in backwards", insofar as that's possible.

Re: What is the best way to programatically detect porn images? (2009)

#110
Algorithmic solutions will always be hard. "I know it when I see it" is hard to program.

Depending on the site, I'd go to a trust-based solution. New users get their images approved by a human censor (pr0n == spambot in most cases). Established users can add images without approval.

If you're going to try software, try something that errs on the side of caution, and send everything to a human for final decision-making, just like spam filters.

Post reply on HN