Detecting Nudity With AI and OpenCV
mikejuk writes: AI gets put to some strange tasks. Not satisfied with the Turing test or inventing Skynet, Algorithmia have put together a nudity detector. Take one face detector from OpenCV and use it to find a nose. Take the skin color from the nose and then see what parts of the body are skin colored in the photo. If there is lot of skin color shout NUDE! Actually, the website lets you put in your own photos and classifies them into Rude or Good and gives you a confidence estimate. Obama with his top off — no problem but the familiar image processing test photo of Lena the pin up girl rates a 'Rude'.
It used to be that homosexuality was offensive. Now the tables have turned and being anti-gay is offensive. Can we expect the same thing to happen with nudity? In a few decades, all this research into detecting nudity will seem awfully misplaced, the same as if people now were discussing AI to flag images with two men kissing.
But what is this "Nude" you speak of?
Sex based: guy in a bottoms only swim suit vs a topless woman?
Country based: French nude beach vs USA prudes?
Era based: Someone from the 1920's looking at a 2015 bikini?
Age based: Young child (often completely nude in some countries is okay) vs post puberty (often requires hiding genitals and nipples on females in some countries)?
Religious based: Whoa! Some religions are very conservative and others require nude dancing around the May pole...
Seasonal: Have you ever tried being nude in a northern Vermont or Siberian winter!?! Don't even think about showing the tip of your nose!
If I were to seek out your daughter specifically, and whip out my penis right in front of her, that would lean towards pedo tendencies & you'd be right. I'd feel the same way if I had a young daughter.
Now if I were to walk along the street naked, go about my own business not bothering anyone, and your daughter would happen to see me in that state, please explain to me how this would 'hurt' her?
Hint: you can't, because it doesn't. More likely the contrary (as in: seeing a naked body every now & then lets kids grow up to be healthy adults). As has been shown at least a few times in serious studies.
The difference here is only in how I would behave towards your daughter (and other people), regardless of being naked or not. If I'm rude, then I'm rude, even with clothes on. If I'm polite, then I'm polite, even if naked.
Although a lot more sensitive, essentially the same thing goes for human sexuality. Suppressing that from public view screws people up more badly than satisfying healthy curiosity on the subject. Or letting people have their pr0n, if they want it.
So GP is right, there is nothing inherently wrong about showing or seeing a naked body. The 'problem' with that is a cultural one, how society deals with it.
anyone using such technology would require an extremely low false negative score... but too many false positives can make the system unusable. one of my last projects at undergraduate university was pretty much the exact same "nudity confidence" test as this project... my project "worked pretty well" also, but was equally unusable. i dialed all the parameters for a week until i got the best results on a giant dataset (millions of images)... one of the sources of images was every image from the university website (over 10,000 images just from that). so, after the tweaking, false negatives were low, but still 5% of negatives were wrong. i don't remember exact numbers, but i think of the positives, 10-15% of those were wrong. i didn't use any libraries or facial recognition, but i imagine that would help a lot... one problem is obviously if the face isn't in the picture. my technique was using a wide range of skin tones and then looking for "blobs" of similarly toned pixels and looking for shapes or shapes in shapes... (nipples on breasts were a pretty solid indicator and easy to scan for... also detecting a crotch region with dark hair... obviously a fat man in a hair-toned thong would trigger alarms)
so, after all of this, many variables are weighted to give a single "confidence" score... so i decided to run the test a final time before the presentation the next day (it took many hours to run)... i built lots of top lists, one of them was overall confidence of nudity... the #1 picture most confident of containing a nude body ended up being the faculty office picture of one of the lecturers in the computer science department, who would be attending the talk. the office walls were a skin tone, and the way the light came in the window and lined up with her head, and round shaped things on her desk reflecting the skin tones, triggered every single test i had built. out of millions of pictures... too funny. good closer for the presentation.
Looking for too much skin color is a bad way to test for nudes.
You don't get to nudity untill you start seeing colors that are not the skin color.
Ummm... wtf? Actually, religiosity in the US is correlated with teen pregnancy rates.
Top 10 states by percentage identifying as "very religious" are Mississippi, Utah, Alabama, South Carolina, Louisiana, Arkansas, Tennessee, North Carolina, Georgia and Oklahoma.
Top 10 states by teen pregnancy rates are: New Mexico, Mississippi, Texas, Arkansas, Louisiana, Oklahoma, Nevada, Delaware, South Carolina and Hawaii.
So 5 of the top 10 religious states are also in the top 10 for teen pregnancy.
Now please cite studies showing that "bombarding children with sexuality" (whatever that means) causes teen pregnancy,
Exactly! People are conflating the original from Playboy (which I had) and the USC scan used by every facility in the world that was working on image processing... especially color processing. The famed image was only head and the top of the shoulder from the full centerfold.
The other images included "Drop" and "Baboon" as well as some I no longer remember. "Drop" was a glass of milk just after a drop had landed dead center, raising a drop of splash. Baboon was also mis-named. It was a male mandrill. Red nose and blue cheeks. It was the one we used most frequently.
Kevin Oberman, Network Engineer, Retired