TransWikia.com

How to resize image along with their mask?

Data Science Asked by Monal Kumar on August 3, 2021

I have original images of the size 1935×1481. I am using labelme to annotate the images. I am creating polygons on the original image. Is there a way to resize the image along with their mask? I am planning to use TFOD mask-rcnn and I know it will resize the image but what happens to the mask?

One Answer

In this tutorial they use the following to resize the image and mask.

Is it applicable to your use-case?

@tf.function
def load_image_train(datapoint):
  input_image = tf.image.resize(datapoint['image'], (128, 128))
  input_mask = tf.image.resize(datapoint['segmentation_mask'], (128, 128))

Answered by smedegaard on August 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP