zhiqi-li / Panoptic-SegFormer

This is the official repo of Panoptic SegFormer [CVPR'22]
Apache License 2.0
211 stars 29 forks source link

Why instance annotations are required along panoptic ones? #8

Open aviadmx opened 2 years ago

aviadmx commented 2 years ago

The model solves the panoptic segmentation task, why does the validation dataset uses the instance segmentation annotations?

data = dict(
    samples_per_gpu=2,
    workers_per_gpu=2,
    train=dict(
        type=dataset_type,
        ann_file= './datasets/annotations/panoptic_train2017_detection_format.json',
        img_prefix=data_root + 'train2017/',
        pipeline=train_pipeline),
    val=dict( 

        segmentations_folder='./seg',
        gt_json = './datasets/annotations/panoptic_val2017.json',
        gt_folder = './datasets/annotations/panoptic_val2017',
        type=dataset_type,
        ann_file=data_root + 'annotations/instances_val2017.json', # Why?
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline),
    test=dict(
        segmentations_folder='./seg',
        gt_json = './datasets/annotations/panoptic_val2017.json',
        gt_folder = './datasets/annotations/panoptic_val2017',
        type=dataset_type,
        #ann_file= './datasets/coco/annotations/image_info_test-dev2017.json',
        ann_file=data_root + 'annotations/instances_val2017.json', # Why?
        #img_prefix=data_root + '/test2017/',
        img_prefix=data_root + 'val2017/',
        pipeline=test_pipeline)
        )

We eventually use the instances_val2017.json file instead of panoptic_val2017.json

zhiqi-li commented 2 years ago

"instances_val2017.json" is used for instance segmentation, the GT of panoptic segmentation is './datasets/annotations/panoptic_val2017.json',

aviadmx commented 2 years ago

I see, but I'm asking why do we need to supply those and not just the annotation file of panoptic_val2017.json? Isn't it a bit redundant since we're doing panoptic segmentation here?

zhiqi-li commented 2 years ago

Because while we perform the panoptic segmentation task, we obtain the instance segmentation results by the way. So that I evaluate the performance of the instance segmentation for a more reference for model performance.

pratik9989 commented 8 months ago

Hello @zhiqi-li @aviadmx

I am getting the below error while starting running training command: FileNotFoundError: CocoDataset_panoptic: [Errno 2] No such file or directory: 'datasets/coco/annotations/instances_val2017.json'

I checked README.md file and I can't see anything about the instances_val2017.json file. Do you have any idea about it?

Thanks

lehe0000 commented 6 days ago

Where do the instance annotations differ from the panoptic ones? The only difference i noticed so far is the rle encoding in the panoptic jsons. Are there more differences between the two?