def __init__(self, cfg, vis_highest_scoring=True, output_dir='./vis'):
    '\n        Args:\n            cfg (CfgNode):\n            vis_highest_scoring (bool): If set to True visualizes only\n                                        the highest scoring prediction\n        '
    self.metadata = MetadataCatalog.get(cfg.DATASETS.TEST[0])
    self.colors = self.metadata.thing_colors
    self.cat_names = self.metadata.thing_classes
    self.cpu_device = torch.device('cpu')
    self.vis_highest_scoring = vis_highest_scoring
    self.predictor = DefaultPredictor(cfg)
    os.makedirs(output_dir, exist_ok=True)
    self.output_dir = output_dir
Args:
    cfg (CfgNode):
    vis_highest_scoring (bool): If set to True visualizes only
                                the highest scoring prediction
def __init__(self, cfg, vis_highest_scoring=True, output_dir='./vis'):
    '\n        Args:\n            cfg (CfgNode):\n            vis_highest_scoring (bool): If set to True visualizes only\n                                        the highest scoring prediction\n        '
    self.metadata = MetadataCatalog.get(cfg.DATASETS.TEST[0])
    self.colors = self.metadata.thing_colors
    self.cat_names = self.metadata.thing_classes
    self.cpu_device = torch.device('cpu')
    self.vis_highest_scoring = vis_highest_scoring
    self.predictor = DefaultPredictor(cfg)
    os.makedirs(output_dir, exist_ok=True)
    self.output_dir = output_dir