MCPcopy
hub / github.com/matterport/Mask_RCNN / load_image

Method load_image

utils.py:355–363  ·  view source on GitHub ↗

Load the specified image and return a [H,W,3] Numpy array.

(self, image_id)

Source from the content-addressed store, hash-verified

353 return self.image_info[image_id]["path"]
354
355 def load_image(self, image_id):
356 """Load the specified image and return a [H,W,3] Numpy array.
357 """
358 # Load image
359 image = skimage.io.imread(self.image_info[image_id]['path'])
360 # If grayscale. Convert to RGB for consistency.
361 if image.ndim != 3:
362 image = skimage.color.gray2rgb(image)
363 return image
364
365 def load_mask(self, image_id):
366 """Load instance masks for the given image.

Callers 2

evaluate_cocoFunction · 0.45
load_image_gtFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected