uber-research / UPSNet

UPSNet: A Unified Panoptic Segmentation Network
Other
649 stars 119 forks source link

ZeroDivisionError: division by zero #11

Closed lxtGH closed 5 years ago

lxtGH commented 5 years ago

2019-04-10 16:16:39,900 | upsnet_end2end_test.py | line 303: unified pano result: Traceback (most recent call last): File "upsnet/upsnet_end2end_test.py", line 312, in upsnet_test() File "upsnet/upsnet_end2end_test.py", line 304, in upsnet_test test_dataset.evaluate_panoptic(test_dataset.get_unified_pan_result(all_ssegs, all_panos, all_pano_cls_inds, stuff_area_limit=config.test.panoptic_stuff_area_limit), os.path.join(final_output_path, 'results', 'pans_unified')) File "upsnet/../upsnet/dataset/base_dataset.py", line 328, in evaluate_panoptic results = pq_compute(gt_json, pred_json, gt_pans, pred_pans, categories) File "upsnet/../upsnet/dataset/base_dataset.py", line 296, in pq_compute results[name], per_class_results = pq_stat.pq_average(categories, isthing=isthing) File "upsnet/../upsnet/dataset/base_dataset.py", line 97, in pq_average return {'pq': pq / n, 'sq': sq / n, 'rq': rq / n, 'n': n}, per_class_results ZeroDivisionError: division by zero

Hi, when I evaluated the trained model, I found this error.

ZhongYingMatrix commented 5 years ago

Maybe caused by ‘/’ difference between py2 and py3? from future import division

YuwenXiong commented 5 years ago

I think you are run coco experiments, please pull the latest code and rerun init_coco.sh and retrain the model since the previous code has a bug in annotation generation, and the training/eval will be wrong (See https://github.com/uber-research/UPSNet/issues/3#issue-430148613). Sorry for any inconvenience.

lxtGH commented 5 years ago

Hi! Thanks for reply, @YuwenXiong no, I am training the model the Cityscapes dataset, the MAP is near the results of paper.

YuwenXiong commented 5 years ago

Please pull the latest code and rerun init_cityscape.sh or manually download http://www.yuwenxiong.com/dataset/cityscapes/annotations/panoptic.zip and unzip it under data/cityscapes. Sorry for the inconvenience.

lxtGH commented 5 years ago

Still the same problem

WenFuLee commented 5 years ago

@lxtGH I saw you close this issue. I have the same. Wondering how you solve this issue in the end. Thanks.

WenFuLee commented 5 years ago

I tried manually download http://www.yuwenxiong.com/dataset/cityscapes/annotations/panoptic.zip and unzip it under data/cityscapes (to be specific, should be data/cityscapes/annotations), but it still didn't work. BTW, I also evaluate on cityscapes now. If this issue was actually closed, please someone tells me how to fix this. Thanks.

YuwenXiong commented 5 years ago

@WenFuLee please don't unzip it under data/cityscapes/annotations, it should be under data/cityscapes

WenFuLee commented 5 years ago

Thank you @YuwenXiong . After unzipping the file under data/cityscapes, it works.

discretecoder commented 4 years ago

I created my dataset similar to coco dataset, I am getting the detections and I can save them as well but I get this error