{
  "id": 237062,
  "title": "Easy trick which helps to perform faster submission!!!",
  "url": "/competitions/hubmap-kidney-segmentation/discussion/237062",
  "author_name": "lhagiimn",
  "post_date": "2021-05-06T22:52:53.725000",
  "votes": 3,
  "comment_count": 0,
  "views": 0,
  "content": "<p>The public test set consists of 5 images, and predicting and submitting them takes too much time because of the size of images.</p>\n<p>So I just shared easy trick which helps to perform it faster. <br>\nI think it is better to avoid directly read \"sample_submission.csv\" file. It may not include the private test set because inference and submission durations are same. </p>\n<pre><code>import pathlib\nimport glob\nfrom tqdm.notebook import tqdm\n\np = pathlib.Path('../input/hubmap-kidney-segmentation')\nids=[]\n\nfor index, filename in tqdm(enumerate(p.glob('test/*.tiff')), \n                        total = len(list(p.glob('test/*.tiff')))):\n    ids.append(filename.stem)\n\ndf_sample=pd.DataFrame()\ndf_sample['id']=ids\ndf_sample['predicted']=np.nan\ndf_sample = df_sample.set_index('id')\n\nif df_sample.shape[0]==5:\n    df_sample = df_sample.iloc[:1, :]\nelse:\n    df_sample=df_sample\n</code></pre>",
  "messages": [
    {
      "id": 1296046,
      "postDate": "2021-05-06T22:52:53.727Z",
      "content": "<p>The public test set consists of 5 images, and predicting and submitting them takes too much time because of the size of images.</p>\n<p>So I just shared easy trick which helps to perform it faster. <br>\nI think it is better to avoid directly read \"sample_submission.csv\" file. It may not include the private test set because inference and submission durations are same. </p>\n<pre><code>import pathlib\nimport glob\nfrom tqdm.notebook import tqdm\n\np = pathlib.Path('../input/hubmap-kidney-segmentation')\nids=[]\n\nfor index, filename in tqdm(enumerate(p.glob('test/*.tiff')), \n                        total = len(list(p.glob('test/*.tiff')))):\n    ids.append(filename.stem)\n\ndf_sample=pd.DataFrame()\ndf_sample['id']=ids\ndf_sample['predicted']=np.nan\ndf_sample = df_sample.set_index('id')\n\nif df_sample.shape[0]==5:\n    df_sample = df_sample.iloc[:1, :]\nelse:\n    df_sample=df_sample\n</code></pre>",
      "rawMarkdown": "The public test set consists of 5 images, and predicting and submitting them takes too much time because of the size of images.\n\nSo I just shared easy trick which helps to perform it faster. \nI think it is better to avoid directly read \"sample_submission.csv\" file. It may not include the private test set because inference and submission durations are same. \n\n```\nimport pathlib\nimport glob\nfrom tqdm.notebook import tqdm\n\np = pathlib.Path('../input/hubmap-kidney-segmentation')\nids=[]\n\nfor index, filename in tqdm(enumerate(p.glob('test/*.tiff')), \n                        total = len(list(p.glob('test/*.tiff')))):\n    ids.append(filename.stem)\n\ndf_sample=pd.DataFrame()\ndf_sample['id']=ids\ndf_sample['predicted']=np.nan\ndf_sample = df_sample.set_index('id')\n\nif df_sample.shape[0]==5:\n    df_sample = df_sample.iloc[:1, :]\nelse:\n    df_sample=df_sample\n```",
      "votes": 3
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1296046": "The public test set consists of 5 images, and predicting and submitting them takes too much time because of the size of images.\n\nSo I just shared easy trick which helps to perform it faster. \nI think it is better to avoid directly read \"sample_submission.csv\" file. It may not include the private test set because inference and submission durations are same. \n\n```\nimport pathlib\nimport glob\nfrom tqdm.notebook import tqdm\n\np = pathlib.Path('../input/hubmap-kidney-segmentation')\nids=[]\n\nfor index, filename in tqdm(enumerate(p.glob('test/*.tiff')), \n                        total = len(list(p.glob('test/*.tiff')))):\n    ids.append(filename.stem)\n\ndf_sample=pd.DataFrame()\ndf_sample['id']=ids\ndf_sample['predicted']=np.nan\ndf_sample = df_sample.set_index('id')\n\nif df_sample.shape[0]==5:\n    df_sample = df_sample.iloc[:1, :]\nelse:\n    df_sample=df_sample\n```"
  }
}