title: Is it possible to make the segmentation mask boundaries smooth for the training masks in PASCAL-VOC dataset?
body: <p>Instead of Segmentation task, I am <strong>experimenting</strong> with <a href="http://host.robots.ox.ac.uk/pascal/VOC/" rel="nofollow noreferrer">PASCAL VOC data</a> data to use it to train a <a href="https://github.com/xuebinqin/U-2-Net" rel="nofollow noreferrer">`U^2 Net for Salient Object detection</a> and <a href="https://github.com/ZHKKKe/MODNet" rel="nofollow noreferrer">ModeNet as Matting task</a>.</p>
  <p>Idea is to generate a B&amp;W mask image from the coloured mask given (I'll take care of multi class and multi object thing). I can easily do it with 2 lines of code as:</p>
  <pre><code>img = np.array(Image.open('image1.png'))
  img[img != 0] = 255
  </code></pre>
  <p>But the real difference between <code>Matting / SOD</code> and Segmentation is that the boundaries for the given data are very rough unlike the boundaries of <a href="https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F4863487%2F8460cd9fa778e01445076b0e76a44699%2Fpred_ex2.png?generation=1590928536739915&amp;alt=media" rel="nofollow noreferrer">SOD</a> and <a href="https://i0.wp.com/syncedreview.com/wp-content/uploads/2020/09/image-12-1.png?fit=1318%2C524&amp;ssl=1" rel="nofollow noreferrer">Matting</a>. Is there a way to smooth the boundaries automatically for all the 3K images?</p>
  <p>Here are the images, mask and converted B&amp;W mask.</p>
  <p><a href="https://i.stack.imgur.com/GyUmW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GyUmW.jpg" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/99fk2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/99fk2.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/jZJQ9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jZJQ9.png" alt="enter image description here" /></a></p>