{
  "id": 499850,
  "title": "Confusion about where pictures are stored",
  "url": "/competitions/geolifeclef-2024/discussion/499850",
  "author_name": "",
  "post_date": "2024-05-03T08:39:17.868564Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I'm confused about the connection between image location and IDs.</p>\n<p>If the id is 212, I think it's in the 12-02 folder, but I can't find it.</p>\n<p>Does anyone know the mapping relationship if the id is less than four digits?</p>",
  "messages": [
    {
      "id": "2790571",
      "postDate": "05/03/2024 08:39:17",
      "content": "<p>I'm confused about the connection between image location and IDs.</p>\n<p>If the id is 212, I think it's in the 12-02 folder, but I can't find it.</p>\n<p>Does anyone know the mapping relationship if the id is less than four digits?</p>",
      "rawMarkdown": "I'm confused about the connection between image location and IDs.\n\nIf the id is 212, I think it's in the 12-02 folder, but I can't find it.\n\nDoes anyone know the mapping relationship if the id is less than four digits?",
      "votes": null
    },
    {
      "id": "2790802",
      "postDate": "05/03/2024 10:43:03",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/liangyz2019\" target=\"_blank\">@liangyz2019</a>,</p>\n<p>here is a code that should help you out :]</p>\n<p>Best,<br>\nLukas</p>\n<pre><code> ():\n    \n    path = output_path\n     d  ((survey_id)[-:], (survey_id)[-:-]):\n        path = os.path.join(path, d)\n\n    path = os.path.join(path, )\n\n     path\n</code></pre>",
      "rawMarkdown": "Hi @liangyz2019,\n\nhere is a code that should help you out :]\n\nBest,\nLukas\n\n\n```\ndef construct_patch_path(output_path, survey_id):\n    \"\"\"Construct the patch file path based on survey_id as './CD/AB/XXXXABCD.jpeg'\"\"\"\n    path = output_path\n    for d in (str(survey_id)[-2:], str(survey_id)[-4:-2]):\n        path = os.path.join(path, d)\n\n    path = os.path.join(path, f\"{survey_id}.jpeg\")\n\n    return path\n```",
      "votes": null
    },
    {
      "id": "2791234",
      "postDate": "05/03/2024 14:49:30",
      "content": "<p>It works. Thank you very much.</p>",
      "rawMarkdown": "It works. Thank you very much.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2790802,
      "author_name": "picekl",
      "author_url": "",
      "post_date": "05/03/2024 10:43:03",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/liangyz2019\" target=\"_blank\">@liangyz2019</a>,</p>\n<p>here is a code that should help you out :]</p>\n<p>Best,<br>\nLukas</p>\n<pre><code> ():\n    \n    path = output_path\n     d  ((survey_id)[-:], (survey_id)[-:-]):\n        path = os.path.join(path, d)\n\n    path = os.path.join(path, )\n\n     path\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 2791234,
          "author_name": "liangyz2019",
          "author_url": "",
          "post_date": "05/03/2024 14:49:30",
          "content": "<p>It works. Thank you very much.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2790571": "I'm confused about the connection between image location and IDs.\n\nIf the id is 212, I think it's in the 12-02 folder, but I can't find it.\n\nDoes anyone know the mapping relationship if the id is less than four digits?",
    "2790802": "Hi @liangyz2019,\n\nhere is a code that should help you out :]\n\nBest,\nLukas\n\n\n```\ndef construct_patch_path(output_path, survey_id):\n    \"\"\"Construct the patch file path based on survey_id as './CD/AB/XXXXABCD.jpeg'\"\"\"\n    path = output_path\n    for d in (str(survey_id)[-2:], str(survey_id)[-4:-2]):\n        path = os.path.join(path, d)\n\n    path = os.path.join(path, f\"{survey_id}.jpeg\")\n\n    return path\n```",
    "2791234": "It works. Thank you very much."
  },
  "source": "meta"
}