{
  "id": 395981,
  "title": "Data Size Crunch ",
  "url": "/competitions/vesuvius-challenge-ink-detection/discussion/395981",
  "author_name": "",
  "post_date": "2023-03-19T19:22:43.726637100Z",
  "votes": -4,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Can someone please help out my crunching the data to a much smaller size so I and others can participate? Please tag me when you do it. Thank you.</p>",
  "messages": [
    {
      "id": "2188587",
      "postDate": "03/19/2023 19:22:43",
      "content": "<p>Can someone please help out my crunching the data to a much smaller size so I and others can participate? Please tag me when you do it. Thank you.</p>",
      "rawMarkdown": "Can someone please help out my crunching the data to a much smaller size so I and others can participate? Please tag me when you do it. Thank you.",
      "votes": null
    },
    {
      "id": "2189827",
      "postDate": "03/20/2023 19:39:28",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/lordxerxes\" target=\"_blank\">@lordxerxes</a>, you can try the below code:</p>\n<pre><code> ():\n     new_shape  :\n         cv2.imread(filename)\n     np.array(Image.(filename).resize(new_shape, resample=Image.Resampling.NEAREST))\n\nnew_shape = np.array(Image.(()).size)//\ntrain_frag_mask = fn2resized_np(, new_shape)\n</code></pre>",
      "rawMarkdown": "Hi @lordxerxes, you can try the below code:\n\n```python\ndef fn2resized_np(filename, new_shape=None):\n    if new_shape is None:\n        return cv2.imread(filename)\n    return np.array(Image.open(filename).resize(new_shape, resample=Image.Resampling.NEAREST))\n\nnew_shape = np.array(Image.open((f\"{train_dir}/mask.png\")).size)//10\ntrain_frag_mask = fn2resized_np(f\"{train_dir}/mask.png\", new_shape)\n```",
      "votes": null
    },
    {
      "id": "2189995",
      "postDate": "03/21/2023 00:24:27",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/discussion/395225\" target=\"_blank\">https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/discussion/395225</a></p>",
      "rawMarkdown": "https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/discussion/395225",
      "votes": null
    },
    {
      "id": "2191254",
      "postDate": "03/21/2023 20:38:38",
      "content": "<p>Thank you so much for your help <a href=\"https://www.kaggle.com/junxhuang\" target=\"_blank\">@junxhuang</a> </p>",
      "rawMarkdown": "Thank you so much for your help @junxhuang",
      "votes": null
    },
    {
      "id": "2191940",
      "postDate": "03/22/2023 10:17:28",
      "content": "<p>You will not be able to get a competitive score with resized pics</p>",
      "rawMarkdown": "You will not be able to get a competitive score with resized pics",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2189827,
      "author_name": "junxhuang",
      "author_url": "",
      "post_date": "03/20/2023 19:39:28",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/lordxerxes\" target=\"_blank\">@lordxerxes</a>, you can try the below code:</p>\n<pre><code> ():\n     new_shape  :\n         cv2.imread(filename)\n     np.array(Image.(filename).resize(new_shape, resample=Image.Resampling.NEAREST))\n\nnew_shape = np.array(Image.(()).size)//\ntrain_frag_mask = fn2resized_np(, new_shape)\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 2191254,
          "author_name": "lordxerxes",
          "author_url": "",
          "post_date": "03/21/2023 20:38:38",
          "content": "<p>Thank you so much for your help <a href=\"https://www.kaggle.com/junxhuang\" target=\"_blank\">@junxhuang</a> </p>",
          "votes": null,
          "replies": [
            {
              "id": 2191940,
              "author_name": "dimka11",
              "author_url": "",
              "post_date": "03/22/2023 10:17:28",
              "content": "<p>You will not be able to get a competitive score with resized pics</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2189995,
      "author_name": "pcjimmmy",
      "author_url": "",
      "post_date": "03/21/2023 00:24:27",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/discussion/395225\" target=\"_blank\">https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/discussion/395225</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2188587": "Can someone please help out my crunching the data to a much smaller size so I and others can participate? Please tag me when you do it. Thank you.",
    "2189827": "Hi @lordxerxes, you can try the below code:\n\n```python\ndef fn2resized_np(filename, new_shape=None):\n    if new_shape is None:\n        return cv2.imread(filename)\n    return np.array(Image.open(filename).resize(new_shape, resample=Image.Resampling.NEAREST))\n\nnew_shape = np.array(Image.open((f\"{train_dir}/mask.png\")).size)//10\ntrain_frag_mask = fn2resized_np(f\"{train_dir}/mask.png\", new_shape)\n```",
    "2189995": "https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/discussion/395225",
    "2191254": "Thank you so much for your help @junxhuang",
    "2191940": "You will not be able to get a competitive score with resized pics"
  },
  "source": "meta"
}