{
  "id": 459206,
  "title": "Help, getting this error when using the surface dice metric locally and results in a nan score",
  "url": "/competitions/blood-vessel-segmentation/discussion/459206",
  "author_name": "",
  "post_date": "2023-12-04T07:26:00.715380700Z",
  "votes": 2,
  "comment_count": 4,
  "views": 0,
  "content": "<p>/tmp/ipykernel_85588/878214282.py:1181: RuntimeWarning: invalid value encountered in scalar divide   surface_dice = (overlap_gt + overlap_pred) / (np.sum(surfel_areas_gt) +</p>",
  "messages": [
    {
      "id": "2548154",
      "postDate": "12/04/2023 07:26:00",
      "content": "<p>/tmp/ipykernel_85588/878214282.py:1181: RuntimeWarning: invalid value encountered in scalar divide   surface_dice = (overlap_gt + overlap_pred) / (np.sum(surfel_areas_gt) +</p>",
      "rawMarkdown": "/tmp/ipykernel_85588/878214282.py:1181: RuntimeWarning: invalid value encountered in scalar divide   surface_dice = (overlap_gt + overlap_pred) / (np.sum(surfel_areas_gt) +",
      "votes": null
    },
    {
      "id": "2548191",
      "postDate": "12/04/2023 07:45:06",
      "content": "<p>Do you apply it to a single slice (2d) or a whole 3d mask?</p>",
      "rawMarkdown": "Do you apply it to a single slice (2d) or a whole 3d mask?",
      "votes": null
    },
    {
      "id": "2548200",
      "postDate": "12/04/2023 07:57:20",
      "content": "<p><a href=\"https://www.kaggle.com/sakvaua\" target=\"_blank\">@sakvaua</a> 2d slices, I prepare the solution with columns 'id', 'rle', 'width', 'height' and my submission with only id and rle. </p>",
      "rawMarkdown": "sakvaua 2d slices, I prepare the solution with columns 'id', 'rle', 'width', 'height' and my submission with only id and rle.",
      "votes": null
    },
    {
      "id": "2548259",
      "postDate": "12/04/2023 09:16:51",
      "content": "<p>If you prefer to continue using it in 2d mode (and not 3D) you may monkey-patch the code and add some small number like 1e-6 to both the denominator and numerator. This will remove 0/0 or n/0 errors.</p>",
      "rawMarkdown": "If you prefer to continue using it in 2d mode (and not 3D) you may monkey-patch the code and add some small number like 1e-6 to both the denominator and numerator. This will remove 0/0 or n/0 errors.",
      "votes": null
    },
    {
      "id": "2548303",
      "postDate": "12/04/2023 10:11:16",
      "content": "<p>Thank you, using 3d works</p>",
      "rawMarkdown": "Thank you, using 3d works",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2548191,
      "author_name": "sakvaua",
      "author_url": "",
      "post_date": "12/04/2023 07:45:06",
      "content": "<p>Do you apply it to a single slice (2d) or a whole 3d mask?</p>",
      "votes": null,
      "replies": [
        {
          "id": 2548200,
          "author_name": "kenpachi99",
          "author_url": "",
          "post_date": "12/04/2023 07:57:20",
          "content": "<p><a href=\"https://www.kaggle.com/sakvaua\" target=\"_blank\">@sakvaua</a> 2d slices, I prepare the solution with columns 'id', 'rle', 'width', 'height' and my submission with only id and rle. </p>",
          "votes": null,
          "replies": [
            {
              "id": 2548259,
              "author_name": "sakvaua",
              "author_url": "",
              "post_date": "12/04/2023 09:16:51",
              "content": "<p>If you prefer to continue using it in 2d mode (and not 3D) you may monkey-patch the code and add some small number like 1e-6 to both the denominator and numerator. This will remove 0/0 or n/0 errors.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 2548303,
                  "author_name": "kenpachi99",
                  "author_url": "",
                  "post_date": "12/04/2023 10:11:16",
                  "content": "<p>Thank you, using 3d works</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2548154": "/tmp/ipykernel_85588/878214282.py:1181: RuntimeWarning: invalid value encountered in scalar divide   surface_dice = (overlap_gt + overlap_pred) / (np.sum(surfel_areas_gt) +",
    "2548191": "Do you apply it to a single slice (2d) or a whole 3d mask?",
    "2548200": "sakvaua 2d slices, I prepare the solution with columns 'id', 'rle', 'width', 'height' and my submission with only id and rle.",
    "2548259": "If you prefer to continue using it in 2d mode (and not 3D) you may monkey-patch the code and add some small number like 1e-6 to both the denominator and numerator. This will remove 0/0 or n/0 errors.",
    "2548303": "Thank you, using 3d works"
  },
  "source": "meta"
}