{
  "id": 154684,
  "title": "Deal with Empty Tiles",
  "url": "/competitions/prostate-cancer-grade-assessment/discussion/154684",
  "author_name": "Jaideep",
  "post_date": "2020-05-29T11:22:49.178000",
  "votes": 4,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I think empty tiles causes lot of issues during Training . \nCan any one help how to reduce empty tiles or exclude them during the training. </p>",
  "messages": [
    {
      "id": 866411,
      "postDate": "2020-05-29T11:22:49.180Z",
      "content": "<p>I think empty tiles causes lot of issues during Training . \nCan any one help how to reduce empty tiles or exclude them during the training. </p>",
      "rawMarkdown": "I think empty tiles causes lot of issues during Training . \nCan any one help how to reduce empty tiles or exclude them during the training. \n",
      "votes": 4
    },
    {
      "id": 866541,
      "postDate": "2020-05-29T13:30:10.357Z",
      "content": "<p>Use them as augmentations.  Add empty white or black tiles during training randomly if you are using tile approach. Or just randomly repeat tissue tiles to fill for emptiness ... </p>",
      "rawMarkdown": "Use them as augmentations.  Add empty white or black tiles during training randomly if you are using tile approach. Or just randomly repeat tissue tiles to fill for emptiness ... ",
      "votes": 1,
      "replies": [
        {
          "id": 866556,
          "postDate": "2020-05-29T13:44:42.160Z",
          "content": "<p>thanks i thought about second one.. but only thing can it push the slide towards false higher ISUP grade ... if that tile contains infected tissues ?</p>",
          "rawMarkdown": "thanks i thought about second one.. but only thing can it push the slide towards false higher ISUP grade ... if that tile contains infected tissues ?",
          "votes": 1
        },
        {
          "id": 866921,
          "postDate": "2020-05-29T19:34:26.183Z",
          "content": "<p>I have tried tried both options and have even combined them to see what would happen. So far, adding random white tiles seems to help whereas \"padding\" images is still unknown to me. I was thinking maybe to \"average\" the tissue and fill the empty parts with the average.</p>",
          "rawMarkdown": "I have tried tried both options and have even combined them to see what would happen. So far, adding random white tiles seems to help whereas \"padding\" images is still unknown to me. I was thinking maybe to \"average\" the tissue and fill the empty parts with the average.",
          "votes": 1
        },
        {
          "id": 868416,
          "postDate": "2020-05-31T07:55:25.077Z",
          "content": "<p><a href=\"/drhabib\">@drhabib</a> <br>\n1) Are you using tile method or any other\n2) i have seen in one of kernel using open slide for tile extraction that below code is used to find x.y coordinate of next patch to be extracted.. Do you know why downsamples[crop_level] is multiplied. If i try to use any other stride method i get too many blank tiles \n  <code>\n x_location = h*crop_size*down_samples[crop_level]\n   y_location = v*crop_size*down_samples[crop_level]\n</code></p>",
          "rawMarkdown": "@drhabib  \n1) Are you using tile method or any other\n2) i have seen in one of kernel using open slide for tile extraction that below code is used to find x.y coordinate of next patch to be extracted.. Do you know why downsamples[crop_level] is multiplied. If i try to use any other stride method i get too many blank tiles \n  ```\n x_location = h*crop_size*down_samples[crop_level]\n   y_location = v*crop_size*down_samples[crop_level]\n```"
        },
        {
          "id": 870331,
          "postDate": "2020-06-01T16:21:29.573Z",
          "content": "<p>I tried both methods =) I saw small improvement on local cv of  <code>RADBOUND</code>. I might revisit this idea more carefully once I run things to try =) </p>",
          "rawMarkdown": "I tried both methods =) I saw small improvement on local cv of  `RADBOUND`. I might revisit this idea more carefully once I run things to try =) "
        },
        {
          "id": 870495,
          "postDate": "2020-06-01T17:52:09.227Z",
          "content": "<p>1)Are you training models for separate sources ?\n2)does training sources separately helps in increasing of score ?\n3) I get NaN qk values in some epochs  ,i just apply round to prediction. What could be reasons behind \n <code>\n def qk(y_pred, y):\n    #print(y_pred.size(),y.size())\n    return torch.tensor(cohen_kappa_score(torch.round(y_pred.squeeze(-1)), y, weights='quadratic'), device='cuda:0')\n</code></p>",
          "rawMarkdown": "1)Are you training models for separate sources ?\n2)does training sources separately helps in increasing of score ?\n3) I get NaN qk values in some epochs  ,i just apply round to prediction. What could be reasons behind \n ```\n def qk(y_pred, y):\n    #print(y_pred.size(),y.size())\n    return torch.tensor(cohen_kappa_score(torch.round(y_pred.squeeze(-1)), y, weights='quadratic'), device='cuda:0')\n```"
        }
      ]
    },
    {
      "id": 870137,
      "postDate": "2020-06-01T14:14:19.017Z",
      "content": "<p><a href=\"/drhabib\">@drhabib</a>  what if we remove that 100 missing labels. As there are still many images and if there exists some unbalancing in data we can handle it with focal loss. what you think abo about it?</p>",
      "rawMarkdown": "@drhabib  what if we remove that 100 missing labels. As there are still many images and if there exists some unbalancing in data we can handle it with focal loss. what you think abo about it?"
    }
  ],
  "comments": [
    {
      "id": 866541,
      "author_name": "DrHB",
      "author_url": "",
      "post_date": "2020-05-29T13:30:10.357000",
      "content": "<p>Use them as augmentations.  Add empty white or black tiles during training randomly if you are using tile approach. Or just randomly repeat tissue tiles to fill for emptiness ... </p>",
      "votes": 1,
      "replies": [
        {
          "id": 866556,
          "author_name": "Jaideep",
          "author_url": "",
          "post_date": "2020-05-29T13:44:42.160000",
          "content": "<p>thanks i thought about second one.. but only thing can it push the slide towards false higher ISUP grade ... if that tile contains infected tissues ?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 866921,
          "author_name": "Richard Xiao",
          "author_url": "",
          "post_date": "2020-05-29T19:34:26.183000",
          "content": "<p>I have tried tried both options and have even combined them to see what would happen. So far, adding random white tiles seems to help whereas \"padding\" images is still unknown to me. I was thinking maybe to \"average\" the tissue and fill the empty parts with the average.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 868416,
          "author_name": "Jaideep",
          "author_url": "",
          "post_date": "2020-05-31T07:55:25.077000",
          "content": "<p><a href=\"/drhabib\">@drhabib</a> <br>\n1) Are you using tile method or any other\n2) i have seen in one of kernel using open slide for tile extraction that below code is used to find x.y coordinate of next patch to be extracted.. Do you know why downsamples[crop_level] is multiplied. If i try to use any other stride method i get too many blank tiles \n  <code>\n x_location = h*crop_size*down_samples[crop_level]\n   y_location = v*crop_size*down_samples[crop_level]\n</code></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 870331,
          "author_name": "DrHB",
          "author_url": "",
          "post_date": "2020-06-01T16:21:29.573000",
          "content": "<p>I tried both methods =) I saw small improvement on local cv of  <code>RADBOUND</code>. I might revisit this idea more carefully once I run things to try =) </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 870495,
          "author_name": "Jaideep",
          "author_url": "",
          "post_date": "2020-06-01T17:52:09.227000",
          "content": "<p>1)Are you training models for separate sources ?\n2)does training sources separately helps in increasing of score ?\n3) I get NaN qk values in some epochs  ,i just apply round to prediction. What could be reasons behind \n <code>\n def qk(y_pred, y):\n    #print(y_pred.size(),y.size())\n    return torch.tensor(cohen_kappa_score(torch.round(y_pred.squeeze(-1)), y, weights='quadratic'), device='cuda:0')\n</code></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 870137,
      "author_name": "Mudasser Afzal",
      "author_url": "",
      "post_date": "2020-06-01T14:14:19.017000",
      "content": "<p><a href=\"/drhabib\">@drhabib</a>  what if we remove that 100 missing labels. As there are still many images and if there exists some unbalancing in data we can handle it with focal loss. what you think abo about it?</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "866411": "I think empty tiles causes lot of issues during Training . \nCan any one help how to reduce empty tiles or exclude them during the training. \n",
    "866541": "Use them as augmentations.  Add empty white or black tiles during training randomly if you are using tile approach. Or just randomly repeat tissue tiles to fill for emptiness ... ",
    "870137": "@drhabib  what if we remove that 100 missing labels. As there are still many images and if there exists some unbalancing in data we can handle it with focal loss. what you think abo about it?"
  }
}