Load the specified image and return a [H,W,3] Numpy array.
(self, image_id)
| 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. |
no outgoing calls
no test coverage detected