Live data from Hacker News

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

stackoverflow.com

41–50 of 110 posts

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

#42
Seems like we were having this same problem with email spam, and Bayesian-based learning filters revolutionized the spam filtering landscape. Has anyone tried throwing computer learning at this problem?

We as humans can readily classify images into three vague categories: clean, questionable, and pornographic. The problem of classification is not only one of determining which bucket an image falls into but also one of determining where the boundaries between buckets are. Is a topless woman pornographic? A topless man? A painting of a topless woman created centuries ago by a well-recognized artist? A painting of a topless woman done yesterday by a relatively unknown artist? An infant being bathed? A woman breastfeeding her baby? Reasonable people may disagree on which bucket these examples fall in.

So what if I create three filter sets: restrictive, moderate, and permissive, and then categorize 1,000 sample images as one of those three categories for each filter set (restrictive could be equal to moderate but filter questionable images as well as pornographic ones).

Assuming that the learning algorithm was programmed to look at a sufficiently large number of image attributes, this approach should easily be capable of creating the most robust (and learning!) filter to date.

Has anyone done this?

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

#44
post #13

This is probably going to get downvoted, but if lots of people are not overzealous puritans and want some skin, the best overall system design that maximizes happiness and profit is probably sharding into puritanweirdos.example.com with no skin showing between toes and top of turtleneck (edited to add no pokies either) and normalpeople.example.com with 99% of the human race The best solution to a problem involving co…

Your last and second last points seem to contradict each other. You claim that people who are into animal sex are "weirdos" and we should draw the line there, then you claim that people who want to block something are bullies who should not be appeased.

Also your claim that all people who wants to block pornographic images are really bullies who will not stop until all women are in burkhas is stupid in itself.

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

#45
post #9
post #8

Earlier quoted context omitted.

So i can literally get paid for looking at porn. Huh, who knew... :)

At the cost of your mental health, sure. I recall reading an article about the human workers who had this job at Google... they had crap benefits, crap pay, and no mental healthcare. As a result a lot of the people in the field had depression and other mental issues.

Friend was a contractor on the YouTube filter team -- they lasted about 9 months before it became too much and had to leave.

There was absolutely no reward in showing up to work, and some of the things they saw have likely scarred their memories forever

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

#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 + SVM + chi2 kernel) was that I used a version of SHIFT that uses color features. In addition to this I used a second machine learning classifier based on the context of the picture. Who posted it? Is it a new user? What are the words in the title? How many view does the picture have....

In combination the two classifiers worked nearly flawless.

Shortly after that, chat roulette has having it's porn problem and it was in the media that the founder was working on a porn filter. I send an email to offer my help, but didn't get an reaction.

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

#48

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…

How do you program that sort of thing?

Do you have to tell it what shapes/colors to look for? Or do a combination of overall image similar combined with localized image similarity and portion by portion image comparison?

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

#49
post #42

Seems like we were having this same problem with email spam, and Bayesian-based learning filters revolutionized the spam filtering landscape. Has anyone tried throwing computer learning at this problem? We as humans can readily classify images into three vague categories: clean, questionable, and pornographic. The problem of classification is not only one of determining which bucket an image falls into but also one o…

This was my first thought. With a good training set and a savvy algo I believe machine learning can be good with images, and theres an unprecedented amount of training sets out there to be scraped...

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

#50
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…

It is possible high accuracy if you use machine learning and a sufficiently large training set. That said said even humans sometimes don't agree is something is porn or not.
Post reply on HN