{
  "id": 606570,
  "title": "Are segmentation masks modality inverted?",
  "url": "/competitions/rsna-intracranial-aneurysm-detection/discussion/606570",
  "author_name": "Ángel Jacinto Sánchez Ruiz",
  "post_date": "2025-09-08T22:20:15.720000",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>My model seemed to be predicting left-right inverted masks depending on the modality. So I've checked and… I'm still on it but I'm pretty sure MRA and MRI T1 segmentation masks are left-right flipped with respect CTA and MRI T2 ones. Not completely but yes, most of them systematically. I'm wrong and missing something?</p>\n<p><a href=\"https://www.kaggle.com/code/sacuscreed/segmentation-masks-flipped?scriptVersionId=260733871\" target=\"_blank\">Notebook</a></p>",
  "messages": [
    {
      "id": 3285917,
      "postDate": "2025-09-08T22:20:15.720Z",
      "content": "<p>My model seemed to be predicting left-right inverted masks depending on the modality. So I've checked and… I'm still on it but I'm pretty sure MRA and MRI T1 segmentation masks are left-right flipped with respect CTA and MRI T2 ones. Not completely but yes, most of them systematically. I'm wrong and missing something?</p>\n<p><a href=\"https://www.kaggle.com/code/sacuscreed/segmentation-masks-flipped?scriptVersionId=260733871\" target=\"_blank\">Notebook</a></p>",
      "rawMarkdown": "My model seemed to be predicting left-right inverted masks depending on the modality. So I've checked and... I'm still on it but I'm pretty sure MRA and MRI T1 segmentation masks are left-right flipped with respect CTA and MRI T2 ones. Not completely but yes, most of them systematically. I'm wrong and missing something?\n\n[Notebook](https://www.kaggle.com/code/sacuscreed/segmentation-masks-flipped?scriptVersionId=260733871)",
      "votes": 2
    },
    {
      "id": 3287121,
      "postDate": "2025-09-10T22:21:38.843Z",
      "content": "<p>I am not able to replicate this. Can you show examples? How are you viewing them?</p>\n<p>Are you certain that your segmentation model is not employing dimension swaps as part of data augmentation?</p>",
      "rawMarkdown": "I am not able to replicate this. Can you show examples? How are you viewing them?\n\nAre you certain that your segmentation model is not employing dimension swaps as part of data augmentation?",
      "replies": [
        {
          "id": 3287147,
          "postDate": "2025-09-10T23:50:23.243Z",
          "content": "<p>Hi. Thanks for reply. <a href=\"https://www.kaggle.com/code/sacuscreed/segmentation-masks-flipped?scriptVersionId=260739868\" target=\"_blank\">Here</a> I show how all provided segmentation masks are HFS. You can check it by plotting YX (axial looking up), ZX (coronal  head down) and ZY (sagittal head down  and looking left) views.  So if I'm not wrong all left-right masks should appear at the same side of them.</p>\n<p>But depending on Modality some appear reversed:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2Ffb1a2bae5cc94d50babb956513403059%2F__results___6_13%20(1).png?generation=1757548736052942&amp;alt=media\" alt=\"\"></p>\n<blockquote>\n  <p>Modality    LR   <br>\n  CTA         False    74<br>\n  MRA         True     41<br>\n  MRI T1post  False     6<br>\n              True     14<br>\n  MRI T2      False    40<br>\n              True      2</p>\n</blockquote>\n<p>Most of the samples corresponding to MRA and MRI T1 appear left-right reversed with respect the samples corresponding to CTA and MRI T2.</p>\n<blockquote>\n  <p>Are you certain that your segmentation model is not employing dimension swaps as part of data augmentation?</p>\n</blockquote>\n<p>Actually initially I've been including 180 rotations thinking that those samples were rotated, FFS. Now I'm confused.</p>\n<p>EDIT: To be more specific, what I think is that the left-right label description is reversed. Not the masks itself. I mean like [1,2,<strong>4</strong>,<strong>3</strong>,<strong>6</strong>,<strong>5</strong>,<strong>8</strong>,<strong>7</strong>,<strong>10</strong>,<strong>9</strong>,<strong>12</strong>,<strong>11</strong>,13].</p>",
          "rawMarkdown": "Hi. Thanks for reply. [Here](https://www.kaggle.com/code/sacuscreed/segmentation-masks-flipped?scriptVersionId=260739868) I show how all provided segmentation masks are HFS. You can check it by plotting YX (axial looking up), ZX (coronal  head down) and ZY (sagittal head down  and looking left) views.  So if I'm not wrong all left-right masks should appear at the same side of them.\n\nBut depending on Modality some appear reversed:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2Ffb1a2bae5cc94d50babb956513403059%2F__results___6_13%20(1).png?generation=1757548736052942&alt=media)\n\n>Modality    LR   \nCTA         False    74\nMRA         True     41\nMRI T1post  False     6\n            True     14\nMRI T2      False    40\n            True      2\n\nMost of the samples corresponding to MRA and MRI T1 appear left-right reversed with respect the samples corresponding to CTA and MRI T2.\n\n>Are you certain that your segmentation model is not employing dimension swaps as part of data augmentation?\n\nActually initially I've been including 180 rotations thinking that those samples were rotated, FFS. Now I'm confused.\n\nEDIT: To be more specific, what I think is that the left-right label description is reversed. Not the masks itself. I mean like [1,2,**4**,**3**,**6**,**5**,**8**,**7**,**10**,**9**,**12**,**11**,13].",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 3287121,
      "author_name": "Evan Calabrese",
      "author_url": "",
      "post_date": "2025-09-10T22:21:38.843000",
      "content": "<p>I am not able to replicate this. Can you show examples? How are you viewing them?</p>\n<p>Are you certain that your segmentation model is not employing dimension swaps as part of data augmentation?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 3287147,
          "author_name": "Ángel Jacinto Sánchez Ruiz",
          "author_url": "",
          "post_date": "2025-09-10T23:50:23.243000",
          "content": "<p>Hi. Thanks for reply. <a href=\"https://www.kaggle.com/code/sacuscreed/segmentation-masks-flipped?scriptVersionId=260739868\" target=\"_blank\">Here</a> I show how all provided segmentation masks are HFS. You can check it by plotting YX (axial looking up), ZX (coronal  head down) and ZY (sagittal head down  and looking left) views.  So if I'm not wrong all left-right masks should appear at the same side of them.</p>\n<p>But depending on Modality some appear reversed:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8722753%2Ffb1a2bae5cc94d50babb956513403059%2F__results___6_13%20(1).png?generation=1757548736052942&amp;alt=media\" alt=\"\"></p>\n<blockquote>\n  <p>Modality    LR   <br>\n  CTA         False    74<br>\n  MRA         True     41<br>\n  MRI T1post  False     6<br>\n              True     14<br>\n  MRI T2      False    40<br>\n              True      2</p>\n</blockquote>\n<p>Most of the samples corresponding to MRA and MRI T1 appear left-right reversed with respect the samples corresponding to CTA and MRI T2.</p>\n<blockquote>\n  <p>Are you certain that your segmentation model is not employing dimension swaps as part of data augmentation?</p>\n</blockquote>\n<p>Actually initially I've been including 180 rotations thinking that those samples were rotated, FFS. Now I'm confused.</p>\n<p>EDIT: To be more specific, what I think is that the left-right label description is reversed. Not the masks itself. I mean like [1,2,<strong>4</strong>,<strong>3</strong>,<strong>6</strong>,<strong>5</strong>,<strong>8</strong>,<strong>7</strong>,<strong>10</strong>,<strong>9</strong>,<strong>12</strong>,<strong>11</strong>,13].</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3285917": "My model seemed to be predicting left-right inverted masks depending on the modality. So I've checked and... I'm still on it but I'm pretty sure MRA and MRI T1 segmentation masks are left-right flipped with respect CTA and MRI T2 ones. Not completely but yes, most of them systematically. I'm wrong and missing something?\n\n[Notebook](https://www.kaggle.com/code/sacuscreed/segmentation-masks-flipped?scriptVersionId=260733871)",
    "3287121": "I am not able to replicate this. Can you show examples? How are you viewing them?\n\nAre you certain that your segmentation model is not employing dimension swaps as part of data augmentation?"
  }
}