-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'regions' #44
Comments
Show us the contents of your Json file |
{"_via_settings":{"ui":{"annotation_editor_height":25,"annotation_editor_fontsize":0.8,"leftsidebar_width":18,"image_grid":{"img_height":80,"rshape_fill":"none","rshape_fill_opacity":0.3,"rshape_stroke":"yellow","rshape_stroke_width":2,"show_region_shape":true,"show_image_policy":"all"},"image":{"region_label":"via_region_id","region_color":"via_default_region_color","region_label_font":"10px Sans","on_image_annotation_editor_placement":"NEAR_REGION"}},"core":{"buffer_size":18,"filepath":{},"default_filepath":""},"project":{"name":"ok"}},"_via_img_metadata":{"1.jpg216044":{"filename":"1.jpg","size":216044,"regions":[{"shape_attributes":{"name":"polygon","all_points_x":[345,463,527,544,509,427,328,220,170,163,305],"all_points_y":[135,138,179,261,348,418,436,388,293,216,150]},"region_attributes":{"name":"not_defined","type":"unknown","image_quality":{"good":true,"frontal":true,"good_illumination":true}}}],"file_attributes":{"caption":"","public_domain":"no","image_url":""}},"img.jpg162851":{"filename":"img.jpg","size":162851,"regions":[{"shape_attributes":{"name":"circle","cx":406,"cy":311,"r":202},"region_attributes":{"name":"not_defined","type":"unknown","image_quality":{"good":true,"frontal":true,"good_illumination":true}}}],"file_attributes":{"caption":"","public_domain":"no","image_url":""}},"Img_1_1_2.jpg162884":{"filename":"Img_1_1_2.jpg","size":162884,"regions":[{"shape_attributes":{"name":"circle","cx":407,"cy":319,"r":189},"region_attributes":{"name":"not_defined","type":"unknown","image_quality":{"good":true,"frontal":true,"good_illumination":true}}}],"file_attributes":{"caption":"","public_domain":"no","image_url":""}}},"_via_attributes":{"region":{"name":{"type":"text","description":"Name of the object","default_value":"not_defined"},"type":{"type":"dropdown","description":"Category of object","options":{"bird":"Bird","human":"Human","cup":"Cup (object)","unknown":"Unknown (object)"},"default_options":{"unknown":true}},"image_quality":{"type":"checkbox","description":"Quality of image region","options":{"blur":"Blurred region","good_illumination":"Good Illumination","frontal":"Object in Frontal View"},"default_options":{"good":true,"frontal":true,"good_illumination":true}}},"file":{"caption":{"type":"text","description":"","default_value":""},"public_domain":{"type":"radio","description":"","options":{"yes":"Yes","no":"No"},"default_options":{"no":true}},"image_url":{"type":"text","description":"","default_value":""}}}} |
hi every body
i replace train and val folder with my train and val folder then i ran the inspect_custom_data.ipynb but i faced this error
KeyError Traceback (most recent call last)
in ()
3 # https://github.com/matterport/Mask_RCNN/releases
4 dataset = custom.CustomDataset()
----> 5 dataset.load_custom(CUSTOM_DIR, "train")
6
7 # Must call before using the dataset
~/Deep-Learning/mask_rcnn_damage_detection/custom.py in load_custom(self, dataset_dir, subset)
118 # The VIA tool saves images in the JSON even if they don't have any
119 # annotations. Skip unannotated images.
--> 120 annotations = [a for a in annotations if a['regions']]
121
122 # Add images
~/Deep-Learning/mask_rcnn_damage_detection/custom.py in (.0)
118 # The VIA tool saves images in the JSON even if they don't have any
119 # annotations. Skip unannotated images.
--> 120 annotations = [a for a in annotations if a['regions']]
121
122 # Add images
KeyError: 'regions'
can every body help me
The text was updated successfully, but these errors were encountered: