CVRN icon indicating copy to clipboard operation
CVRN copied to clipboard

Mappilary data prepration

Open gurkirt opened this issue 3 years ago • 6 comments

Hi, Thank ​you for releasing the code. I am trying to reproduce your results on the Mapillary dataset. You provide script to convert 19 class cityscape into 16 class version in cvrn/init_citiscapes_19cls_to_16cls.py. Can this script also be used to preprocess mapillary dataset as well? What do I need to be able to evaluate your model to get the number shown in your paper? I see there is dataloader to mapillary dataset, but that doesn't seem to include conversion to 16 class dataset.

Can you explain the steps required?

Many thanks Gurkirt

gurkirt avatar Sep 06 '21 09:09 gurkirt

Hi, we have uploaded the code that convert Mapillary labels into Cityscapes label space. Please find it in: CVRN/data loader and processing/init_vistas2cityscapes_format.py

Thanks!

jxhuang0508 avatar Sep 09 '21 09:09 jxhuang0508

Hi @jxhuang0508, thank you for providing the script. But I cannot find stuff_train.json or stuff_validation.json in the vista dataset. Did you generate those files yourself?

gurkirt avatar Sep 13 '21 09:09 gurkirt

Hi, we have uploaded these two files onto Google Drive. You could generate them by yourself or download them via the Google Drive link: https://drive.google.com/file/d/1Fx9MHXQkIfKpKVDJ1B_drHx5ueocZfkG/view?usp=sharing https://drive.google.com/file/d/1e0-ru0QF1TEc9IlOJIqrUiw6bMDDEWYp/view?usp=sharing

jxhuang0508 avatar Sep 13 '21 12:09 jxhuang0508

Thank you @jxhuang0508, dataset preprocessing script seems to be working perfectly, still in the process though. However, I am unclear on the evaluation part now, I need a dataset loader like Cityscapes_CVRN for the vista dataset. Initially, I thought I could just Cityscapes_CVRN by changing the dataset path. But, it seems there are multiple hardcoded details only work for cityscape, e.g. gtFine, or paths.

Do I just need to fix those things or it will require more changes to run cross-dataset evaluation on evaluation?

gurkirt avatar Sep 13 '21 13:09 gurkirt

I made the following changes vista_7cls.py to use it as dataloader. It seems to be indexing okay.

  -            'train': 'instancesonly_train_without_annotations.json',
  -            'val': 'instancesonly_gtFine_val.json',
  +            'train': 'instancesonly_train.json',
  +            'val': 'instancesonly_val.json',
  +            # 'train': 'instancesonly_train_without_annotations.json',
  +            # 'val': 'instancesonly_val.json.json',
               # 'test': 'image_info_test.json',
  
  -        self.panoptic_json_file = os.path.join(config.dataset.dataset_path, 'panoptic_val_16cls.json')
  -        self.panoptic_gt_folder = os.path.join(config.dataset.dataset_path, 'panoptic_val')
  +        self.panoptic_json_file = os.path.join(config.dataset.dataset_path, 'annotations/panoptic_val/panoptic_2018.json')
  +        self.panoptic_gt_folder = os.path.join(config.dataset.dataset_path, 'annotations/labels_val')
  
               for image_set, proposal_file in zip(image_sets, proposal_files):
                   dataset = JsonDataset('vistas_' + image_set,
                                         image_dir=self.image_dirs[image_set],
  -                                      anno_file=os.path.join(config.dataset.dataset_path, 'annotations_7cls', self.anno_files[image_set]))
  +                                      anno_file=os.path.join(config.dataset.dataset_path, 'annotations', self.anno_files[image_set]))
                   roidb = dataset.get_roidb(gt=True, proposal_file=proposal_file, crowd_filter_thresh=config.train.crowd_filter_thresh)
                   if flip:
                       if logger:
               self.dataset = JsonDataset('vistas_' + image_sets[0],
                                          image_dir=self.image_dirs[image_sets[0]],
  -                                       anno_file=os.path.join(config.dataset.dataset_path, 'annotations_7cls',
  +                                       anno_file=os.path.join(config.dataset.dataset_path, 'annotations',
                                          self.anno_files[image_sets[0]]))

However, I am concerned about

  -        self.panoptic_json_file = os.path.join(config.dataset.dataset_path, 'panoptic_val_16cls.json')
  -        self.panoptic_gt_folder = os.path.join(config.dataset.dataset_path, 'panoptic_val')
  +        self.panoptic_json_file = os.path.join(config.dataset.dataset_path, 'annotations/panoptic_val/panoptic_2018.json')
  +        self.panoptic_gt_folder = os.path.join(config.dataset.dataset_path, 'annotations/labels_val')

Is this okay?

gurkirt avatar Sep 14 '21 16:09 gurkirt

@jxhuang0508, can you please provide panoptic_val_16cls.json?

gurkirt avatar Sep 24 '21 08:09 gurkirt