Answers.Body: <p>Yes, you should label it the same. But more importantly you need to make sure that each perturbation of the image doesn't change some important character of the image. </p>
  
  <p>Consider training an apple classifier. If you plan to augment data by altering the RGB values, you need to be wary that you might cause issues in classification tasks where color is instrumental. Say, Granny apple / Fuji apple. If you still really want to augment data in this way, consider perturbing by smaller amounts each time.</p>
  
  <p>Or consider an apple detector. An apple still "looks to be an apple" if looked at an angle, if looked through a mirror, if looked afar, but probably not if looked through a carnival mirror.</p>
  
  <p>So ask yourself, if an image still NSFW if the colors are changed?</p>
  
  <p>However, as a personal anecdote I don't think augmenting data by changing the color channel is a good idea. Also note that training on augmented data by altering the color channels as a whole should be more or less equivalent to training in B/W. Why?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-14T23:28:39.353Z
Answers.Text: Thank you so much for your answer, Yes, I agree with you .. now, I think that it might be better to convert all images to B/W (that would decrease the number of input neurons) ... And focus only on shape, since abusive and sexual content can be recognized without colors.
  
  If I train my Network with B/W image dataset, do I have  to convert input images to B/W if I were to check them?
Answers.UserDisplayName: SmootQ
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-15T16:46:14.350Z
Answers.Text: Yes, since that's the type of image it was trained on
Answers.UserDisplayName: k.c. sayz 'k.c sayz'
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-15T16:47:18.607Z
Answers.Text: This is relevant: https://github.com/yahoo/open_nsfw/blob/master/README.md
Answers.UserDisplayName: k.c. sayz 'k.c sayz'
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-06T08:04:38.443Z
Answers.Text: The kind of augmentations you seem to be doing will render your data set useless to a CNN classifier because you are randomly altering important features of the image. I recommend that you use the keras ImageDataGenerator to achieve the augmentations you desire. Documentation is at https://keras.io/preprocessing/image/.
Answers.UserDisplayName: Gerry P
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-14T19:36:06.350Z
Answers.LastActivityDate: 2018-01-14T19:36:06.350Z
Answers.UserDisplayName: k.c. sayz 'k.c sayz'
Body: <p>I am new to neural networks, I've only started studying and learning about the subject a year ago, and I just started building my first neural network.</p>
  <p>The project is a little bit ambitious: A browser extension for children's safety,  it checks for sexual or abusive content, so that it replaces that content with a placeholder, the user will have to insert a password to show original content.</p>
  <p>I didn't find a dataset online, so I decided to build my training dataset. So, I started by writing a web crawler, it starts collecting images, meanwhile implementing data augmentation techniques. It basically resizes images (to 95x95), crops them, rotates, changes colors, adds blur, black and white, noise, etc.</p>
  <p>The problem is that after applying these techniques, I noticed that some images are not even recognizable by a human subject.</p>
  <p>I mean that even though I know that picture contains sexual content, it doesn't even appear to be sexual anymore.</p>
  <p>So, do I have to label it as sexual or not sexual?</p>
  <p>Notice that it's easier for me to consider it as sexual, if every image produces about 50 edited images, I'd only have to label the original image, what follows is that all 50 images get the same label. Is it okay to do just that?</p>
  <p><a href="https://i.sstatic.net/ea2Fz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ea2Fz.png" alt="enter image description here" /></a></p>
  <p>This is a sample of what I get after doing data augmentation, notice that some pictures are not recognizable by humans.</p>
  <p>For example, look at the result after editing images hue and saturation, a human can't recognize this result, is it okay to label it: not sexual?</p>
  <p><a href="https://i.sstatic.net/M5SPe.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/M5SPe.jpg" alt="enter image description here" /></a>
  <a href="https://i.sstatic.net/PjJWy.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/PjJWy.jpg" alt="enter image description here" /></a></p>
  <p>I wouldn't recognize the picture on the right if I didn't see the original one.</p>
  <p>I also tested this on human subjects (my brothers), they didn't recognize the squirrel on the right.</p>
  
Tags: <neural-networks><data-preprocessing><data-augmentation><data-labelling>
Title: How to label edited images after data augmentation?
UserDisplayName: SmootQ
ThreadText: # How to label edited images after data augmentation?
  
  (Asked by: username_0 on 2018-01-14)
  
  I am new to neural networks, I've only started studying and learning about the subject a year ago, and I just started building my first neural network.
  
  The project is a little bit ambitious: A browser extension for children's safety, it checks for sexual or abusive content, so that it replaces that content with a placeholder, the user will have to insert a password to show original content.
  
  I didn't find a dataset online, so I decided to build my training dataset. So, I started by writing a web crawler, it starts collecting images, meanwhile implementing data augmentation techniques. It basically resizes images (to 95x95), crops them, rotates, changes colors, adds blur, black and white, noise, etc.
  
  The problem is that after applying these techniques, I noticed that some images are not even recognizable by a human subject.
  
  I mean that even though I know that picture contains sexual content, it doesn't even appear to be sexual anymore.
  
  So, do I have to label it as sexual or not sexual?
  
  Notice that it's easier for me to consider it as sexual, if every image produces about 50 edited images, I'd only have to label the original image, what follows is that all 50 images get the same label. Is it okay to do just that?
  
  [![enter image description here](https://i.sstatic.net/ea2Fz.png)](https://i.sstatic.net/ea2Fz.png)
  
  This is a sample of what I get after doing data augmentation, notice that some pictures are not recognizable by humans.
  
  For example, look at the result after editing images hue and saturation, a human can't recognize this result, is it okay to label it: not sexual?
  
  [![enter image description here](https://i.sstatic.net/M5SPe.jpg)](https://i.sstatic.net/M5SPe.jpg)
  [![enter image description here](https://i.sstatic.net/PjJWy.jpg)](https://i.sstatic.net/PjJWy.jpg)
  
  I wouldn't recognize the picture on the right if I didn't see the original one.
  
  I also tested this on human subjects (my brothers), they didn't recognize the squirrel on the right.
  
  **Tags:** neural-networks, data-preprocessing, data-augmentation, data-labelling
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-14. Score: 1 | Accepted answer
  
  Yes, you should label it the same. But more importantly you need to make sure that each perturbation of the image doesn't change some important character of the image.
  
  Consider training an apple classifier. If you plan to augment data by altering the RGB values, you need to be wary that you might cause issues in classification tasks where color is instrumental. Say, Granny apple / Fuji apple. If you still really want to augment data in this way, consider perturbing by smaller amounts each time.
  
  Or consider an apple detector. An apple still "looks to be an apple" if looked at an angle, if looked through a mirror, if looked afar, but probably not if looked through a carnival mirror.
  
  So ask yourself, if an image still NSFW if the colors are changed?
  
  However, as a personal anecdote I don't think augmenting data by changing the color channel is a good idea. Also note that training on augmented data by altering the color channels as a whole should be more or less equivalent to training in B/W. Why?
  
  > **Comments:**
  > **username_0**: Thank you so much for your answer, Yes, I agree with you .. now, I think that it might be better to convert all images to B/W (that would decrease the number of input neurons) ... And focus only on shape, since abusive and sexual content can be recognized without colors.  If I train my Network with B/W image dataset, do I have  to convert input images to B/W if I were to check them?  
  > **username_1**: Yes, since that's the type of image it was trained on  
  > **username_1**: This is relevant: https://github.com/yahoo/open_nsfw/blob/master/README.md  
  > **username_2**: The kind of augmentations you seem to be doing will render your data set useless to a CNN classifier because you are randomly altering important features of the image. I recommend that you use the keras ImageDataGenerator to achieve the augmentations you desire. Documentation is at https://keras.io/preprocessing/image/.  
  
  ---
  
  