You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modified the colab notebook tutorial from detectron2 in the following way to create panoptic labels using panoptic deeplab model under the directory detectron2/projects for a custom dataset. When I used the Panoptic FPN model from the model zoo, it gives me correct labels but when I use the panoptic deeplab model (link in the code below), there are 2 issues:
For 3 out of 10 images, the code below gives a key error for 'instances'.
cfg = get_cfg()
from detectron2.projects.panoptic_deeplab import add_panoptic_deeplab_config
add_panoptic_deeplab_config(cfg)
# add project-specific config (e.g., TensorMask) here if you're not running a model in detectron2's core library
cfg.merge_from_file("detectron2/projects/Panoptic-DeepLab/configs/Cityscapes-PanopticSegmentation/panoptic_deeplab_R_52_os16_mg124_poly_90k_bs32_crop_512_1024.yaml")
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.5 # set threshold for this model
# Find a model from detectron2's model zoo. You can use the https://dl.fbaipublicfiles... url as well
cfg.MODEL.WEIGHTS = 'Desktop/detectron2/model_final_bd324a.pkl'
predictor = DefaultPredictor(cfg)
If segments_info is None, all pixel values in pred must be ≥ -1. Pixels with value -1 are assigned void labels. Otherwise, the category id of each pixel is obtained by category_id = pixel // metadata.label_divisor.
and when merging from file add cfg.set_new_allowed(True)
Instructions To Reproduce the Issue:
Modified the colab notebook tutorial from detectron2 in the following way to create panoptic labels using panoptic deeplab model under the directory detectron2/projects for a custom dataset. When I used the Panoptic FPN model from the model zoo, it gives me correct labels but when I use the panoptic deeplab model (link in the code below), there are 2 issues:
Changes I made to reproduce issue:
Environment:
Pasting the output of the following command:
Please help solve this!
The text was updated successfully, but these errors were encountered: