{
  "id": 99464,
  "title": "RGB images or 6-channels images as an input?",
  "url": "/competitions/recursion-cellular-image-classification/discussion/99464",
  "author_name": "grib0ed0v",
  "post_date": "2019-07-11T14:56:21.338000",
  "votes": 3,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I wonder, if somebody can clarify what is better - usage of RGB images or 6-channels images? For my current approach 6-channels way is better for some reason, but personally, I don't have deep understanding why.</p>",
  "messages": [
    {
      "id": 572983,
      "postDate": "2019-07-11T16:10:31.520Z",
      "content": "<p>I think 6-channel images are expected to be better for a couple of reasons:\n- 6 channel to RGB is a transformation which can be learned by the network\n- 6 channels contain more information\n- conversion to RGB leads to over-saturation in some cases (white regions) which do not appear in original data, thus loosing even more information</p>\n\n<p>I didn't try using RGB though, due to above thoughts.</p>",
      "rawMarkdown": "I think 6-channel images are expected to be better for a couple of reasons:\n- 6 channel to RGB is a transformation which can be learned by the network\n- 6 channels contain more information\n- conversion to RGB leads to over-saturation in some cases (white regions) which do not appear in original data, thus loosing even more information\n\nI didn't try using RGB though, due to above thoughts.",
      "votes": 5,
      "replies": [
        {
          "id": 573320,
          "postDate": "2019-07-12T05:46:00.593Z",
          "content": "<p>I tried and quickly realised there are a lot of 255 pixel values which prevented learning (your third point). Changing to 6 channels gave immediate boost.</p>",
          "rawMarkdown": "I tried and quickly realised there are a lot of 255 pixel values which prevented learning (your third point). Changing to 6 channels gave immediate boost.",
          "votes": 1
        }
      ]
    },
    {
      "id": 572904,
      "postDate": "2019-07-11T14:56:21.340Z",
      "content": "<p>I wonder, if somebody can clarify what is better - usage of RGB images or 6-channels images? For my current approach 6-channels way is better for some reason, but personally, I don't have deep understanding why.</p>",
      "rawMarkdown": "I wonder, if somebody can clarify what is better - usage of RGB images or 6-channels images? For my current approach 6-channels way is better for some reason, but personally, I don't have deep understanding why.",
      "votes": 3
    },
    {
      "id": 573635,
      "postDate": "2019-07-12T14:35:54.883Z",
      "content": "<p>I didn't ever try 3-channel RGB images, my intuition tells me that 6-channel must be better.\nI have compared 2 approaches:\n1. Add conv layer to very beginning of the existing pretrained model to convert 6 channels to 3 channels tensor.\n2. Replace first conv layer with random initialization of existing model to adapt it to 6-channel images \nIt was surprising for me that first approach was slightly better.\nThere is third approach, that is the same as second, but new conv layer must be initialized with distribution as original pretrained layer.</p>",
      "rawMarkdown": "I didn't ever try 3-channel RGB images, my intuition tells me that 6-channel must be better.\nI have compared 2 approaches:\n1. Add conv layer to very beginning of the existing pretrained model to convert 6 channels to 3 channels tensor.\n2. Replace first conv layer with random initialization of existing model to adapt it to 6-channel images \nIt was surprising for me that first approach was slightly better.\nThere is third approach, that is the same as second, but new conv layer must be initialized with distribution as original pretrained layer.",
      "votes": 4
    },
    {
      "id": 574988,
      "postDate": "2019-07-14T19:56:34.360Z",
      "content": "<p>I seem to be having a lot of overfitting when using the 6-channel approach.  Is this something you encountered aswell?  </p>\n\n<p>Using RGB images, this was much less of an issue for me.  i'm struggling so far to improve on my RGB score with the raw PNG channels as input</p>",
      "rawMarkdown": "I seem to be having a lot of overfitting when using the 6-channel approach.  Is this something you encountered aswell?  \n\nUsing RGB images, this was much less of an issue for me.  i'm struggling so far to improve on my RGB score with the raw PNG channels as input"
    },
    {
      "id": 574254,
      "postDate": "2019-07-13T14:18:09.730Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 574457,
          "postDate": "2019-07-13T21:29:01.880Z",
          "content": "<p>at training time you can just sample one of two sites as single image, at eval/test time you can make predictions on both sites and aggregate them somehow</p>",
          "rawMarkdown": "at training time you can just sample one of two sites as single image, at eval/test time you can make predictions on both sites and aggregate them somehow",
          "votes": 6
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 572983,
      "author_name": "Konstantin Lopukhin",
      "author_url": "",
      "post_date": "2019-07-11T16:10:31.520000",
      "content": "<p>I think 6-channel images are expected to be better for a couple of reasons:\n- 6 channel to RGB is a transformation which can be learned by the network\n- 6 channels contain more information\n- conversion to RGB leads to over-saturation in some cases (white regions) which do not appear in original data, thus loosing even more information</p>\n\n<p>I didn't try using RGB though, due to above thoughts.</p>",
      "votes": 5,
      "replies": [
        {
          "id": 573320,
          "author_name": "Miroslav Valan",
          "author_url": "",
          "post_date": "2019-07-12T05:46:00.593000",
          "content": "<p>I tried and quickly realised there are a lot of 255 pixel values which prevented learning (your third point). Changing to 6 channels gave immediate boost.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 573635,
      "author_name": "Nazar",
      "author_url": "",
      "post_date": "2019-07-12T14:35:54.883000",
      "content": "<p>I didn't ever try 3-channel RGB images, my intuition tells me that 6-channel must be better.\nI have compared 2 approaches:\n1. Add conv layer to very beginning of the existing pretrained model to convert 6 channels to 3 channels tensor.\n2. Replace first conv layer with random initialization of existing model to adapt it to 6-channel images \nIt was surprising for me that first approach was slightly better.\nThere is third approach, that is the same as second, but new conv layer must be initialized with distribution as original pretrained layer.</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 574988,
      "author_name": "PieterBlomme",
      "author_url": "",
      "post_date": "2019-07-14T19:56:34.360000",
      "content": "<p>I seem to be having a lot of overfitting when using the 6-channel approach.  Is this something you encountered aswell?  </p>\n\n<p>Using RGB images, this was much less of an issue for me.  i'm struggling so far to improve on my RGB score with the raw PNG channels as input</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 574254,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-07-13T14:18:09.730000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 574457,
          "author_name": "Vlad Shmyhlo ",
          "author_url": "",
          "post_date": "2019-07-13T21:29:01.880000",
          "content": "<p>at training time you can just sample one of two sites as single image, at eval/test time you can make predictions on both sites and aggregate them somehow</p>",
          "votes": 6,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "572983": "I think 6-channel images are expected to be better for a couple of reasons:\n- 6 channel to RGB is a transformation which can be learned by the network\n- 6 channels contain more information\n- conversion to RGB leads to over-saturation in some cases (white regions) which do not appear in original data, thus loosing even more information\n\nI didn't try using RGB though, due to above thoughts.",
    "572904": "I wonder, if somebody can clarify what is better - usage of RGB images or 6-channels images? For my current approach 6-channels way is better for some reason, but personally, I don't have deep understanding why.",
    "573635": "I didn't ever try 3-channel RGB images, my intuition tells me that 6-channel must be better.\nI have compared 2 approaches:\n1. Add conv layer to very beginning of the existing pretrained model to convert 6 channels to 3 channels tensor.\n2. Replace first conv layer with random initialization of existing model to adapt it to 6-channel images \nIt was surprising for me that first approach was slightly better.\nThere is third approach, that is the same as second, but new conv layer must be initialized with distribution as original pretrained layer.",
    "574988": "I seem to be having a lot of overfitting when using the 6-channel approach.  Is this something you encountered aswell?  \n\nUsing RGB images, this was much less of an issue for me.  i'm struggling so far to improve on my RGB score with the raw PNG channels as input",
    "574254": ""
  }
}