I work with Detectron for panoptic segmentation.
I would like to change the metadata values to values that I have chosen. In particular, I would like to replace one dictionary with another dictionary that I have written.
but I got an error:
AssertionError: Attribute 'stuff_dataset_id_to_contiguous_id' in the metadata of 'coco_2017_train_panoptic_separated' cannot be set to a different value!
Here are the metadata I would like to change:
MetadataCatalog.get(cfg.DATASETS.TRAIN[0])
-->
--> out:
Metadata(evaluator_type='coco_panoptic_seg', image_root='datasets/coco/train2017',
json_file='datasets/coco/annotations/instances_train2017.json',
name='coco_2017_train_panoptic_separated',
panoptic_json='datasets/coco/annotations/panoptic_train2017.json'
[...]
stuff_dataset_id_to_contiguous_id={92: 1, 93: 2, 95: 3, 100: 4, 107: 5, 109: 6,
112: 7, 118: 8, 119: 9, 122: 10, 125: 11, 128: 12, 130: 13, 133: 14, 138: 15,
141: 16, [... etc etc]
I would like to change stuff_dataset_id_to_contiguous_id to another dictionary.
What can I do? Thank you so much.