@staticmethod
def get(name):
    if ('coco' in name):
        data_dir = DatasetCatalog.DATA_DIR
        attrs = DatasetCatalog.DATASETS[name]
        args = dict(root=os.path.join(data_dir, attrs['img_dir']), ann_file=os.path.join(data_dir, attrs['ann_file']))
        return dict(factory='COCODataset', args=args)
    elif ('voc' in name):
        data_dir = DatasetCatalog.DATA_DIR
        attrs = DatasetCatalog.DATASETS[name]
        args = dict(data_dir=os.path.join(data_dir, attrs['data_dir']), split=attrs['split'])
        return dict(factory='PascalVOCDataset', args=args)
    raise RuntimeError('Dataset not available: {}'.format(name))
@staticmethod
def get(name):
    if ('coco' in name):
        data_dir = DatasetCatalog.DATA_DIR
        attrs = DatasetCatalog.DATASETS[name]
        args = dict(root=os.path.join(data_dir, attrs['img_dir']), ann_file=os.path.join(data_dir, attrs['ann_file']))
        return dict(factory='COCODataset', args=args)
    elif ('voc' in name):
        data_dir = DatasetCatalog.DATA_DIR
        attrs = DatasetCatalog.DATASETS[name]
        args = dict(data_dir=os.path.join(data_dir, attrs['data_dir']), split=attrs['split'])
        return dict(factory='PascalVOCDataset', args=args)
    raise RuntimeError('Dataset not available: {}'.format(name))