Slashdot Mirror


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'.

40 of 172 comments (clear)

  1. And it performs poorly..... by theNetImp · · Score: 2

    I googled "porn" grabbed one of the top 10 image URLs Entered it.... and got PG. #FAIL@SCIENCE

    1. Re:And it performs poorly..... by Anonymous Coward · · Score: 5, Interesting

      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.

    2. Re: And it performs poorly..... by Garridan · · Score: 2

      Do you mean that images of naked porn stars are "safe for work" because the models are "at work"? Sounds legit.

    3. Re:And it performs poorly..... by Alef · · Score: 2

      Picking a single picture to test such a system is a scientific fraud.

      It depends on what you want to prove. If the claim is that the system is useful for automatic rating of images (not sure anybody claimed this, but they do give pictures ratings on their website), then one would expect a false negative rate of [fairly tiny number], which a single randomly picked data point to the contrary gives quite a significant evidence against.

      Not saying it doesn't work "pretty well" in a sort of cool tech sense, though.

    4. Re:And it performs poorly..... by Curunir_wolf · · Score: 4, Insightful

      (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)

      What's wrong with (female) nipples on breasts? Are they more naked than a man with a naked upper body? Should the woman be covered while the man can freely go around without something to cover his chest? There is absolutely nothing wrong with female breasts. They are not sexual objects. Treating them like that is just demeaning, both to women and men.

      Well my nipples, in fact, are sexual objects. My wife's were, too, until she had a kid. Then, not so much. Not at all, in fact.

      --
      "Somebody has to do something. It's just incredibly pathetic it has to be us."
      --- Jerry Garcia
    5. Re:And it performs poorly..... by Dog-Cow · · Score: 2

      You are a complete moron. One who has probably never been allowed to touch someone of the opposite gender.

      Female breasts are sex objects. Until males of our species stop being turned on by the sight or touch of them, they will be sex objects. The end.

    6. Re:And it performs poorly..... by davester666 · · Score: 2

      In today's lesson, we will discuss how the same things can have multiple, different uses, depending on the current context.

      --
      Sleep your way to a whiter smile...date a dentist!
  2. limited exposure by Mr+D+from+63 · · Score: 3, Funny

    Take the skin color from the nose..

    That ain't a nose!

  3. AIs are learning to watch porn! by penguinoid · · Score: 2

    Oh, well. It's no skin off my nose.

    --
    Don't waste your vote! Vote for whoever you want, unless you live in a swing state it won't matter anyways
  4. Nude == Rude? by dskoll · · Score: 5, Insightful

    Why does "Nude" equate to "Rude"? Oh right, I forgot... we're afraid of our bodies and spooked by healthy sexuality.

    1. Re:Nude == Rude? by bill_mcgonigle · · Score: 4, Insightful

      Why does "Nude" equate to "Rude"? Oh right, I forgot... we're afraid of our bodies and spooked by healthy sexuality.

      Puritanism is the State Religion.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    2. Re:Nude == Rude? by dskoll · · Score: 4, Insightful

      Right, because a 5-year-old is traumatized by stumbling across a picture of a nude dude, but is perfectly fine watching 15 people a day being blown away violently on prime-time television shows.

      OMG, think of the CHILDREN! What if she accidentally sees a PENIS? OMG OMG OMG OMG!!!!

      And what if young Bobby accidentally sees a boob? OMG OMG OMG OMG!!!!

    3. Re:Nude == Rude? by Anonymous Coward · · Score: 2, Insightful

      And what, exactly, does this nude-detecting AI have to do with your daughter, exactly?

      You, sir, have issues. Perhaps you should stop insisting that everyone is fantasizing about her and realize you are only projecting that yourself.

    4. Re:Nude == Rude? by Alwin+Henseler · · Score: 5, Interesting

      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.

    5. Re:Nude == Rude? by MobileTatsu-NJG · · Score: 2

      His daughter is a lot more likely to get pregnant* as a teenager than she is to shoot or get shot. There actually is a basis for prioritizing one over the other.

      *My apologies to ArcherB, no disrespect intended.

      --

      "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

    6. Re:Nude == Rude? by dunkelfalke · · Score: 4, Informative

      Except that puritan daughters are far more likely to get pregnant as teens. Just saying.

      --
      "It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
    7. Re:Nude == Rude? by dskoll · · Score: 4, Interesting

      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,

    8. Re:Nude == Rude? by Chris+Mattern · · Score: 2

      [citation required]

    9. Re:Nude == Rude? by Anonymous Coward · · Score: 2, Insightful

      Sex Ed will SIGNIFICANTLY reduce the likelihood that she gets pregnant before reaching adulthood.

    10. Re:Nude == Rude? by shmlco · · Score: 5, Informative

      In 2008, the Washington Post reported on a University of Washington study which found that teenagers who received comprehensive sex education were 60% less likely to get pregnant than someone who received abstinence-only education.

      A 2007 federal report found that abstinence-only programs have had "no impacts on rates of sexual abstinence," reported ThinkProgress.

      In a 2011 study published in the journal PLOS One, researchers found a similar correlation between a state's commitment to abstinence education and pregnancy rates.

      One of the most interesting and notable examples of this phenomenon comes out of Texas, which, according to ThinkProgess, has one of the highest rates of teen pregnancy in the country and a track record of strict abstinence-only education.

      --
      Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
    11. Re:Nude == Rude? by Anonymous Coward · · Score: 5, Insightful

      I remember back when I was 14, raised in my fundamentalist protestant christian community. No playboy magazine. No masturbation without guilt. Sexual desire was lust, which was a sin, and I was supposed to resist temptation and ask for forgiveness.

      We had no sexual outlets. So, we played with the girls every chance we got. And they were just as eager, because they were in the same boat. The moment the grown-ups weren't around, neither were the clothes. Did I mention we did not have access to condoms, pills, or any form of birth control at all?

      I am damn lucky I didn't knock anyone up. The only reason, in fact, that I didn't get someone preggo was because I DID learn (in a single akward conversation that does not qualify as sex education) the barest basics of how babies were made. Obviously, such an event would get us caught, so we played in every way we could other than that. Well some of us did, anyway. A few got pregnant.

      *THIS* is not healthy or safe for the kids. It is not even sane. Educate those kids. Every fact they have is a fact they can use to make wise choices. And for God's sakes give them access to free condoms...not to condone sexuality, but to protect the especially hormonal ones from the life-destroying consequences that otherwise result.

      Also, let go of your ridiculous notions of childhood innocence. It's a fantasy you make up. We were all dirty old men at the age of about six.

    12. Re:Nude == Rude? by kevmeister · · Score: 3, Informative

      In San Francisco there was (is?) no law against nudity in public. Last year the Board of Supervisors (the SF equivalent to a city counsel) voted to require those with an unclothed buttocks to cover any public seat with a towel or napkin before sitting. Many businesses also banned nudity and suggestive behavior was still illegal, but certainly you could not be charged because a child saw you while unclothed.

      --
      Kevin Oberman, Network Engineer, Retired
    13. Re: Nude == Rude? by chispito · · Score: 2

      You meet a lot of Puritans? The funny hats give them away, right?

      --
      The Daddy casts sleep on the Baby. The Baby resists!
    14. Re:Nude == Rude? by dskoll · · Score: 2

      You lose. I have three kids. And there's plenty of violence in kids' shows too, even though it tends to be cartoony.

    15. Re:Nude == Rude? by bmo · · Score: 2

      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 best way for anyone to see how this is true is to see what goes on at a Nudist park, village, beach, etc. and my direct study (this summer) of the situation confirms your answer. Nudity != sex in spades. Also, people talk about body acceptance. If a nudist camp experience can't give you that with bodies all over the spectrum, then you really do need help.

      I joined Cedar Waters Village http://nhnude.com/ this year, after a lifetime of avoiding places like that (except for that one visit to Moonstone Beach (PPTJLC)), and I can only say that I regret not doing something like this sooner in my life. The ability to just walk out of your cabin after waking up - bypassing your clothes hanging in the closet completely - and traipse off to the beach not giving a single flying fuck is refreshing.

      --
      BMO - Piping Plovers Taste Just Like Chicken

  5. big brother... by cb88 · · Score: 2

    Someone I know was tasked with catching people at work watching porn. So.. they screen grabbed everyone occasionally and checked manually. That got tedious so an algorithm was scripted to scan the photos for slightly darker circles within larger circles (breasts).... the person that wrote that code no longer has a job there because they just run the program and don't need to manually check X.x

    It doesn't have to catch every concurrence of course.. just enough to flag culprits with few false positives. Also, don't code yourself out of a job!

    Thing here has really high false positives, most of the time it flags faces as nude.

  6. What about photos of noses? by wonkey_monkey · · Score: 2

    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!

    And if I give it a photo of a nose?

    --
    systemd is Roko's Basilisk.
  7. You Gringos have a problem with nudity by Anonymous Coward · · Score: 2, Insightful

    Just a reminder, we are all born naked. Stop making so much trouble!

    Cheers from Germany.

  8. misplaced research? by Anonymous Coward · · Score: 2, Interesting

    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.

  9. Lena image was not "RUDE" at all by kevmeister · · Score: 3, Informative

    Having worked in image processing and having made extensive use of the "standard" USC images including Lenna, I can assure you that the Lenna image was cropped at the shoulder. The Wikipedia article shows the image as encoded as an uncompressed 512x512 image.

    USC errored in the image name, naming it "Lenna" when the model was correctly identified in the Playboy issue as "Lena Soderberg".

    --
    Kevin Oberman, Network Engineer, Retired
    1. Re:Lena image was not "RUDE" at all by kevmeister · · Score: 3, Interesting

      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
  10. Because Puritans by waspleg · · Score: 3, Insightful

    and other assorted imported religious insanity.

  11. What is this "Nude" you speak of? by pubwvj · · Score: 5, Interesting

    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!

    1. Re:What is this "Nude" you speak of? by pubwvj · · Score: 2

      You can convert to our new Mapolianudist Dancing Religion quite easily... All you need is a tree and no cloths...! But in our religion it is not considered nude because you have a tree. Very liberating.

  12. Nose-based visual query limitations by Jeremi · · Score: 2

    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!

    So my collection of clown porn is still safely undetectable?

    --


    I don't care if it's 90,000 hectares. That lake was not my doing.
  13. Rude ? by aepervius · · Score: 4, Insightful

    I understand classifying as nude or safe, or whatnot, but rude ? Since when is nudity rude ?

    --
    C. Sagan : A demon haunted world:
    http://www.amazon.com/gp/product/0345409469/
    visit randi.org
  14. Wrong idea: too much skin colors. by MouseTheLuckyDog · · Score: 4, Interesting

    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.

  15. aesthetically, maybe? by killfixx · · Score: 4, Informative

    FTFA, "ascetically pleasing"... hehehe

    I don't think that word means what you think it means. :)

    ascetic: A person who renounces material comforts and leads a life of austere self-discipline, especially as an act of religious devotion.

    Although, I guess nudity would be the highest form asceticism...

     

    --
    "Helping to keep you two steps ahead of the Thought Police!"
  16. Excellent by cfalcon · · Score: 4, Funny

    I'm glad that AI has learned to spot tits. I'm sure this will only be used for moral purposes, like enforcing our ban on nipples that are on a chick (biological or trans), or a dude who has chick breasts (as in to win a bet). Everyone knows that nipples rot the minds of children, which in why they cannot speak until after weaning. It's science!

    It is my fondest hope that our robot overlords appreciate a nice rack. That will make the slaving in the rare earth mines a little more tolerable, at least.

  17. What's the point? by Darinbob · · Score: 3, Funny

    If there's one thing I'd rather do myself than to delegate to an AI, it would be nude detection.