Skip to content

Error in Display Samples on inspect_dataset_via file #15

@StraigenDaigen

Description

@StraigenDaigen

Hello!, I'm looking your code inspect_dataset_via notebook, but in Display Samples cell I received this error

KeyError Traceback (most recent call last)
in
3 for image_id in image_ids:
4 image = dataset.load_image(image_id)
----> 5 mask, class_ids = dataset.load_mask(image_id)
6 visualize.display_top_masks(image, mask, class_ids, dataset.class_names)

D:\Steven\Mask_RCNN\maskrcnn\dataset.py in load_mask(self, image_id)
264
265 # find the class ID corresponding to the region's class attribute
--> 266 class_label = region_attributes["class"]
267 class_id = -1
268 for key, label in self.class_ids_to_labels.items():

KeyError: 'class'

I don't know why, because in the before cell "dataset" the code is working:

Image Count: 220

Class Count: 4
0. BG

  1. rio
  2. remocion
  3. piscina

I annotated the images in VIA 2.0.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions