{
  "id": 222655,
  "title": "Precomputing masks",
  "url": "/competitions/hpa-single-cell-image-classification/discussion/222655",
  "author_name": "CroDoc",
  "post_date": "2021-02-28T13:24:46.333000",
  "votes": 2,
  "comment_count": 15,
  "views": 0,
  "content": "<p>Am I allowed to create a dataset with precomputed segmentation masks along with cropped cell images and use that for faster submission?</p>",
  "messages": [
    {
      "id": 1221061,
      "postDate": "2021-02-28T16:33:51.960Z",
      "content": "<p>Since the test set used for scoring is private it is not possible to precompute the masks as your kernel only sees them when you hit Submit.</p>",
      "rawMarkdown": "Since the test set used for scoring is private it is not possible to precompute the masks as your kernel only sees them when you hit Submit.\n\n",
      "votes": 1,
      "replies": [
        {
          "id": 1221098,
          "postDate": "2021-02-28T17:07:36.023Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1221097,
          "postDate": "2021-02-28T17:07:36.023Z",
          "content": "<p>How about just using them just for the public test set? Still you get a lot of time boost…</p>",
          "rawMarkdown": "How about just using them just for the public test set? Still you get a lot of time boost...",
          "votes": 1
        },
        {
          "id": 1221123,
          "postDate": "2021-02-28T17:25:46.013Z",
          "content": "<p>I don't bother to run many public test images - I only do enough public test images when I save/commit to make sure that my batch generation is working and once I am sure of that I change the code to only do 3 images.  Several shared kernels for prediction show methods to do this.  </p>\n<p>That way when I do the submit/save than after a couple of minutes that is completed and I can do the Submit.  That saves on your GPU/TPU quota.  I not sure there is any value in running the full public test set unless you have some error that needs to be debugged.</p>",
          "rawMarkdown": "I don't bother to run many public test images - I only do enough public test images when I save/commit to make sure that my batch generation is working and once I am sure of that I change the code to only do 3 images.  Several shared kernels for prediction show methods to do this.  \n\nThat way when I do the submit/save than after a couple of minutes that is completed and I can do the Submit.  That saves on your GPU/TPU quota.  I not sure there is any value in running the full public test set unless you have some error that needs to be debugged."
        }
      ]
    },
    {
      "id": 1221068,
      "postDate": "2021-02-28T16:41:10.353Z",
      "content": "<p>I have done this here: <a href=\"https://www.kaggle.com/thedrcat/hpa-cell-tiles-test-with-enc-dataset\" target=\"_blank\">https://www.kaggle.com/thedrcat/hpa-cell-tiles-test-with-enc-dataset</a><br>\nThis will only work for the public test set, not for private. I believe this is allowed, if not please let me know. </p>",
      "rawMarkdown": "I have done this here: https://www.kaggle.com/thedrcat/hpa-cell-tiles-test-with-enc-dataset\nThis will only work for the public test set, not for private. I believe this is allowed, if not please let me know. ",
      "votes": 2,
      "replies": [
        {
          "id": 1221201,
          "postDate": "2021-02-28T18:46:39.540Z",
          "content": "<p>This is exactly what I was asking about :)</p>",
          "rawMarkdown": "This is exactly what I was asking about :)"
        },
        {
          "id": 1221250,
          "postDate": "2021-02-28T19:42:55.117Z",
          "content": "<p><a href=\"https://www.kaggle.com/philculliton\" target=\"_blank\">@philculliton</a> are you able to confirm this?</p>\n<p>Can I compute outputs &amp; masks for the public test set locally and use that in the notebook I submit as as a solution for the contest?<br>\nThis would mean saving GPU time on the public test set and only using it on the private test set… Also it would mean saving GPU time when I run the notebook before submitting …</p>\n<p>This is my first contest and I was not able to confirm this.<br>\nThanks you for your help.</p>",
          "rawMarkdown": "@philculliton are you able to confirm this?\n\nCan I compute outputs & masks for the public test set locally and use that in the notebook I submit as as a solution for the contest?\nThis would mean saving GPU time on the public test set and only using it on the private test set... Also it would mean saving GPU time when I run the notebook before submitting ...\n\nThis is my first contest and I was not able to confirm this.\nThanks you for your help."
        },
        {
          "id": 1221252,
          "postDate": "2021-02-28T19:45:33.477Z",
          "content": "<p><a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> is this how you are able submit so much? or are you just using CPU?</p>",
          "rawMarkdown": "@bestfitting is this how you are able submit so much? or are you just using CPU?"
        },
        {
          "id": 1222010,
          "postDate": "2021-03-01T13:19:20.970Z",
          "content": "<p>After seeing <a href=\"https://www.kaggle.com/thedrcat\" target=\"_blank\">@thedrcat</a> notebooks and discussion posts, I reworked <a href=\"https://www.kaggle.com/dschettler8845/hpa-cellwise-classification-inference\" target=\"_blank\"><strong>my inference notebook</strong></a> (it still performs multi-label classification during submission), to use pre-computed CellSegmentator masks.</p>\n<ul>\n<li>I went from <strong>8-9 hour</strong> submissions (sometimes with timeout) to <strong>30-45 minute</strong> submissions.</li>\n<li>I strongly recommend this method to allow for much faster prototyping.</li>\n</ul>\n<p><br></p>\n<p><em>Not to boost my own notebooks, but I have a <a href=\"https://www.kaggle.com/dschettler8845/sample-submission-on-public-test-data-only?rvi=1\" target=\"_blank\"><strong>really simple notebook here showing how it works</strong></a>. I have also included in this notebook a link to my dataset containing the precomputed RLEs (normal and submission style) and bounding boxes.</em></p>",
          "rawMarkdown": "After seeing @thedrcat notebooks and discussion posts, I reworked [**my inference notebook**](https://www.kaggle.com/dschettler8845/hpa-cellwise-classification-inference) (it still performs multi-label classification during submission), to use pre-computed CellSegmentator masks.\n* I went from **8-9 hour** submissions (sometimes with timeout) to **30-45 minute** submissions.\n* I strongly recommend this method to allow for much faster prototyping.\n\n<br>\n\n*Not to boost my own notebooks, but I have a [**really simple notebook here showing how it works**](https://www.kaggle.com/dschettler8845/sample-submission-on-public-test-data-only?rvi=1). I have also included in this notebook a link to my dataset containing the precomputed RLEs (normal and submission style) and bounding boxes.*",
          "votes": 1
        },
        {
          "id": 1222218,
          "postDate": "2021-03-01T16:30:08.857Z",
          "content": "<p>This means I can use locally computer submission file for the public test set? And just compute the private test set in the notebook?</p>\n<p><a href=\"https://www.kaggle.com/maggiemd\" target=\"_blank\">@maggiemd</a> ?</p>",
          "rawMarkdown": "This means I can use locally computer submission file for the public test set? And just compute the private test set in the notebook?\n\n@maggiemd ?"
        },
        {
          "id": 1222338,
          "postDate": "2021-03-01T17:56:37.510Z",
          "content": "<p>I'm not <a href=\"https://www.kaggle.com/maggiemd\" target=\"_blank\">@maggiemd</a>, however, I can tell you that the answer is yes. That is exactly what <a href=\"https://www.kaggle.com/thedrcat\" target=\"_blank\">@thedrcat</a> does in his notebook, except instead of calculating the submission file for the public test set on his local, he does it in a different notebook than the submission notebook.</p>",
          "rawMarkdown": "I'm not @maggiemd, however, I can tell you that the answer is yes. That is exactly what @thedrcat does in his notebook, except instead of calculating the submission file for the public test set on his local, he does it in a different notebook than the submission notebook.",
          "votes": 1
        },
        {
          "id": 1222344,
          "postDate": "2021-03-01T17:59:55.767Z",
          "content": "<p><a href=\"https://www.kaggle.com/dschettler8845\" target=\"_blank\">Darien</a></p>\n<p>Please clarify - you indicate that you went from 8-9 hours to 45 minutes on \"submissions\".</p>\n<p>Did you really mean on Save/Commit?</p>\n<p>Someone please - share with me the value of running the full public test set of images with or without precomputed RLE's.  It seems to me to be only a waste of GPU quota to run the full public test when you Save/Commit.  At present I am running only 3 images from the public test when I save/commit.  That costs me a couple of minutes of GPU quota.</p>",
          "rawMarkdown": "[Darien](https://www.kaggle.com/dschettler8845)\n\nPlease clarify - you indicate that you went from 8-9 hours to 45 minutes on \"submissions\".\n\nDid you really mean on Save/Commit?\n\nSomeone please - share with me the value of running the full public test set of images with or without precomputed RLE's.  It seems to me to be only a waste of GPU quota to run the full public test when you Save/Commit.  At present I am running only 3 images from the public test when I save/commit.  That costs me a couple of minutes of GPU quota."
        },
        {
          "id": 1222387,
          "postDate": "2021-03-01T18:34:35.373Z",
          "content": "<p><a href=\"https://www.kaggle.com/pcjimmmy\" target=\"_blank\">@pcjimmmy</a> - No I meant on full public test set submission.</p>\n<hr>\n<ul>\n<li>My Save/Commit takes 3-5 minutes. Similar to you, I also run on a subset of 3-6 images total instead of the full public test set for this. No one is suggesting that you do the Save/Commit on the full public test-set</li>\n<li>Next, I submit the submission.csv file and it takes me to the submission page and reruns my notebook on the public and private data. </li>\n<li>~45 minutes later the submission is scored and I can see the </li>\n</ul>\n<hr>\n<p><strong>The general value add is that you can submit a notebook and see the Public LB score within the hour… whereas before it would take 8-9 hours</strong></p>\n<hr>\n<p>You can look at the versioning of my <a href=\"https://www.kaggle.com/dschettler8845/hpa-cellwise-classification-inference\" target=\"_blank\"><strong>inference notebook</strong></a> and see that the last 4 versions (Version 37 through Version 40 were all within a 3-4 hour window and all 4 of them have scores generated within that timeframe. </p>\n<p><em>To iteratively adjust my confidence threshold and rerun each time like this would have taken 3-4 days previously. Or I would have had to submit all 4 blindly at the same time and I still would have been waiting 8-9 hours.</em></p>",
          "rawMarkdown": "@pcjimmmy - No I meant on full public test set submission.\n\n---\n\n- My Save/Commit takes 3-5 minutes. Similar to you, I also run on a subset of 3-6 images total instead of the full public test set for this. No one is suggesting that you do the Save/Commit on the full public test-set\n- Next, I submit the submission.csv file and it takes me to the submission page and reruns my notebook on the public and private data. \n- ~45 minutes later the submission is scored and I can see the \n\n\n---\n\n**The general value add is that you can submit a notebook and see the Public LB score within the hour... whereas before it would take 8-9 hours**\n\n---\n\nYou can look at the versioning of my [**inference notebook**](https://www.kaggle.com/dschettler8845/hpa-cellwise-classification-inference) and see that the last 4 versions (Version 37 through Version 40 were all within a 3-4 hour window and all 4 of them have scores generated within that timeframe. \n\n*To iteratively adjust my confidence threshold and rerun each time like this would have taken 3-4 days previously. Or I would have had to submit all 4 blindly at the same time and I still would have been waiting 8-9 hours.*\n",
          "votes": 1
        },
        {
          "id": 1235047,
          "postDate": "2021-03-11T19:22:14.093Z",
          "content": "<p>Just to check that I understood your explanation: The Public LB score is calculated on the public test data and die Private LB score is calculated on the private test data?</p>",
          "rawMarkdown": "Just to check that I understood your explanation: The Public LB score is calculated on the public test data and die Private LB score is calculated on the private test data?",
          "votes": 1
        },
        {
          "id": 1235079,
          "postDate": "2021-03-11T19:51:53.920Z",
          "content": "<p>From what I understand. Yes.</p>",
          "rawMarkdown": "From what I understand. Yes."
        }
      ]
    },
    {
      "id": 1220908,
      "postDate": "2021-02-28T13:24:46.333Z",
      "content": "<p>Am I allowed to create a dataset with precomputed segmentation masks along with cropped cell images and use that for faster submission?</p>",
      "rawMarkdown": "Am I allowed to create a dataset with precomputed segmentation masks along with cropped cell images and use that for faster submission?",
      "votes": 2
    }
  ],
  "comments": [
    {
      "id": 1221061,
      "author_name": "PC Jimmmy",
      "author_url": "",
      "post_date": "2021-02-28T16:33:51.960000",
      "content": "<p>Since the test set used for scoring is private it is not possible to precompute the masks as your kernel only sees them when you hit Submit.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1221098,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-02-28T17:07:36.023000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1221097,
          "author_name": "CroDoc",
          "author_url": "",
          "post_date": "2021-02-28T17:07:36.023000",
          "content": "<p>How about just using them just for the public test set? Still you get a lot of time boost…</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1221123,
          "author_name": "PC Jimmmy",
          "author_url": "",
          "post_date": "2021-02-28T17:25:46.013000",
          "content": "<p>I don't bother to run many public test images - I only do enough public test images when I save/commit to make sure that my batch generation is working and once I am sure of that I change the code to only do 3 images.  Several shared kernels for prediction show methods to do this.  </p>\n<p>That way when I do the submit/save than after a couple of minutes that is completed and I can do the Submit.  That saves on your GPU/TPU quota.  I not sure there is any value in running the full public test set unless you have some error that needs to be debugged.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1221068,
      "author_name": "Darek Kłeczek",
      "author_url": "",
      "post_date": "2021-02-28T16:41:10.353000",
      "content": "<p>I have done this here: <a href=\"https://www.kaggle.com/thedrcat/hpa-cell-tiles-test-with-enc-dataset\" target=\"_blank\">https://www.kaggle.com/thedrcat/hpa-cell-tiles-test-with-enc-dataset</a><br>\nThis will only work for the public test set, not for private. I believe this is allowed, if not please let me know. </p>",
      "votes": 2,
      "replies": [
        {
          "id": 1221201,
          "author_name": "CroDoc",
          "author_url": "",
          "post_date": "2021-02-28T18:46:39.540000",
          "content": "<p>This is exactly what I was asking about :)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1221250,
          "author_name": "CroDoc",
          "author_url": "",
          "post_date": "2021-02-28T19:42:55.117000",
          "content": "<p><a href=\"https://www.kaggle.com/philculliton\" target=\"_blank\">@philculliton</a> are you able to confirm this?</p>\n<p>Can I compute outputs &amp; masks for the public test set locally and use that in the notebook I submit as as a solution for the contest?<br>\nThis would mean saving GPU time on the public test set and only using it on the private test set… Also it would mean saving GPU time when I run the notebook before submitting …</p>\n<p>This is my first contest and I was not able to confirm this.<br>\nThanks you for your help.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1221252,
          "author_name": "CroDoc",
          "author_url": "",
          "post_date": "2021-02-28T19:45:33.477000",
          "content": "<p><a href=\"https://www.kaggle.com/bestfitting\" target=\"_blank\">@bestfitting</a> is this how you are able submit so much? or are you just using CPU?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1222010,
          "author_name": "Darien Schettler",
          "author_url": "",
          "post_date": "2021-03-01T13:19:20.970000",
          "content": "<p>After seeing <a href=\"https://www.kaggle.com/thedrcat\" target=\"_blank\">@thedrcat</a> notebooks and discussion posts, I reworked <a href=\"https://www.kaggle.com/dschettler8845/hpa-cellwise-classification-inference\" target=\"_blank\"><strong>my inference notebook</strong></a> (it still performs multi-label classification during submission), to use pre-computed CellSegmentator masks.</p>\n<ul>\n<li>I went from <strong>8-9 hour</strong> submissions (sometimes with timeout) to <strong>30-45 minute</strong> submissions.</li>\n<li>I strongly recommend this method to allow for much faster prototyping.</li>\n</ul>\n<p><br></p>\n<p><em>Not to boost my own notebooks, but I have a <a href=\"https://www.kaggle.com/dschettler8845/sample-submission-on-public-test-data-only?rvi=1\" target=\"_blank\"><strong>really simple notebook here showing how it works</strong></a>. I have also included in this notebook a link to my dataset containing the precomputed RLEs (normal and submission style) and bounding boxes.</em></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1222218,
          "author_name": "CroDoc",
          "author_url": "",
          "post_date": "2021-03-01T16:30:08.857000",
          "content": "<p>This means I can use locally computer submission file for the public test set? And just compute the private test set in the notebook?</p>\n<p><a href=\"https://www.kaggle.com/maggiemd\" target=\"_blank\">@maggiemd</a> ?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1222338,
          "author_name": "Darien Schettler",
          "author_url": "",
          "post_date": "2021-03-01T17:56:37.510000",
          "content": "<p>I'm not <a href=\"https://www.kaggle.com/maggiemd\" target=\"_blank\">@maggiemd</a>, however, I can tell you that the answer is yes. That is exactly what <a href=\"https://www.kaggle.com/thedrcat\" target=\"_blank\">@thedrcat</a> does in his notebook, except instead of calculating the submission file for the public test set on his local, he does it in a different notebook than the submission notebook.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1222344,
          "author_name": "PC Jimmmy",
          "author_url": "",
          "post_date": "2021-03-01T17:59:55.767000",
          "content": "<p><a href=\"https://www.kaggle.com/dschettler8845\" target=\"_blank\">Darien</a></p>\n<p>Please clarify - you indicate that you went from 8-9 hours to 45 minutes on \"submissions\".</p>\n<p>Did you really mean on Save/Commit?</p>\n<p>Someone please - share with me the value of running the full public test set of images with or without precomputed RLE's.  It seems to me to be only a waste of GPU quota to run the full public test when you Save/Commit.  At present I am running only 3 images from the public test when I save/commit.  That costs me a couple of minutes of GPU quota.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1222387,
          "author_name": "Darien Schettler",
          "author_url": "",
          "post_date": "2021-03-01T18:34:35.373000",
          "content": "<p><a href=\"https://www.kaggle.com/pcjimmmy\" target=\"_blank\">@pcjimmmy</a> - No I meant on full public test set submission.</p>\n<hr>\n<ul>\n<li>My Save/Commit takes 3-5 minutes. Similar to you, I also run on a subset of 3-6 images total instead of the full public test set for this. No one is suggesting that you do the Save/Commit on the full public test-set</li>\n<li>Next, I submit the submission.csv file and it takes me to the submission page and reruns my notebook on the public and private data. </li>\n<li>~45 minutes later the submission is scored and I can see the </li>\n</ul>\n<hr>\n<p><strong>The general value add is that you can submit a notebook and see the Public LB score within the hour… whereas before it would take 8-9 hours</strong></p>\n<hr>\n<p>You can look at the versioning of my <a href=\"https://www.kaggle.com/dschettler8845/hpa-cellwise-classification-inference\" target=\"_blank\"><strong>inference notebook</strong></a> and see that the last 4 versions (Version 37 through Version 40 were all within a 3-4 hour window and all 4 of them have scores generated within that timeframe. </p>\n<p><em>To iteratively adjust my confidence threshold and rerun each time like this would have taken 3-4 days previously. Or I would have had to submit all 4 blindly at the same time and I still would have been waiting 8-9 hours.</em></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1235047,
          "author_name": "LucaMTB",
          "author_url": "",
          "post_date": "2021-03-11T19:22:14.093000",
          "content": "<p>Just to check that I understood your explanation: The Public LB score is calculated on the public test data and die Private LB score is calculated on the private test data?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1235079,
          "author_name": "Darien Schettler",
          "author_url": "",
          "post_date": "2021-03-11T19:51:53.920000",
          "content": "<p>From what I understand. Yes.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1221061": "Since the test set used for scoring is private it is not possible to precompute the masks as your kernel only sees them when you hit Submit.\n\n",
    "1221068": "I have done this here: https://www.kaggle.com/thedrcat/hpa-cell-tiles-test-with-enc-dataset\nThis will only work for the public test set, not for private. I believe this is allowed, if not please let me know. ",
    "1220908": "Am I allowed to create a dataset with precomputed segmentation masks along with cropped cell images and use that for faster submission?"
  }
}