uber-research / UPSNet

UPSNet: A Unified Panoptic Segmentation Network
Other
648 stars 120 forks source link

ValueError: operands could not be broadcast together with shapes (427,640) (426,640) #19

Closed Xiaolongbetter closed 5 years ago

Xiaolongbetter commented 5 years ago

Thank you for modifying the problem of ‘’panoptic_val2017_stff.json‘’. When I use the fixed json file, there is such an error: ZeroDivisionError: division by zero. I think there may be a problem in '/UPSNet-master/upsnet/dataset/base_dataset.py'' line 222. And I replaced ‘’files = [item['file_name'] for item in pan_gt_json['images']]‘’ with ‘’files = [item['file_name'].replace('jpg', 'png') for item in pan_gt_json['images']]‘’, it works. But another problem has arisen:

Traceback (most recent call last): File "/UPSNet-master/upsnet/upsnet_end2end_test.py", line 313, in upsnet_test() File "/UPSNet-master/upsnet/upsnet_end2end_test.py", line 185, in upsnet_test test_dataset.evaluate_panoptic(test_dataset.get_unified_pan_result(results['all_ssegs'], results['all_panos'], results['all_pano_cls_inds'], stuff_area_limit=config.test.panoptic_stuff_area_limit), os.path.join(final_output_path, 'results', 'pans_unified')) File "/UPSNet-master/upsnet/../upsnet/dataset/base_dataset.py", line 337, in evaluate_panoptic results = pq_compute(gt_json, pred_json, gt_pans, pred_pans, categories) File "/UPSNet-master/upsnet/../upsnet/dataset/base_dataset.py", line 301, in pq_compute pq_stat += p.get() File "/home/xxl/anaconda3/envs/xxl_36/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value ValueError: operands could not be broadcast together with shapes (427,640) (426,640)

Is it where I am doing something wrong? Could you please help me solve the problem?

YuwenXiong commented 5 years ago

Sorry for make so many annoying error, the annotations were generated long time ago and I didn't remember the details when I released the code. Please pull the latest code and regenerate panoptic_val2017_stff.json, now it should be fine.

Xiaolongbetter commented 5 years ago

Thank you very much for your patience and your great work. Now I have tested it on COCO and Cityscapes dataset, I feel that there may be no problem.