MASKRCNN修改display_instances
class_names = ["background",""]
demoimg = IMAGE_DIR+"/"+"test1.png"
读取图像skimage.io.imread
image =skimage.io.imread(demoimg)
result = model.detect([image], verbose=1)
rL = result[0]
visualize.display_instances(image, rL['rois'], rL['masks'], rL['class_ids'],
class_names,scores=None,show_bbox=False,captions=None)
通过以上方法可以直接使输出图片仅有mask .