1
$\begingroup$

I want to use Mask RCNN to do image segmentation. I need to override the load_mask function for the dataset class. I know this function should return mask tensors and class ids of objects in an image. But what should the function return if there is no object (only background) in this image?

$\endgroup$
0
$\begingroup$

It should return an empty mask. Like

mask = np.empty([0, 0, 0]) 
class_ids = np.empty([0], np.int32)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.