{
  "id": 336109,
  "title": "Images - the first impressions and what's next",
  "url": "/competitions/mayo-clinic-strip-ai/discussion/336109",
  "author_name": "Robert Kwiatkowski",
  "post_date": "2022-07-09T11:17:44.937000",
  "votes": 9,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I've created an <a href=\"https://www.kaggle.com/code/datark1/eda-images-processing-and-exploration\" target=\"_blank\">EDA notebook</a> showing how to open provided images using various Python libraries. After looking at many samples these are my first impressions:</p>\n<ol>\n<li>Images sizes are from small ones to  high-resolution ones</li>\n<li>Images have different aspect ratios</li>\n<li>A significant amount of images is a background</li>\n<li>Backgrounds have different colours</li>\n<li>Clots are usually in the form of multiple small pieces</li>\n<li>Blood clots have different colours</li>\n</ol>\n<p><strong>What next? \nQuestions to answer, discussion and proposals.</strong><br>\n<strong>ad. 1&amp;2:</strong> Slice pictures into smaller and equal samples. Already done by <a href=\"https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335755\" target=\"_blank\">Rob Mulal</a>. If you are interested in the implementation he used here's Rob's <a href=\"https://www.kaggle.com/code/robikscube/mayo-clinic-image-dataset-1024-jpg\" target=\"_blank\">notebook</a>.<br>\n<strong>ad. 3&amp;4:</strong> Removal of background, equalising all to e.g. white. I'll try to process the pictures  Rob Mulla provided and add this step to my notebook so you can reuse it. Any good libraries, techniques or resources to do it?<br>\n<strong>ad. 5:</strong> Should we use each piece separately as an input or is it essential to have it all in one?<br>\n<strong>ad. 6:</strong> Does the colour of a blood cloth matter? Is any subject matter expert here?</p>",
  "messages": [
    {
      "id": 1849287,
      "postDate": "2022-07-09T11:17:44.937Z",
      "content": "<p>I've created an <a href=\"https://www.kaggle.com/code/datark1/eda-images-processing-and-exploration\" target=\"_blank\">EDA notebook</a> showing how to open provided images using various Python libraries. After looking at many samples these are my first impressions:</p>\n<ol>\n<li>Images sizes are from small ones to  high-resolution ones</li>\n<li>Images have different aspect ratios</li>\n<li>A significant amount of images is a background</li>\n<li>Backgrounds have different colours</li>\n<li>Clots are usually in the form of multiple small pieces</li>\n<li>Blood clots have different colours</li>\n</ol>\n<p><strong>What next? \nQuestions to answer, discussion and proposals.</strong><br>\n<strong>ad. 1&amp;2:</strong> Slice pictures into smaller and equal samples. Already done by <a href=\"https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335755\" target=\"_blank\">Rob Mulal</a>. If you are interested in the implementation he used here's Rob's <a href=\"https://www.kaggle.com/code/robikscube/mayo-clinic-image-dataset-1024-jpg\" target=\"_blank\">notebook</a>.<br>\n<strong>ad. 3&amp;4:</strong> Removal of background, equalising all to e.g. white. I'll try to process the pictures  Rob Mulla provided and add this step to my notebook so you can reuse it. Any good libraries, techniques or resources to do it?<br>\n<strong>ad. 5:</strong> Should we use each piece separately as an input or is it essential to have it all in one?<br>\n<strong>ad. 6:</strong> Does the colour of a blood cloth matter? Is any subject matter expert here?</p>",
      "rawMarkdown": "I've created an [EDA notebook](https://www.kaggle.com/code/datark1/eda-images-processing-and-exploration) showing how to open provided images using various Python libraries. After looking at many samples these are my first impressions:\n1. Images sizes are from small ones to  high-resolution ones\n2. Images have different aspect ratios\n3. A significant amount of images is a background\n4. Backgrounds have different colours\n5. Clots are usually in the form of multiple small pieces\n6. Blood clots have different colours\n\n**What next? \nQuestions to answer, discussion and proposals.**\n**ad. 1&2:** Slice pictures into smaller and equal samples. Already done by [Rob Mulal](https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335755). If you are interested in the implementation he used here's Rob's [notebook](https://www.kaggle.com/code/robikscube/mayo-clinic-image-dataset-1024-jpg).\n**ad. 3&4:** Removal of background, equalising all to e.g. white. I'll try to process the pictures  Rob Mulla provided and add this step to my notebook so you can reuse it. Any good libraries, techniques or resources to do it?\n**ad. 5:** Should we use each piece separately as an input or is it essential to have it all in one?\n**ad. 6:** Does the colour of a blood cloth matter? Is any subject matter expert here?\n",
      "votes": 8
    },
    {
      "id": 1849795,
      "postDate": "2022-07-09T19:56:38.990Z",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/datark1\" target=\"_blank\">@datark1</a> ! My approach so far has been manually labelling thousands of Rob's images into background or clot. With this I trained a binary classifier using an EficientNet so I can get rid of these undesired backgrounds which add noise and more computation. I will probably upload in the coming days a distilled version of Rob's dataset containing only clots so everyone can train a final classifier on these images. Checkout my notebook if you like!</p>",
      "rawMarkdown": "Hello @datark1 ! My approach so far has been manually labelling thousands of Rob's images into background or clot. With this I trained a binary classifier using an EficientNet so I can get rid of these undesired backgrounds which add noise and more computation. I will probably upload in the coming days a distilled version of Rob's dataset containing only clots so everyone can train a final classifier on these images. Checkout my notebook if you like!",
      "votes": 2,
      "replies": [
        {
          "id": 1850596,
          "postDate": "2022-07-10T14:11:06.650Z",
          "content": "<p><a href=\"https://www.kaggle.com/alejopaullier\" target=\"_blank\">@alejopaullier</a> nice job! I'm thinking currently about the automatic labelling of images based on the colour histogram range. How did you label the tile where less than half of the image is containing a blood clot?</p>",
          "rawMarkdown": "@alejopaullier nice job! I'm thinking currently about the automatic labelling of images based on the colour histogram range. How did you label the tile where less than half of the image is containing a blood clot?"
        }
      ]
    },
    {
      "id": 1849951,
      "postDate": "2022-07-10T00:35:59.247Z",
      "content": "<p>Thanks for this helpful information. I think it would be helpful to also include a discussion of how to deal with different image sizes and resolutions. For example, how would you Downsample high-resolution images to lower resolutions? And how would you go about upsampling lower resolution images?</p>",
      "rawMarkdown": "Thanks for this helpful information. I think it would be helpful to also include a discussion of how to deal with different image sizes and resolutions. For example, how would you Downsample high-resolution images to lower resolutions? And how would you go about upsampling lower resolution images?\n\n"
    },
    {
      "id": 1849869,
      "postDate": "2022-07-09T22:45:30.367Z",
      "content": "<p>Great topic. I hope other experienced kagglers (not me) could share their insights about the questions you proposed.</p>\n<p>About the color of the blood, I didn't find anything. Only mentions about ischemic stroke/brain clogged and hemorrhagic CVA (cerebrovascular accident, not this competition) bleeding interfering with brain's functions.  Though nothing about the colour of a blood cloth.</p>\n<p>None about if there is less pigments on ischemics CVAs.</p>",
      "rawMarkdown": "Great topic. I hope other experienced kagglers (not me) could share their insights about the questions you proposed.\n\nAbout the color of the blood, I didn't find anything. Only mentions about ischemic stroke/brain clogged and hemorrhagic CVA (cerebrovascular accident, not this competition) bleeding interfering with brain's functions.  Though nothing about the colour of a blood cloth.\n\nNone about if there is less pigments on ischemics CVAs."
    }
  ],
  "comments": [
    {
      "id": 1849795,
      "author_name": "moth",
      "author_url": "",
      "post_date": "2022-07-09T19:56:38.990000",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/datark1\" target=\"_blank\">@datark1</a> ! My approach so far has been manually labelling thousands of Rob's images into background or clot. With this I trained a binary classifier using an EficientNet so I can get rid of these undesired backgrounds which add noise and more computation. I will probably upload in the coming days a distilled version of Rob's dataset containing only clots so everyone can train a final classifier on these images. Checkout my notebook if you like!</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1850596,
          "author_name": "Robert Kwiatkowski",
          "author_url": "",
          "post_date": "2022-07-10T14:11:06.650000",
          "content": "<p><a href=\"https://www.kaggle.com/alejopaullier\" target=\"_blank\">@alejopaullier</a> nice job! I'm thinking currently about the automatic labelling of images based on the colour histogram range. How did you label the tile where less than half of the image is containing a blood clot?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1849951,
      "author_name": "The Devastator",
      "author_url": "",
      "post_date": "2022-07-10T00:35:59.247000",
      "content": "<p>Thanks for this helpful information. I think it would be helpful to also include a discussion of how to deal with different image sizes and resolutions. For example, how would you Downsample high-resolution images to lower resolutions? And how would you go about upsampling lower resolution images?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1849869,
      "author_name": "Marília Prata",
      "author_url": "",
      "post_date": "2022-07-09T22:45:30.367000",
      "content": "<p>Great topic. I hope other experienced kagglers (not me) could share their insights about the questions you proposed.</p>\n<p>About the color of the blood, I didn't find anything. Only mentions about ischemic stroke/brain clogged and hemorrhagic CVA (cerebrovascular accident, not this competition) bleeding interfering with brain's functions.  Though nothing about the colour of a blood cloth.</p>\n<p>None about if there is less pigments on ischemics CVAs.</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1849287": "I've created an [EDA notebook](https://www.kaggle.com/code/datark1/eda-images-processing-and-exploration) showing how to open provided images using various Python libraries. After looking at many samples these are my first impressions:\n1. Images sizes are from small ones to  high-resolution ones\n2. Images have different aspect ratios\n3. A significant amount of images is a background\n4. Backgrounds have different colours\n5. Clots are usually in the form of multiple small pieces\n6. Blood clots have different colours\n\n**What next? \nQuestions to answer, discussion and proposals.**\n**ad. 1&2:** Slice pictures into smaller and equal samples. Already done by [Rob Mulal](https://www.kaggle.com/competitions/mayo-clinic-strip-ai/discussion/335755). If you are interested in the implementation he used here's Rob's [notebook](https://www.kaggle.com/code/robikscube/mayo-clinic-image-dataset-1024-jpg).\n**ad. 3&4:** Removal of background, equalising all to e.g. white. I'll try to process the pictures  Rob Mulla provided and add this step to my notebook so you can reuse it. Any good libraries, techniques or resources to do it?\n**ad. 5:** Should we use each piece separately as an input or is it essential to have it all in one?\n**ad. 6:** Does the colour of a blood cloth matter? Is any subject matter expert here?\n",
    "1849795": "Hello @datark1 ! My approach so far has been manually labelling thousands of Rob's images into background or clot. With this I trained a binary classifier using an EficientNet so I can get rid of these undesired backgrounds which add noise and more computation. I will probably upload in the coming days a distilled version of Rob's dataset containing only clots so everyone can train a final classifier on these images. Checkout my notebook if you like!",
    "1849951": "Thanks for this helpful information. I think it would be helpful to also include a discussion of how to deal with different image sizes and resolutions. For example, how would you Downsample high-resolution images to lower resolutions? And how would you go about upsampling lower resolution images?\n\n",
    "1849869": "Great topic. I hope other experienced kagglers (not me) could share their insights about the questions you proposed.\n\nAbout the color of the blood, I didn't find anything. Only mentions about ischemic stroke/brain clogged and hemorrhagic CVA (cerebrovascular accident, not this competition) bleeding interfering with brain's functions.  Though nothing about the colour of a blood cloth.\n\nNone about if there is less pigments on ischemics CVAs."
  }
}