{
  "id": 311682,
  "title": "How to read roi files and convert it into mask?",
  "url": "/competitions/ai-kfm-2022/discussion/311682",
  "author_name": "",
  "post_date": "2022-03-08T08:21:04.499925800Z",
  "votes": null,
  "comment_count": 5,
  "views": 0,
  "content": "<p>How to read roi files and convert it into mask?</p>",
  "messages": [
    {
      "id": "1715658",
      "postDate": "03/08/2022 08:21:04",
      "content": "<p>How to read roi files and convert it into mask?</p>",
      "rawMarkdown": "How to read roi files and convert it into mask?",
      "votes": null
    },
    {
      "id": "1715755",
      "postDate": "03/08/2022 10:21:22",
      "content": "<p>Thank you for the question. A roi file can be read in different ways, for example:</p>\n<ul>\n<li>using MATLAB <a href=\"https://it.mathworks.com/matlabcentral/fileexchange/32479-readimagejroi:\" target=\"_blank\">https://it.mathworks.com/matlabcentral/fileexchange/32479-readimagejroi:</a> The function returns the coordinates of the box. </li>\n<li>using python <a href=\"https://pypi.org/project/roifile/#:~:text=Roifile%20is%20a%20Python%20library,and%20whatnot%20for%20image%20overlays\" target=\"_blank\">https://pypi.org/project/roifile/#:~:text=Roifile%20is%20a%20Python%20library,and%20whatnot%20for%20image%20overlays</a>.</li>\n</ul>\n<p>I hope I have been helpful,<br>\nRegards</p>",
      "rawMarkdown": "Thank you for the question. A roi file can be read in different ways, for example:\n- using MATLAB https://it.mathworks.com/matlabcentral/fileexchange/32479-readimagejroi: The function returns the coordinates of the box. \n- using python https://pypi.org/project/roifile/#:~:text=Roifile%20is%20a%20Python%20library,and%20whatnot%20for%20image%20overlays.\n\nI hope I have been helpful,\nRegards",
      "votes": null
    },
    {
      "id": "1723125",
      "postDate": "03/15/2022 06:43:00",
      "content": "<p><code>roi.coordinates()</code></p>\n<p><code>array([[1240.,  210.],\n       [1240.,  304.],\n       [1298.,  304.],\n       [1298.,  210.],\n       [1240.,  210.]], dtype=float32)</code></p>\n<p>How to make segmentation mask from these coordinates?</p>",
      "rawMarkdown": "`roi.coordinates()`\n\n`array([[1240.,  210.],\n       [1240.,  304.],\n       [1298.,  304.],\n       [1298.,  210.],\n       [1240.,  210.]], dtype=float32)`\n\nHow to make segmentation mask from these coordinates?",
      "votes": null
    },
    {
      "id": "1723129",
      "postDate": "03/15/2022 06:46:58",
      "content": "<p>If I am understanding correctly it is segmentation task right? We need segmentation mask then i guess</p>",
      "rawMarkdown": "If I am understanding correctly it is segmentation task right? We need segmentation mask then i guess",
      "votes": null
    },
    {
      "id": "1723142",
      "postDate": "03/15/2022 06:55:32",
      "content": "<p>If you prepare any baseline or eda in python, please do share.</p>",
      "rawMarkdown": "If you prepare any baseline or eda in python, please do share.",
      "votes": null
    },
    {
      "id": "1723261",
      "postDate": "03/15/2022 09:08:29",
      "content": "<p>No, it is an object detection task</p>",
      "rawMarkdown": "No, it is an object detection task",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1715755,
      "author_name": "michi94ca",
      "author_url": "",
      "post_date": "03/08/2022 10:21:22",
      "content": "<p>Thank you for the question. A roi file can be read in different ways, for example:</p>\n<ul>\n<li>using MATLAB <a href=\"https://it.mathworks.com/matlabcentral/fileexchange/32479-readimagejroi:\" target=\"_blank\">https://it.mathworks.com/matlabcentral/fileexchange/32479-readimagejroi:</a> The function returns the coordinates of the box. </li>\n<li>using python <a href=\"https://pypi.org/project/roifile/#:~:text=Roifile%20is%20a%20Python%20library,and%20whatnot%20for%20image%20overlays\" target=\"_blank\">https://pypi.org/project/roifile/#:~:text=Roifile%20is%20a%20Python%20library,and%20whatnot%20for%20image%20overlays</a>.</li>\n</ul>\n<p>I hope I have been helpful,<br>\nRegards</p>",
      "votes": null,
      "replies": [
        {
          "id": 1723125,
          "author_name": "gyanendradas",
          "author_url": "",
          "post_date": "03/15/2022 06:43:00",
          "content": "<p><code>roi.coordinates()</code></p>\n<p><code>array([[1240.,  210.],\n       [1240.,  304.],\n       [1298.,  304.],\n       [1298.,  210.],\n       [1240.,  210.]], dtype=float32)</code></p>\n<p>How to make segmentation mask from these coordinates?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1723129,
          "author_name": "gyanendradas",
          "author_url": "",
          "post_date": "03/15/2022 06:46:58",
          "content": "<p>If I am understanding correctly it is segmentation task right? We need segmentation mask then i guess</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1723142,
          "author_name": "gyanendradas",
          "author_url": "",
          "post_date": "03/15/2022 06:55:32",
          "content": "<p>If you prepare any baseline or eda in python, please do share.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1723261,
          "author_name": "step8p",
          "author_url": "",
          "post_date": "03/15/2022 09:08:29",
          "content": "<p>No, it is an object detection task</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1715658": "How to read roi files and convert it into mask?",
    "1715755": "Thank you for the question. A roi file can be read in different ways, for example:\n- using MATLAB https://it.mathworks.com/matlabcentral/fileexchange/32479-readimagejroi: The function returns the coordinates of the box. \n- using python https://pypi.org/project/roifile/#:~:text=Roifile%20is%20a%20Python%20library,and%20whatnot%20for%20image%20overlays.\n\nI hope I have been helpful,\nRegards",
    "1723125": "`roi.coordinates()`\n\n`array([[1240.,  210.],\n       [1240.,  304.],\n       [1298.,  304.],\n       [1298.,  210.],\n       [1240.,  210.]], dtype=float32)`\n\nHow to make segmentation mask from these coordinates?",
    "1723129": "If I am understanding correctly it is segmentation task right? We need segmentation mask then i guess",
    "1723142": "If you prepare any baseline or eda in python, please do share.",
    "1723261": "No, it is an object detection task"
  },
  "source": "meta"
}