1

I am doing custom image segmentation using PixelLib.

import pixellib
from pixellib.instance import custom_segmentation

segment_image = custom_segmentation()
segment_image.inferConfig(num_classes= 1, class_names= ["BG", "road"])
segment_image.load_model("/content/mask_rcnn_model.143-0.199986.h5")
segment_image.segmentImage("/content/FullTrainingData/Warlick.PNG", show_bboxes=False, output_image_name="a0000sample_out" + str(i) +".PNG")

enter image description here

The segmentation looks good on my machine, but running it on another machine with the same h5 file the result is far worse

enter image description here

The result differs each time I reload the model. Any reason this could be happening?

GCK
  • 63
  • 1
  • 5

1 Answers1

1

adding these imports

import pixellib
from pixellib.tune_bg import alter_bg

causes it to work. No idea why though

GCK
  • 63
  • 1
  • 5