{
  "id": 403353,
  "title": "🧱 Remove backgrounds is not good idea 🧱",
  "url": "/competitions/benetech-making-graphs-accessible/discussion/403353",
  "author_name": "",
  "post_date": "2023-04-22T16:51:16.028248Z",
  "votes": 5,
  "comment_count": 3,
  "views": 0,
  "content": "<p>When I was looking at the pictures of the charts in the competition, I noticed that there are pictures with dark backgrounds, or colored backgrounds.</p>\n<p>I remembered that I had recently seen how to use the <code>rembg</code> library to remove the background of images. And decided to use it - to preprocess the images and remove the background from them, where necessary.</p>\n<p>Below I would like to give you an example of how to remove the background, which can be found in this <a href=\"https://www.kaggle.com/discussions/getting-started/402982\" target=\"_blank\">topic</a>.  To make it clear the quality with which this library works.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb59f7233bcad43c04306b23301d64be1%2Flego_example.png?generation=1682180239784681&amp;alt=media\" alt=\"\"></p>\n<p>I wrote a little code. And processed several different graphs with it.</p>\n<p>Here are the results I got:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb2cd13680cd4d0e18d484c448428cca3%2Fexample.png?generation=1682180679132724&amp;alt=media\" alt=\"\"></p>\n<p>You can see that this approach does not help in preparing images before analysis.</p>\n<p>I hope that this topic will save someone some time.</p>",
  "messages": [
    {
      "id": "2230679",
      "postDate": "04/22/2023 16:51:16",
      "content": "<p>When I was looking at the pictures of the charts in the competition, I noticed that there are pictures with dark backgrounds, or colored backgrounds.</p>\n<p>I remembered that I had recently seen how to use the <code>rembg</code> library to remove the background of images. And decided to use it - to preprocess the images and remove the background from them, where necessary.</p>\n<p>Below I would like to give you an example of how to remove the background, which can be found in this <a href=\"https://www.kaggle.com/discussions/getting-started/402982\" target=\"_blank\">topic</a>.  To make it clear the quality with which this library works.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb59f7233bcad43c04306b23301d64be1%2Flego_example.png?generation=1682180239784681&amp;alt=media\" alt=\"\"></p>\n<p>I wrote a little code. And processed several different graphs with it.</p>\n<p>Here are the results I got:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb2cd13680cd4d0e18d484c448428cca3%2Fexample.png?generation=1682180679132724&amp;alt=media\" alt=\"\"></p>\n<p>You can see that this approach does not help in preparing images before analysis.</p>\n<p>I hope that this topic will save someone some time.</p>",
      "rawMarkdown": "When I was looking at the pictures of the charts in the competition, I noticed that there are pictures with dark backgrounds, or colored backgrounds.\n\nI remembered that I had recently seen how to use the ```rembg``` library to remove the background of images. And decided to use it - to preprocess the images and remove the background from them, where necessary.\n\nBelow I would like to give you an example of how to remove the background, which can be found in this [topic](https://www.kaggle.com/discussions/getting-started/402982).  To make it clear the quality with which this library works.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb59f7233bcad43c04306b23301d64be1%2Flego_example.png?generation=1682180239784681&alt=media)\n\nI wrote a little code. And processed several different graphs with it.\n\nHere are the results I got:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb2cd13680cd4d0e18d484c448428cca3%2Fexample.png?generation=1682180679132724&alt=media)\n\nYou can see that this approach does not help in preparing images before analysis.\n\nI hope that this topic will save someone some time.",
      "votes": null
    },
    {
      "id": "2230696",
      "postDate": "04/22/2023 17:02:50",
      "content": "<p>Good information<br>\nTrue that rembg library is not a good way for a model training<br>\nBut in case of generative ai like Image Generator<br>\nwe can segment our required data of images<br>\nAnd can Remove the noisy background from our generated image.<br>\nIt is also good to research on this library for any applications</p>",
      "rawMarkdown": "Good information\nTrue that rembg library is not a good way for a model training\nBut in case of generative ai like Image Generator\nwe can segment our required data of images\nAnd can Remove the noisy background from our generated image.\nIt is also good to research on this library for any applications",
      "votes": null
    },
    {
      "id": "2230700",
      "postDate": "04/22/2023 17:07:05",
      "content": "<p><a href=\"https://www.kaggle.com/harshit264\" target=\"_blank\">@harshit264</a> I had the idea of making the dark graphs lighter - so that the whole data set is similar. I thought that maybe removing the background would help prepare the images. Normalize them, so to speak.</p>\n<p>And then already on the basis of the processed images to build a model.</p>",
      "rawMarkdown": "harshit264 I had the idea of making the dark graphs lighter - so that the whole data set is similar. I thought that maybe removing the background would help prepare the images. Normalize them, so to speak.\n\nAnd then already on the basis of the processed images to build a model.",
      "votes": null
    },
    {
      "id": "2244025",
      "postDate": "05/03/2023 11:38:40",
      "content": "<p>I didn't hear till now abour rembg library (to remove the background of images). Thank you for that information too.</p>",
      "rawMarkdown": "I didn't hear till now abour rembg library (to remove the background of images). Thank you for that information too.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2230696,
      "author_name": "harshit264",
      "author_url": "",
      "post_date": "04/22/2023 17:02:50",
      "content": "<p>Good information<br>\nTrue that rembg library is not a good way for a model training<br>\nBut in case of generative ai like Image Generator<br>\nwe can segment our required data of images<br>\nAnd can Remove the noisy background from our generated image.<br>\nIt is also good to research on this library for any applications</p>",
      "votes": null,
      "replies": [
        {
          "id": 2230700,
          "author_name": "serangu",
          "author_url": "",
          "post_date": "04/22/2023 17:07:05",
          "content": "<p><a href=\"https://www.kaggle.com/harshit264\" target=\"_blank\">@harshit264</a> I had the idea of making the dark graphs lighter - so that the whole data set is similar. I thought that maybe removing the background would help prepare the images. Normalize them, so to speak.</p>\n<p>And then already on the basis of the processed images to build a model.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2244025,
      "author_name": "mpwolke",
      "author_url": "",
      "post_date": "05/03/2023 11:38:40",
      "content": "<p>I didn't hear till now abour rembg library (to remove the background of images). Thank you for that information too.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2230679": "When I was looking at the pictures of the charts in the competition, I noticed that there are pictures with dark backgrounds, or colored backgrounds.\n\nI remembered that I had recently seen how to use the ```rembg``` library to remove the background of images. And decided to use it - to preprocess the images and remove the background from them, where necessary.\n\nBelow I would like to give you an example of how to remove the background, which can be found in this [topic](https://www.kaggle.com/discussions/getting-started/402982).  To make it clear the quality with which this library works.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb59f7233bcad43c04306b23301d64be1%2Flego_example.png?generation=1682180239784681&alt=media)\n\nI wrote a little code. And processed several different graphs with it.\n\nHere are the results I got:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F925769%2Fb2cd13680cd4d0e18d484c448428cca3%2Fexample.png?generation=1682180679132724&alt=media)\n\nYou can see that this approach does not help in preparing images before analysis.\n\nI hope that this topic will save someone some time.",
    "2230696": "Good information\nTrue that rembg library is not a good way for a model training\nBut in case of generative ai like Image Generator\nwe can segment our required data of images\nAnd can Remove the noisy background from our generated image.\nIt is also good to research on this library for any applications",
    "2230700": "harshit264 I had the idea of making the dark graphs lighter - so that the whole data set is similar. I thought that maybe removing the background would help prepare the images. Normalize them, so to speak.\n\nAnd then already on the basis of the processed images to build a model.",
    "2244025": "I didn't hear till now abour rembg library (to remove the background of images). Thank you for that information too."
  },
  "source": "meta"
}