{
  "id": 292094,
  "title": "A way to visualise predictions",
  "url": "/competitions/sartorius-cell-instance-segmentation/discussion/292094",
  "author_name": "",
  "post_date": "2021-12-01T20:06:53.262240Z",
  "votes": 28,
  "comment_count": 2,
  "views": 0,
  "content": "<p>While I was procrastinating from the difficult work of training better models I played with improving my code to visualise samples and predictions. The problem I was facing was that with dense and overlapping samples simply plotting masks and targets on an image didn't help with understanding the quality of predictions and how it affects score. My solution was to break it down into three parts:</p>\n<ul>\n<li>A table with true positives, false positives, and false negatives across all the IoU thresholds</li>\n<li>Mask contours of predictions and targets overlaid on the whole image</li>\n<li>All the individual mask predictions with matched targets and IoU value displayed in a grid.</li>\n</ul>\n<p>You can see how that looks on the screenshots bellow.<br>\nI've shared the functions to plot this in an utility script here: <a href=\"http://www.kaggle.com/slawekbiel/sartorius-vis/\" target=\"_blank\">www.kaggle.com/slawekbiel/sartorius-vis/</a><br>\nAnd updated my validation notebook with examples how to use it: <a href=\"https://www.kaggle.com/slawekbiel/validation-score-example\" target=\"_blank\">https://www.kaggle.com/slawekbiel/validation-score-example</a></p>\n<p><img src=\"https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomout.png\" alt=\"\"><br>\n<img src=\"https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomin.png\" alt=\"\"></p>",
  "messages": [
    {
      "id": "1602165",
      "postDate": "12/01/2021 20:06:53",
      "content": "<p>While I was procrastinating from the difficult work of training better models I played with improving my code to visualise samples and predictions. The problem I was facing was that with dense and overlapping samples simply plotting masks and targets on an image didn't help with understanding the quality of predictions and how it affects score. My solution was to break it down into three parts:</p>\n<ul>\n<li>A table with true positives, false positives, and false negatives across all the IoU thresholds</li>\n<li>Mask contours of predictions and targets overlaid on the whole image</li>\n<li>All the individual mask predictions with matched targets and IoU value displayed in a grid.</li>\n</ul>\n<p>You can see how that looks on the screenshots bellow.<br>\nI've shared the functions to plot this in an utility script here: <a href=\"http://www.kaggle.com/slawekbiel/sartorius-vis/\" target=\"_blank\">www.kaggle.com/slawekbiel/sartorius-vis/</a><br>\nAnd updated my validation notebook with examples how to use it: <a href=\"https://www.kaggle.com/slawekbiel/validation-score-example\" target=\"_blank\">https://www.kaggle.com/slawekbiel/validation-score-example</a></p>\n<p><img src=\"https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomout.png\" alt=\"\"><br>\n<img src=\"https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomin.png\" alt=\"\"></p>",
      "rawMarkdown": "While I was procrastinating from the difficult work of training better models I played with improving my code to visualise samples and predictions. The problem I was facing was that with dense and overlapping samples simply plotting masks and targets on an image didn't help with understanding the quality of predictions and how it affects score. My solution was to break it down into three parts:\n- A table with true positives, false positives, and false negatives across all the IoU thresholds\n- Mask contours of predictions and targets overlaid on the whole image\n- All the individual mask predictions with matched targets and IoU value displayed in a grid.\n\nYou can see how that looks on the screenshots bellow.\nI've shared the functions to plot this in an utility script here: www.kaggle.com/slawekbiel/sartorius-vis/\nAnd updated my validation notebook with examples how to use it: https://www.kaggle.com/slawekbiel/validation-score-example\n\n![](https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomout.png)\n![](https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomin.png)",
      "votes": null
    },
    {
      "id": "1602295",
      "postDate": "12/01/2021 22:22:50",
      "content": "<p>Did you explore whether errors were prediction too big vs prediction too small?What about totally missed cells or totally wrong cells?</p>\n<p>Rich</p>",
      "rawMarkdown": "Did you explore whether errors were prediction too big vs prediction too small?What about totally missed cells or totally wrong cells?\n\nRich",
      "votes": null
    },
    {
      "id": "1602325",
      "postDate": "12/01/2021 22:35:46",
      "content": "<p>These are exactly kind of questions I was trying to answer. You can see too small vs large predictions by looking at the grid view, and the numbers of false positives and false negatives are shown in the table.</p>",
      "rawMarkdown": "These are exactly kind of questions I was trying to answer. You can see too small vs large predictions by looking at the grid view, and the numbers of false positives and false negatives are shown in the table.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1602295,
      "author_name": "richardepstein",
      "author_url": "",
      "post_date": "12/01/2021 22:22:50",
      "content": "<p>Did you explore whether errors were prediction too big vs prediction too small?What about totally missed cells or totally wrong cells?</p>\n<p>Rich</p>",
      "votes": null,
      "replies": [
        {
          "id": 1602325,
          "author_name": "slawekbiel",
          "author_url": "",
          "post_date": "12/01/2021 22:35:46",
          "content": "<p>These are exactly kind of questions I was trying to answer. You can see too small vs large predictions by looking at the grid view, and the numbers of false positives and false negatives are shown in the table.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1602165": "While I was procrastinating from the difficult work of training better models I played with improving my code to visualise samples and predictions. The problem I was facing was that with dense and overlapping samples simply plotting masks and targets on an image didn't help with understanding the quality of predictions and how it affects score. My solution was to break it down into three parts:\n- A table with true positives, false positives, and false negatives across all the IoU thresholds\n- Mask contours of predictions and targets overlaid on the whole image\n- All the individual mask predictions with matched targets and IoU value displayed in a grid.\n\nYou can see how that looks on the screenshots bellow.\nI've shared the functions to plot this in an utility script here: www.kaggle.com/slawekbiel/sartorius-vis/\nAnd updated my validation notebook with examples how to use it: https://www.kaggle.com/slawekbiel/validation-score-example\n\n![](https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomout.png)\n![](https://raw.githubusercontent.com/slawekslex/random/main/vis_zoomin.png)",
    "1602295": "Did you explore whether errors were prediction too big vs prediction too small?What about totally missed cells or totally wrong cells?\n\nRich",
    "1602325": "These are exactly kind of questions I was trying to answer. You can see too small vs large predictions by looking at the grid view, and the numbers of false positives and false negatives are shown in the table."
  },
  "source": "meta"
}