Answers.Body: <p>By dropping color channels, they mean replacing the color channel with noise.</p>
  <p>For example:</p>
  <pre><code>import numpy as np
  import cv2
  import matplotlib.pyplot as plt
  
  test_image_path = '4.2.07.tiff' # peppers from https://sipi.usc.edu/database/database.php
  
  # read image
  img = cv2.imread(test_image_path, cv2.IMREAD_COLOR)
  img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
  img = img.astype(float)
  img = (img / 255.0) - 0.5
  plt.imshow(img + 0.5)
  </code></pre>
  <p><a href="https://i.sstatic.net/4UUWJ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4UUWJ.png" alt="Original peppers image" /></a></p>
  <p>Then dropping channels (the output will vary based on how the parameters of the gaussian noise):</p>
  <pre><code># keep the first channel, drop the other two
  img[:, :, 1] = np.random.normal(0, 0.1, (img.shape[:2]))
  img[:, :, 2] = np.random.normal(0, 0.1, (img.shape[:2]))
  plt.imshow(img + 0.5)
  </code></pre>
  <p><a href="https://i.sstatic.net/ZhzXi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZhzXi.png" alt="Peppers image with second and third channel dropped" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-26T05:49:00.453Z
Answers.Text: Thank you so much! I understand with examples.
Answers.UserDisplayName: Yang
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-24T06:13:00.390Z
Answers.LastActivityDate: 2023-07-24T06:13:00.390Z
Answers.UserDisplayName: Alexander Wan
Body: <p>I'm reading about contrastive learning paper, they use data augmentation as method.</p>
  <p>By the way, I have some questions about data augmentation. What is color dropping?</p>
  <p>color jittering is changing HSL(Hue, saturation, lightness) on image. But I don't know color dropping.</p>
  <p>I search on google, but it doesn't help. I assumed color dropping as ...</p>
  <ol>
  <li>bluring?</li>
  <li>remove color on image? then show as grayscale or binary image?</li>
  <li>add some colored water drops on image? like raining windows which rain  contained color water.</li>
  <li>change the color some part on image?</li>
  <li>change a image as pointillism art?</li>
  </ol>
  <p>I really don't know color dropping on data augmentation. could you help me?</p>
  <p>Thank you.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-23T17:33:39.747Z
Comments.Text: Could you link the paper related to your question?
Comments.UserDisplayName: Luca Anzalone
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-24T02:56:55.357Z
Comments.Text: @LucaAnzalone Sure. I give a paper's title by ISO 690 format, I recommand to search [google scholar](scholar.google.co.kr).
  
  
  1. CHEN, Ting, et al. A simple framework for contrastive learning of visual representations. In: International conference on machine learning. PMLR, 2020. p. 1597-1607.
  
  they reference second paper's title, but That couldn't search with "color drop"
  
  2. HOWARD, Andrew G. Some improvements on deep convolutional neural network based image classification. arXiv preprint arXiv:1312.5402, 2013.
  
  It cannot find about "color drop"
Comments.UserDisplayName: Yang
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-24T02:57:29.677Z
Comments.Text: @LucaAnzalone 3. HENAFF, Olivier. Data-efficient image recognition with contrastive predictive coding. In: International conference on machine learning. PMLR, 2020. p. 4182-4192.
  
  They reference fourth paper's title, but I couldn't understand fourth paper's key sentence yet.
Comments.UserDisplayName: Yang
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-24T02:57:37.337Z
Comments.Text: @LucaAnzalone 4. DOERSCH, Carl; GUPTA, Abhinav; EFROS, Alexei A. Unsupervised visual representation learning by context prediction. In: Proceedings of the IEEE international conference on computer vision. 2015. p. 1422-1430.
  
  They said "An alternative approach is to randomly drop 2 of the 3 color channels from each patch('color dropping'), replacing the dropped colors with gaussian noise" on 4th page in pdf, or 1425 page in paper. I think this is key sentense, but still confused what's the meaning of the drop in this sentense. there are any existed example pictures, so I am confused.
Comments.UserDisplayName: Yang
Tags: <data-augmentation>
Title: what's color dropping meaning in data augmentation?
UserDisplayName: Yang
ThreadText: # what's color dropping meaning in data augmentation?
  
  (Asked by: username_0 on 2023-07-23)
  
  I'm reading about contrastive learning paper, they use data augmentation as method.
  
  By the way, I have some questions about data augmentation. What is color dropping?
  
  color jittering is changing HSL(Hue, saturation, lightness) on image. But I don't know color dropping.
  
  I search on google, but it doesn't help. I assumed color dropping as ...
  
  1. bluring?
  2. remove color on image? then show as grayscale or binary image?
  3. add some colored water drops on image? like raining windows which rain contained color water.
  4. change the color some part on image?
  5. change a image as pointillism art?
  
  I really don't know color dropping on data augmentation. could you help me?
  
  Thank you.
  
  **Tags:** data-augmentation
  > **Comments:**
  > **username_1**: Could you link the paper related to your question?  
  > **username_0**: @LucaAnzalone Sure. I give a paper's title by ISO 690 format, I recommand to search [google scholar](scholar.google.co.kr).   1. CHEN, Ting, et al. A simple framework for contrastive learning of visual representations. In: International conference on machine learning. PMLR, 2020. p. 1597-1607.  they reference second paper's title, but That couldn't search with "color drop"  2. HOWARD, Andrew G. Some improvements on deep convolutional neural network based image classification. arXiv preprint arXiv:1312.5402, 2013.  It cannot find about "color drop"  
  > **username_0**: @LucaAnzalone 3. HENAFF, Olivier. Data-efficient image recognition with contrastive predictive coding. In: International conference on machine learning. PMLR, 2020. p. 4182-4192.  They reference fourth paper's title, but I couldn't understand fourth paper's key sentence yet.  
  > **username_0**: @LucaAnzalone 4. DOERSCH, Carl; GUPTA, Abhinav; EFROS, Alexei A. Unsupervised visual representation learning by context prediction. In: Proceedings of the IEEE international conference on computer vision. 2015. p. 1422-1430.  They said "An alternative approach is to randomly drop 2 of the 3 color channels from each patch('color dropping'), replacing the dropped colors with gaussian noise" on 4th page in pdf, or 1425 page in paper. I think this is key sentense, but still confused what's the meaning of the drop in this sentense. there are any existed example pictures, so I am confused.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-07-24. Score: 1 | Accepted answer
  
  By dropping color channels, they mean replacing the color channel with noise.
  For example:
  import numpy as np
  import cv2
  import matplotlib.pyplot as plt
  
  test_image_path = '4.2.07.tiff' # peppers from https://sipi.usc.edu/database/database.php
  
  # read image
  img = cv2.imread(test_image_path, cv2.IMREAD_COLOR)
  img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
  img = img.astype(float)
  img = (img / 255.0) - 0.5
  plt.imshow(img + 0.5)
  
  
  Then dropping channels (the output will vary based on how the parameters of the gaussian noise):
  # keep the first channel, drop the other two
  img[:, :, 1] = np.random.normal(0, 0.1, (img.shape[:2]))
  img[:, :, 2] = np.random.normal(0, 0.1, (img.shape[:2]))
  plt.imshow(img + 0.5)
  
  > **Comments:**
  > **username_0**: Thank you so much! I understand with examples.  
  
  ---
  
  