{
  "id": 311522,
  "title": "How to extract plant from background - Salient Object Detection",
  "url": "/competitions/herbarium-2022-fgvc9/discussion/311522",
  "author_name": "Remek Kinas",
  "post_date": "2022-03-07T10:29:09.944000",
  "votes": 8,
  "comment_count": 11,
  "views": 0,
  "content": "<p>Yesterday I shared <a href=\"https://www.kaggle.com/c/herbarium-2022-fgvc9/discussion/311370\" target=\"_blank\">Feature matching LoFTR - Kornia (Open CV - SURF comparision)</a> to show possible way to extract features in plants (LoFTR stand for Detector-Free Local Feature Matching with Transformers). Today I would like to share idea to remove background from photos or … detect the most visually attractive objects in an image. I do not publish notebook in this competition to avoid duplicates. Link to notebook is provided below. </p>\n<p>I checked results on Herbarium images and it looks promising (for further research and investigation). </p>\n<p>For this experment I use Salient Object Detection (SOD). Results below.</p>\n<ol>\n<li>Oryginal photo</li>\n<li>Extracted object </li>\n<li>BBox for object - based on sailent mask region</li>\n<li>Sailent mask</li>\n</ol>\n<p><img src=\"https://i.ibb.co/r38r67b/h003a.jpg\" alt=\"\"><br>\n<img src=\"https://i.ibb.co/vmL8Zms/h002a.jpg\" alt=\"\"><br>\n<img src=\"https://i.ibb.co/SJLwfR5/h001a.jpg\" alt=\"\"></p>\n<p>Notebook with SOD implementation you can find here: <a href=\"https://www.kaggle.com/remekkinas/remove-background-salient-object-detection\" target=\"_blank\">Remove background - Salient Object Detection</a></p>",
  "messages": [
    {
      "id": 1714790,
      "postDate": "2022-03-07T10:29:09.943Z",
      "content": "<p>Yesterday I shared <a href=\"https://www.kaggle.com/c/herbarium-2022-fgvc9/discussion/311370\" target=\"_blank\">Feature matching LoFTR - Kornia (Open CV - SURF comparision)</a> to show possible way to extract features in plants (LoFTR stand for Detector-Free Local Feature Matching with Transformers). Today I would like to share idea to remove background from photos or … detect the most visually attractive objects in an image. I do not publish notebook in this competition to avoid duplicates. Link to notebook is provided below. </p>\n<p>I checked results on Herbarium images and it looks promising (for further research and investigation). </p>\n<p>For this experment I use Salient Object Detection (SOD). Results below.</p>\n<ol>\n<li>Oryginal photo</li>\n<li>Extracted object </li>\n<li>BBox for object - based on sailent mask region</li>\n<li>Sailent mask</li>\n</ol>\n<p><img src=\"https://i.ibb.co/r38r67b/h003a.jpg\" alt=\"\"><br>\n<img src=\"https://i.ibb.co/vmL8Zms/h002a.jpg\" alt=\"\"><br>\n<img src=\"https://i.ibb.co/SJLwfR5/h001a.jpg\" alt=\"\"></p>\n<p>Notebook with SOD implementation you can find here: <a href=\"https://www.kaggle.com/remekkinas/remove-background-salient-object-detection\" target=\"_blank\">Remove background - Salient Object Detection</a></p>",
      "rawMarkdown": "Yesterday I shared [Feature matching LoFTR - Kornia (Open CV - SURF comparision)](https://www.kaggle.com/c/herbarium-2022-fgvc9/discussion/311370) to show possible way to extract features in plants (LoFTR stand for Detector-Free Local Feature Matching with Transformers). Today I would like to share idea to remove background from photos or ... detect the most visually attractive objects in an image. I do not publish notebook in this competition to avoid duplicates. Link to notebook is provided below. \n\nI checked results on Herbarium images and it looks promising (for further research and investigation). \n\nFor this experment I use Salient Object Detection (SOD). Results below.\n\n1. Oryginal photo\n2. Extracted object \n3. BBox for object - based on sailent mask region\n4. Sailent mask\n\n![](https://i.ibb.co/r38r67b/h003a.jpg)\n![](https://i.ibb.co/vmL8Zms/h002a.jpg)\n![](https://i.ibb.co/SJLwfR5/h001a.jpg)\n\nNotebook with SOD implementation you can find here: [Remove background - Salient Object Detection](https://www.kaggle.com/remekkinas/remove-background-salient-object-detection)",
      "votes": 8
    },
    {
      "id": 1714928,
      "postDate": "2022-03-07T13:46:55.573Z",
      "content": "<p>Hello Remek, </p>\n<p>Thanks again for compiling this so-often used operation into a notebook and sharing the same with the community. Will be referred by many of us for our future ventures. </p>",
      "rawMarkdown": "Hello Remek, \n\nThanks again for compiling this so-often used operation into a notebook and sharing the same with the community. Will be referred by many of us for our future ventures. ",
      "votes": 1
    },
    {
      "id": 1714917,
      "postDate": "2022-03-07T13:36:02.350Z",
      "content": "<p>Very cool, thanks for sharing! My hunch is that this will be more helpful in this competition over feature matching (in my opinion).</p>\n<p>I was planning to do something similar to this by training R-CNNs (in contrast to this and U2Net); haven't created a dataset for it yet though.</p>",
      "rawMarkdown": "Very cool, thanks for sharing! My hunch is that this will be more helpful in this competition over feature matching (in my opinion).\n\nI was planning to do something similar to this by training R-CNNs (in contrast to this and U2Net); haven't created a dataset for it yet though.",
      "votes": 1,
      "replies": [
        {
          "id": 1714927,
          "postDate": "2022-03-07T13:46:51.277Z",
          "content": "<p>Thank you for your feedback. Definitely it is way we should check. In whales competition it is easier since whale is more \"visible\" for SoD. I just shared to see if we can benefit from this. </p>",
          "rawMarkdown": "Thank you for your feedback. Definitely it is way we should check. In whales competition it is easier since whale is more \"visible\" for SoD. I just shared to see if we can benefit from this. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 1728268,
      "postDate": "2022-03-18T18:16:42.083Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a>, just wanted to know, will this work even if the background is not distinctly separate, like those in field images?</p>",
      "rawMarkdown": "Hi @remekkinas, just wanted to know, will this work even if the background is not distinctly separate, like those in field images?"
    },
    {
      "id": 1715097,
      "postDate": "2022-03-07T16:21:20.803Z",
      "content": "<p>Thank you for sharing terrific work! Would you think your method works well for this dataset in general? Would love to see more examples. </p>",
      "rawMarkdown": "Thank you for sharing terrific work! Would you think your method works well for this dataset in general? Would love to see more examples. ",
      "replies": [
        {
          "id": 1715232,
          "postDate": "2022-03-07T18:58:06.613Z",
          "content": "<p><a href=\"https://www.kaggle.com/parkjohnychae\" target=\"_blank\">@parkjohnychae</a> I will do some research. I am mainly in Whales competition where I was looking for appropriate SOD (I went througth many researches and implementations) but … definitely I will help. Let me some days I will find way to make extraction pipeline. </p>",
          "rawMarkdown": "@parkjohnychae I will do some research. I am mainly in Whales competition where I was looking for appropriate SOD (I went througth many researches and implementations) but ... definitely I will help. Let me some days I will find way to make extraction pipeline. ",
          "votes": 1
        },
        {
          "id": 1716273,
          "postDate": "2022-03-08T20:22:27.823Z",
          "content": "<p><a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> Thank you, that makes sense. I hope the happywhale comps is going well!</p>\n<p>It is nice to see saliency detection attempt in this competition, because I had tried some pre-trained saliency detection models, such as <a href=\"https://github.com/yuhuan-wu/MobileSal\" target=\"_blank\">IEEE TPAMI 2021: MobileSal: Extremely Efficient RGB-D Salient Object Detection</a>. It didn't work so well when I tried, without the depth component. </p>",
          "rawMarkdown": "@remekkinas Thank you, that makes sense. I hope the happywhale comps is going well!\n\nIt is nice to see saliency detection attempt in this competition, because I had tried some pre-trained saliency detection models, such as [IEEE TPAMI 2021: MobileSal: Extremely Efficient RGB-D Salient Object Detection] (https://github.com/yuhuan-wu/MobileSal). It didn't work so well when I tried, without the depth component. ",
          "votes": 1
        },
        {
          "id": 1719788,
          "postDate": "2022-03-12T05:56:29.837Z",
          "content": "<p>Hi John and Remek! </p>\n<p>Remek, Thanks for creating the amazing tutorial and sharing here :)</p>\n<p>I was actually curious-in the whale competition using this technique was helpful but I was thinking here we have perfect images with a white background so it might not be as effective, I was thinking a centre crop might work better here instead. </p>",
          "rawMarkdown": "Hi John and Remek! \n\nRemek, Thanks for creating the amazing tutorial and sharing here :)\n\nI was actually curious-in the whale competition using this technique was helpful but I was thinking here we have perfect images with a white background so it might not be as effective, I was thinking a centre crop might work better here instead. ",
          "votes": 1
        },
        {
          "id": 1719796,
          "postDate": "2022-03-12T06:00:32.237Z",
          "content": "<p>PS: <a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> Huge congrats on reaching the 2x GM title! I really enjoyed learning from your tutorials in the whale competition! :)</p>",
          "rawMarkdown": "PS: @remekkinas Huge congrats on reaching the 2x GM title! I really enjoyed learning from your tutorials in the whale competition! :)",
          "votes": 1
        },
        {
          "id": 1719800,
          "postDate": "2022-03-12T06:02:24.843Z",
          "content": "<p>I will test my solution next week. In this case we have to use combinations of cv techniques. We will see :)</p>",
          "rawMarkdown": "I will test my solution next week. In this case we have to use combinations of cv techniques. We will see :)",
          "votes": 1
        },
        {
          "id": 1719801,
          "postDate": "2022-03-12T06:03:00.337Z",
          "content": "<p>Thank you very very much 🙏🙏🙏</p>",
          "rawMarkdown": "Thank you very very much 🙏🙏🙏"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1714928,
      "author_name": "SJ",
      "author_url": "",
      "post_date": "2022-03-07T13:46:55.573000",
      "content": "<p>Hello Remek, </p>\n<p>Thanks again for compiling this so-often used operation into a notebook and sharing the same with the community. Will be referred by many of us for our future ventures. </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1714917,
      "author_name": "Dax Ledesma",
      "author_url": "",
      "post_date": "2022-03-07T13:36:02.350000",
      "content": "<p>Very cool, thanks for sharing! My hunch is that this will be more helpful in this competition over feature matching (in my opinion).</p>\n<p>I was planning to do something similar to this by training R-CNNs (in contrast to this and U2Net); haven't created a dataset for it yet though.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1714927,
          "author_name": "Remek Kinas",
          "author_url": "",
          "post_date": "2022-03-07T13:46:51.277000",
          "content": "<p>Thank you for your feedback. Definitely it is way we should check. In whales competition it is easier since whale is more \"visible\" for SoD. I just shared to see if we can benefit from this. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1728268,
      "author_name": "Anisha",
      "author_url": "",
      "post_date": "2022-03-18T18:16:42.083000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a>, just wanted to know, will this work even if the background is not distinctly separate, like those in field images?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1715097,
      "author_name": "John Park",
      "author_url": "",
      "post_date": "2022-03-07T16:21:20.803000",
      "content": "<p>Thank you for sharing terrific work! Would you think your method works well for this dataset in general? Would love to see more examples. </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1715232,
          "author_name": "Remek Kinas",
          "author_url": "",
          "post_date": "2022-03-07T18:58:06.613000",
          "content": "<p><a href=\"https://www.kaggle.com/parkjohnychae\" target=\"_blank\">@parkjohnychae</a> I will do some research. I am mainly in Whales competition where I was looking for appropriate SOD (I went througth many researches and implementations) but … definitely I will help. Let me some days I will find way to make extraction pipeline. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1716273,
          "author_name": "John Park",
          "author_url": "",
          "post_date": "2022-03-08T20:22:27.823000",
          "content": "<p><a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> Thank you, that makes sense. I hope the happywhale comps is going well!</p>\n<p>It is nice to see saliency detection attempt in this competition, because I had tried some pre-trained saliency detection models, such as <a href=\"https://github.com/yuhuan-wu/MobileSal\" target=\"_blank\">IEEE TPAMI 2021: MobileSal: Extremely Efficient RGB-D Salient Object Detection</a>. It didn't work so well when I tried, without the depth component. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1719788,
          "author_name": "Sanyam Bhutani",
          "author_url": "",
          "post_date": "2022-03-12T05:56:29.837000",
          "content": "<p>Hi John and Remek! </p>\n<p>Remek, Thanks for creating the amazing tutorial and sharing here :)</p>\n<p>I was actually curious-in the whale competition using this technique was helpful but I was thinking here we have perfect images with a white background so it might not be as effective, I was thinking a centre crop might work better here instead. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1719796,
          "author_name": "Sanyam Bhutani",
          "author_url": "",
          "post_date": "2022-03-12T06:00:32.237000",
          "content": "<p>PS: <a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> Huge congrats on reaching the 2x GM title! I really enjoyed learning from your tutorials in the whale competition! :)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1719800,
          "author_name": "Remek Kinas",
          "author_url": "",
          "post_date": "2022-03-12T06:02:24.843000",
          "content": "<p>I will test my solution next week. In this case we have to use combinations of cv techniques. We will see :)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1719801,
          "author_name": "Remek Kinas",
          "author_url": "",
          "post_date": "2022-03-12T06:03:00.337000",
          "content": "<p>Thank you very very much 🙏🙏🙏</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1714790": "Yesterday I shared [Feature matching LoFTR - Kornia (Open CV - SURF comparision)](https://www.kaggle.com/c/herbarium-2022-fgvc9/discussion/311370) to show possible way to extract features in plants (LoFTR stand for Detector-Free Local Feature Matching with Transformers). Today I would like to share idea to remove background from photos or ... detect the most visually attractive objects in an image. I do not publish notebook in this competition to avoid duplicates. Link to notebook is provided below. \n\nI checked results on Herbarium images and it looks promising (for further research and investigation). \n\nFor this experment I use Salient Object Detection (SOD). Results below.\n\n1. Oryginal photo\n2. Extracted object \n3. BBox for object - based on sailent mask region\n4. Sailent mask\n\n![](https://i.ibb.co/r38r67b/h003a.jpg)\n![](https://i.ibb.co/vmL8Zms/h002a.jpg)\n![](https://i.ibb.co/SJLwfR5/h001a.jpg)\n\nNotebook with SOD implementation you can find here: [Remove background - Salient Object Detection](https://www.kaggle.com/remekkinas/remove-background-salient-object-detection)",
    "1714928": "Hello Remek, \n\nThanks again for compiling this so-often used operation into a notebook and sharing the same with the community. Will be referred by many of us for our future ventures. ",
    "1714917": "Very cool, thanks for sharing! My hunch is that this will be more helpful in this competition over feature matching (in my opinion).\n\nI was planning to do something similar to this by training R-CNNs (in contrast to this and U2Net); haven't created a dataset for it yet though.",
    "1728268": "Hi @remekkinas, just wanted to know, will this work even if the background is not distinctly separate, like those in field images?",
    "1715097": "Thank you for sharing terrific work! Would you think your method works well for this dataset in general? Would love to see more examples. "
  }
}