
Nude.js | Nudity detection with JavaScript and HTMLCanvas - pa7
http://www.patrick-wied.at/static/nudejs/
======
burgerbrain
Now if only they would make one that detected violent and hateful content.

You know, things people should _actually_ be concerned about children seeing.

~~~
pa7
you're right but how would you define violent and hateful content? it's not
easy. ok, somebody could build a neural network and train it with typical
violent content, but violence has too many types

~~~
nailer
> you're right but how would you define violent and hateful content?

For one subset of violence, gore pictures, you could identify body parts
(already solved) then look for what appears to be wounds using color changes
and edges.

That's of course one small part of the concept of violence - you're totally
correct in stating this is difficult.

Also hateful is more objective/political so I don't think we have much chance
there.

------
matthijs
Even a really close up picture of a face will be seen as nudity. Trying to
detect a body (or parts of a body) and determine how much skin is visible
would probably be a better approach.

Also quite relevant is this site:
[http://www.yangsky.com/researches/physicallinguistics/PLUnde...](http://www.yangsky.com/researches/physicallinguistics/PLUnderstand/humanbody/humanbody.htm)
Besides a "breast detector/nipple detector" he also created a couple of weird
detectors like a "cowgirl sex position detector" among others. (The link is
sfw, the individual detectors are not)

------
snowmaker
Slightly off topic, but does anyone know of a server-side implementation of
the same concept? I've been looking for a good one.

~~~
dangrossman
I wonder how much work it would take to run _this_ server side on node.js. It
has a canvas implementation.

~~~
pa7
if anyone goes for a node.js implementation I'd offer my support on it

------
pa7
The algorithm is mostly based on this paper:
<http://www.math.admu.edu.ph/~raf/pcsc05/proceedings/AI4.pdf> but there are
some steps open. I've implemented this algorithm because it's not as hardware
intensive as the usual nude detection algorithms (such as searching for
specific body parts)

------
seanlinmt
Interesting concept.Scanning through the code, reading just the comments, it
seems to base the nude-not-nude decision by the amount of skin shown.

Hmm.. I guess it depends on what your definition of nudity is.

~~~
cookiecaper
Yeah, the code looks like it determines based on what percentage of the image
is "skin". The demo page gives a rather close-up shot of the upper-left of a
woman's shoulders/chest. What if someone zooms out a little bit? In my tests
it is not doing very well if the subject is not taking up the whole image.

Perhaps a better approach would be attempting to characterize certain
features, like nipples/areola or buttocks. That definitely sounds like it
would require more intensive processing, though, and be highly dependent on
the angle of the image.

I don't really know much about image processing and computational analysis, I
just like to pretend I know things.

~~~
seanlinmt
Also, you'll need to figure out if the person in the photo is a girl or guy.
:)

------
cabalamat
> _The detection algorithm runs at the client_

Thank you. I really want Firefox to be even slower running unnecessary
JavaScript.

~~~
burgerbrain
I'm not sure why this is downvoted. It runs _really_ slow on firefox...

~~~
cabalamat
Sadly, everything runs real slow on Firefox. I'd be using Chrome if it had Ad
Block Plus.

~~~
smhanov
It does. Search the chrome extension library.

------
Mpdreamz
Wonder what came first, the clever wordplay or the actual feature. Really cool
stuff though.

------
seejay
I couldn't help but click on the message :D

pretty useful concept, i must say...

~~~
nailer
That makes sense: the girl isn't nude. She has a black area over her nipple.
If that's detected as nude, a small bathing costume would also be 'nude'.

------
iwr
If you opt out of the nude.js, the pat-down bot gets to fondle your dangling
pointers.

