Answers.Body: <p>The problem detecting NSFW has been around for over two decades.</p>
  
  <hr>
  
  <p>This study from 2005 about <a href="http://link.springer.com/chapter/10.1007%2F3-540-61123-1_173" rel="nofollow noreferrer"><em>finding naked people</em></a>, demonstrates a strategy for finding such images based on the color and texture properties to fetch an effective mask for skin regions attempting to group a human figure using geometric constraints on the human structure. This method demonstrated </p>
  
  <blockquote>
    <p>60% precision and 52% recall on a test set of 138 uncontrolled images of naked people.</p>
  </blockquote>
  
  <p>Here are a few figures from the study explaining the algorithm:</p>
  
  <p><a href="https://i.sstatic.net/hMC5ll.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hMC5ll.png" alt="Finding naked people via AI, neural network"></a></p>
  
  <p><a href="https://i.sstatic.net/qgjcYl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qgjcYl.png" alt="Typical control images wrongly classified as containing naked people"></a></p>
  
  <p><sup><strong>The following post contains visualizations of nudity for scientific purposes (hover to display):</sup></strong></p>
  
  <blockquote class="spoiler">
    <p> <a href="https://i.sstatic.net/qlNd8m.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qlNd8m.png" alt="Typical images correctly classified as containing naked people"></a></p>
  </blockquote>
  
  <hr>
  
  <p>A more recent approach is using <a href="https://ai.stackexchange.com/questions/tagged/conv-neural-network">convolutional networks</a>. This <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.683.4319" rel="nofollow noreferrer">study from 2014</a><sup><a href="https://www.cs.nyu.edu/~fergus/papers/zeilerECCV2014.pdf" rel="nofollow noreferrer">PDF</a></sup> demonstrated impressive classification performance based on the ImageNet dataset. It's not clear '<em><a href="https://ai.stackexchange.com/q/1479/8">how and why</a></em> they perform so well', however they can be used for classification of images with a very low error rate.</p>
  
  <p>For further details, check: <a href="http://blog.clarifai.com/what-convolutional-neural-networks-see-at-when-they-see-nudity/" rel="nofollow noreferrer">What convolutional neural networks look at when they see nudity</a>.</p>
  
  <p>You will find the code example and the heatmap for how convnets see NSFW in the above link.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-17T18:02:40.383Z
Answers.LastActivityDate: 2016-08-25T09:59:13.270Z
Answers.LastEditDate: 2017-04-13T12:53:10.013Z
Answers.UserDisplayName: kenorb
Answers.Body: <p>The 2015 paper entitled "<a href="https://arxiv.org/pdf/1511.08899.pdf" rel="nofollow">Applying deep learning to classify pornographic images and videos</a>" applied various types of convnets for detecting pornography. The proposed architecture achieved <strong>94.1% accuracy</strong> on the NPDI dataset, which contains 800 videos (400 porn, 200 non-porn "easy" and 200 non-porn "difficult"). More traditional computer vision methods achieved 90.9% accuracy. The proposed architecture also performs very well regarding the ROC curve.</p>
  
  <p>There does not seem to exist any works regarding the other aspects of NSFW yet.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-10T15:16:19.503Z
Answers.LastActivityDate: 2016-08-10T15:16:19.503Z
Answers.UserDisplayName: rcpinto
Body: <p>For example, search engine companies want to classify their image searches into 2 categories (which they already do that) such as: <a href="https://en.wikipedia.org/wiki/Not_safe_for_work" rel="nofollow">NSFW</a> (nudity, porn, brutality) and safe to view pictures.</p>
  
  <p>How can artificial neural networks achieve that, and at what success rate? Can they be easily mistaken?</p>
  
Tags: <image-recognition><classification><convolutional-neural-networks>
Title: How successfully can convnets detect NSFW images?
UserDisplayName: kenorb
ThreadText: # How successfully can convnets detect NSFW images?
  
  (Asked by: username_0 on 2016-08-09)
  
  For example, search engine companies want to classify their image searches into 2 categories (which they already do that) such as: [NSFW](https://en.wikipedia.org/wiki/Not_safe_for_work) (nudity, porn, brutality) and safe to view pictures.
  
  How can artificial neural networks achieve that, and at what success rate? Can they be easily mistaken?
  
  **Tags:** image-recognition, classification, convolutional-neural-networks
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-08-10. Score: 3 | Accepted answer
  
  The 2015 paper entitled "[Applying deep learning to classify pornographic images and videos](https://arxiv.org/pdf/1511.08899.pdf)" applied various types of convnets for detecting pornography. The proposed architecture achieved **94.1% accuracy** on the NPDI dataset, which contains 800 videos (400 porn, 200 non-porn "easy" and 200 non-porn "difficult"). More traditional computer vision methods achieved 90.9% accuracy. The proposed architecture also performs very well regarding the ROC curve.
  
  There does not seem to exist any works regarding the other aspects of NSFW yet.
  
  
  ---
  
  ### Answer by username_0 on 2016-08-17. Score: 1
  
  The problem detecting NSFW has been around for over two decades.
  
  ---
  
  This study from 2005 about [*finding naked people*](http://link.springer.com/chapter/10.1007%2F3-540-61123-1_173), demonstrates a strategy for finding such images based on the color and texture properties to fetch an effective mask for skin regions attempting to group a human figure using geometric constraints on the human structure. This method demonstrated
  
  > 60% precision and 52% recall on a test set of 138 uncontrolled images of naked people.
  
  Here are a few figures from the study explaining the algorithm:
  
  [![Finding naked people via AI, neural network](https://i.sstatic.net/hMC5ll.png)](https://i.sstatic.net/hMC5ll.png)
  
  [![Typical control images wrongly classified as containing naked people](https://i.sstatic.net/qgjcYl.png)](https://i.sstatic.net/qgjcYl.png)
  
  **The following post contains visualizations of nudity for scientific purposes (hover to display):**
  
  > [![Typical images correctly classified as containing naked people](https://i.sstatic.net/qlNd8m.png)](https://i.sstatic.net/qlNd8m.png)
  
  ---
  
  A more recent approach is using [convolutional networks](https://ai.stackexchange.com/questions/tagged/conv-neural-network). This [study from 2014](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.683.4319)[PDF](https://www.cs.nyu.edu/~fergus/papers/zeilerECCV2014.pdf) demonstrated impressive classification performance based on the ImageNet dataset. It's not clear '*[how and why](https://ai.stackexchange.com/q/1479/8)* they perform so well', however they can be used for classification of images with a very low error rate.
  
  For further details, check: [What convolutional neural networks look at when they see nudity](http://blog.clarifai.com/what-convolutional-neural-networks-see-at-when-they-see-nudity/).
  
  You will find the code example and the heatmap for how convnets see NSFW in the above link.
  
  
  ---
  
  