{
  "id": 568723,
  "title": "X-axis represents width or height?",
  "url": "/competitions/byu-locating-bacterial-flagellar-motors-2025/discussion/568723",
  "author_name": "",
  "post_date": "2025-03-17T16:13:53.018798200Z",
  "votes": 2,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hello, when I am going through the data description, it says \"Array shape axis 2 - x-axis length, or height of each slice\". But from the provided <a href=\"https://www.kaggle.com/code/andrewjdarley/parse-data\" target=\"_blank\">parse data</a> notebook, I find it includes the following step:</p>\n<pre><code>                img_width, img_height = img.size\n\n                \n                \n                \n                x_center_norm = x_center / img_width\n                y_center_norm = y_center / img_height\n                box_width_norm = BOX_SIZE / img_width\n                box_height_norm = BOX_SIZE / img_height\n</code></pre>\n<p>I wonder why x_center is taken to match the image width instead. Thank you!</p>",
  "messages": [
    {
      "id": "3152263",
      "postDate": "03/17/2025 16:13:53",
      "content": "<p>Hello, when I am going through the data description, it says \"Array shape axis 2 - x-axis length, or height of each slice\". But from the provided <a href=\"https://www.kaggle.com/code/andrewjdarley/parse-data\" target=\"_blank\">parse data</a> notebook, I find it includes the following step:</p>\n<pre><code>                img_width, img_height = img.size\n\n                \n                \n                \n                x_center_norm = x_center / img_width\n                y_center_norm = y_center / img_height\n                box_width_norm = BOX_SIZE / img_width\n                box_height_norm = BOX_SIZE / img_height\n</code></pre>\n<p>I wonder why x_center is taken to match the image width instead. Thank you!</p>",
      "rawMarkdown": "Hello, when I am going through the data description, it says \"Array shape axis 2 - x-axis length, or height of each slice\". But from the provided [parse data](https://www.kaggle.com/code/andrewjdarley/parse-data) notebook, I find it includes the following step:\n```python\n                img_width, img_height = img.size\n                \n                # Create YOLO format label\n                # YOLO format: <class> <x_center> <y_center> <width> <height>\n                # Values are normalized to [0, 1]\n                x_center_norm = x_center / img_width\n                y_center_norm = y_center / img_height\n                box_width_norm = BOX_SIZE / img_width\n                box_height_norm = BOX_SIZE / img_height\n```\n\nI wonder why x_center is taken to match the image width instead. Thank you!",
      "votes": null
    },
    {
      "id": "3153773",
      "postDate": "03/19/2025 06:43:09",
      "content": "<p>Hello! Thank you so much for pointing this out! The data page contains the typo and the parse data notebook is correct. We will fix the data page as soon as we can!</p>",
      "rawMarkdown": "Hello! Thank you so much for pointing this out! The data page contains the typo and the parse data notebook is correct. We will fix the data page as soon as we can!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3153773,
      "author_name": "andrewjdarley",
      "author_url": "",
      "post_date": "03/19/2025 06:43:09",
      "content": "<p>Hello! Thank you so much for pointing this out! The data page contains the typo and the parse data notebook is correct. We will fix the data page as soon as we can!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3152263": "Hello, when I am going through the data description, it says \"Array shape axis 2 - x-axis length, or height of each slice\". But from the provided [parse data](https://www.kaggle.com/code/andrewjdarley/parse-data) notebook, I find it includes the following step:\n```python\n                img_width, img_height = img.size\n                \n                # Create YOLO format label\n                # YOLO format: <class> <x_center> <y_center> <width> <height>\n                # Values are normalized to [0, 1]\n                x_center_norm = x_center / img_width\n                y_center_norm = y_center / img_height\n                box_width_norm = BOX_SIZE / img_width\n                box_height_norm = BOX_SIZE / img_height\n```\n\nI wonder why x_center is taken to match the image width instead. Thank you!",
    "3153773": "Hello! Thank you so much for pointing this out! The data page contains the typo and the parse data notebook is correct. We will fix the data page as soon as we can!"
  },
  "source": "meta"
}