{
  "id": 48017,
  "title": "Separate images by type and create model for each",
  "url": "/competitions/data-science-bowl-2018/discussion/48017",
  "author_name": "",
  "post_date": "2018-01-22T11:14:14.436978100Z",
  "votes": 1,
  "comment_count": 8,
  "views": 0,
  "content": "<p>I just wondered after seeing <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/47640\">this topic</a> that if there are 3 different image types would it be useful to create an cv algorithm which can tell from an image which types it belongs to (this is the easy part) and then create 3 different models with the separated train images and masks?</p>\n\n<p>And when creating the submission, decide from the test image which type is it and after use the model for that specific type.</p>\n\n<p>I know it is a lot to ask, but is there anyone tried that? I am planning to create a kernel with this approach, I just don't want to spend time with it, if someone already tried that and the results are not that good as I expected.</p>\n\n<p>Also, I am really interested what are your thoughts on this method.</p>",
  "messages": [
    {
      "id": "272151",
      "postDate": "01/22/2018 11:14:14",
      "content": "<p>I just wondered after seeing <a href=\"https://www.kaggle.com/c/data-science-bowl-2018/discussion/47640\">this topic</a> that if there are 3 different image types would it be useful to create an cv algorithm which can tell from an image which types it belongs to (this is the easy part) and then create 3 different models with the separated train images and masks?</p>\n\n<p>And when creating the submission, decide from the test image which type is it and after use the model for that specific type.</p>\n\n<p>I know it is a lot to ask, but is there anyone tried that? I am planning to create a kernel with this approach, I just don't want to spend time with it, if someone already tried that and the results are not that good as I expected.</p>\n\n<p>Also, I am really interested what are your thoughts on this method.</p>",
      "rawMarkdown": "I just wondered after seeing [this topic](https://www.kaggle.com/c/data-science-bowl-2018/discussion/47640) that if there are 3 different image types would it be useful to create an cv algorithm which can tell from an image which types it belongs to (this is the easy part) and then create 3 different models with the separated train images and masks?\n\nAnd when creating the submission, decide from the test image which type is it and after use the model for that specific type.\n\nI know it is a lot to ask, but is there anyone tried that? I am planning to create a kernel with this approach, I just don't want to spend time with it, if someone already tried that and the results are not that good as I expected.\n\nAlso, I am really interested what are your thoughts on this method.",
      "votes": null
    },
    {
      "id": "272169",
      "postDate": "01/22/2018 12:16:32",
      "content": "<p>What to do with new image types in Stage2 test data?</p>",
      "rawMarkdown": "What to do with new image types in Stage2 test data?",
      "votes": null
    },
    {
      "id": "272175",
      "postDate": "01/22/2018 12:47:48",
      "content": "<p>Hi, I am doing exactly the same. Here is notebook for defining type of image: <a href=\"https://www.kaggle.com/nhargan/defining-microscopy-type\">https://www.kaggle.com/nhargan/defining-microscopy-type</a> . Approach is very primitive but looks correct. Also I've found that test set not contains brightfield images.</p>",
      "rawMarkdown": "Hi, I am doing exactly the same. Here is notebook for defining type of image: https://www.kaggle.com/nhargan/defining-microscopy-type . Approach is very primitive but looks correct. Also I've found that test set not contains brightfield images.",
      "votes": null
    },
    {
      "id": "272182",
      "postDate": "01/22/2018 12:56:28",
      "content": "<p>It's not primitive, I don't think that we would need a complex algorithm for the separation. At maximum PCA+KNN but a basic CV algorithm is enough.</p>",
      "rawMarkdown": "It's not primitive, I don't think that we would need a complex algorithm for the separation. At maximum PCA+KNN but a basic CV algorithm is enough.",
      "votes": null
    },
    {
      "id": "272187",
      "postDate": "01/22/2018 13:05:36",
      "content": "<p>I'm not afraid, I would do the same. :D Okay,...with a small modification. 4 models instead of 3. The extra model would be trained on all the train data.\nFirst, see which is the closest image-type-class and than predict it with the corresponding model. If the image is \"too far\" from the other train images (in the space what we define for the separation) than I would use the extra model for the prediction.</p>",
      "rawMarkdown": "I'm not afraid, I would do the same. :D Okay,...with a small modification. 4 models instead of 3. The extra model would be trained on all the train data.\nFirst, see which is the closest image-type-class and than predict it with the corresponding model. If the image is \"too far\" from the other train images (in the space what we define for the separation) than I would use the extra model for the prediction.",
      "votes": null
    },
    {
      "id": "272197",
      "postDate": "01/22/2018 13:27:06",
      "content": "<p>I think some pre-processing will eliminate the need for different models for each category. For example, converting RGB to L*a*b and keeping only L (lightness) will help. I am still trying to figure out the best way.</p>",
      "rawMarkdown": "I think some pre-processing will eliminate the need for different models for each category. For example, converting RGB to L*a*b and keeping only L (lightness) will help. I am still trying to figure out the best way.",
      "votes": null
    },
    {
      "id": "272199",
      "postDate": "01/22/2018 13:30:14",
      "content": "<p>As for me, L*a*b color space is expensive in this case. Why don't make just RGB-&gt;grayscale conversion?</p>",
      "rawMarkdown": "As for me, L*a*b color space is expensive in this case. Why don't make just RGB-&gt;grayscale conversion?",
      "votes": null
    },
    {
      "id": "272204",
      "postDate": "01/22/2018 13:43:50",
      "content": "<p>I don't think they have the same effect. L only shows lightness regardless of the color whereas grayscale pixel encodes color info as well.</p>",
      "rawMarkdown": "I don't think they have the same effect. L only shows lightness regardless of the color whereas grayscale pixel encodes color info as well.",
      "votes": null
    },
    {
      "id": "272215",
      "postDate": "01/22/2018 14:50:53",
      "content": "<p>I already use grayscale in <a href=\"https://www.kaggle.com/gaborvecsei/basic-pure-computer-vision-segmentation-lb-0-229\">this kernel</a></p>\n\n<p>@Morteza has the point, also HSV can work</p>",
      "rawMarkdown": "I already use grayscale in [this kernel](https://www.kaggle.com/gaborvecsei/basic-pure-computer-vision-segmentation-lb-0-229)\n\n@Morteza has the point, also HSV can work",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 272169,
      "author_name": "ramzes2",
      "author_url": "",
      "post_date": "01/22/2018 12:16:32",
      "content": "<p>What to do with new image types in Stage2 test data?</p>",
      "votes": null,
      "replies": [
        {
          "id": 272187,
          "author_name": "gaborvecsei",
          "author_url": "",
          "post_date": "01/22/2018 13:05:36",
          "content": "<p>I'm not afraid, I would do the same. :D Okay,...with a small modification. 4 models instead of 3. The extra model would be trained on all the train data.\nFirst, see which is the closest image-type-class and than predict it with the corresponding model. If the image is \"too far\" from the other train images (in the space what we define for the separation) than I would use the extra model for the prediction.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 272175,
      "author_name": "nhargan",
      "author_url": "",
      "post_date": "01/22/2018 12:47:48",
      "content": "<p>Hi, I am doing exactly the same. Here is notebook for defining type of image: <a href=\"https://www.kaggle.com/nhargan/defining-microscopy-type\">https://www.kaggle.com/nhargan/defining-microscopy-type</a> . Approach is very primitive but looks correct. Also I've found that test set not contains brightfield images.</p>",
      "votes": null,
      "replies": [
        {
          "id": 272182,
          "author_name": "gaborvecsei",
          "author_url": "",
          "post_date": "01/22/2018 12:56:28",
          "content": "<p>It's not primitive, I don't think that we would need a complex algorithm for the separation. At maximum PCA+KNN but a basic CV algorithm is enough.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 272197,
      "author_name": "mrtzmilani",
      "author_url": "",
      "post_date": "01/22/2018 13:27:06",
      "content": "<p>I think some pre-processing will eliminate the need for different models for each category. For example, converting RGB to L*a*b and keeping only L (lightness) will help. I am still trying to figure out the best way.</p>",
      "votes": null,
      "replies": [
        {
          "id": 272199,
          "author_name": "ramzes2",
          "author_url": "",
          "post_date": "01/22/2018 13:30:14",
          "content": "<p>As for me, L*a*b color space is expensive in this case. Why don't make just RGB-&gt;grayscale conversion?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 272204,
          "author_name": "mrtzmilani",
          "author_url": "",
          "post_date": "01/22/2018 13:43:50",
          "content": "<p>I don't think they have the same effect. L only shows lightness regardless of the color whereas grayscale pixel encodes color info as well.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 272215,
          "author_name": "gaborvecsei",
          "author_url": "",
          "post_date": "01/22/2018 14:50:53",
          "content": "<p>I already use grayscale in <a href=\"https://www.kaggle.com/gaborvecsei/basic-pure-computer-vision-segmentation-lb-0-229\">this kernel</a></p>\n\n<p>@Morteza has the point, also HSV can work</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "272151": "I just wondered after seeing [this topic](https://www.kaggle.com/c/data-science-bowl-2018/discussion/47640) that if there are 3 different image types would it be useful to create an cv algorithm which can tell from an image which types it belongs to (this is the easy part) and then create 3 different models with the separated train images and masks?\n\nAnd when creating the submission, decide from the test image which type is it and after use the model for that specific type.\n\nI know it is a lot to ask, but is there anyone tried that? I am planning to create a kernel with this approach, I just don't want to spend time with it, if someone already tried that and the results are not that good as I expected.\n\nAlso, I am really interested what are your thoughts on this method.",
    "272169": "What to do with new image types in Stage2 test data?",
    "272175": "Hi, I am doing exactly the same. Here is notebook for defining type of image: https://www.kaggle.com/nhargan/defining-microscopy-type . Approach is very primitive but looks correct. Also I've found that test set not contains brightfield images.",
    "272182": "It's not primitive, I don't think that we would need a complex algorithm for the separation. At maximum PCA+KNN but a basic CV algorithm is enough.",
    "272187": "I'm not afraid, I would do the same. :D Okay,...with a small modification. 4 models instead of 3. The extra model would be trained on all the train data.\nFirst, see which is the closest image-type-class and than predict it with the corresponding model. If the image is \"too far\" from the other train images (in the space what we define for the separation) than I would use the extra model for the prediction.",
    "272197": "I think some pre-processing will eliminate the need for different models for each category. For example, converting RGB to L*a*b and keeping only L (lightness) will help. I am still trying to figure out the best way.",
    "272199": "As for me, L*a*b color space is expensive in this case. Why don't make just RGB-&gt;grayscale conversion?",
    "272204": "I don't think they have the same effect. L only shows lightness regardless of the color whereas grayscale pixel encodes color info as well.",
    "272215": "I already use grayscale in [this kernel](https://www.kaggle.com/gaborvecsei/basic-pure-computer-vision-segmentation-lb-0-229)\n\n@Morteza has the point, also HSV can work"
  },
  "source": "meta"
}