jiwoon-ahn / irn

Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations, CVPR 2019 (Oral)
MIT License
519 stars 100 forks source link

get AssertionError when eval_ins_seg.py #5

Closed whitesockcat closed 4 years ago

whitesockcat commented 5 years ago

Traceback (most recent call last): File "run_sample.py", line 119, in step.eval_ins_seg.run(args) File "/home/maskrcnn-benchmark/irn/step/eval_ins_seg.py", line 10, in run gt_masks = [dataset.get_example_by_keys(i, (1,))[0] for i in range(len(dataset))] File "/home/irn/step/eval_ins_seg.py", line 10, in gt_masks = [dataset.get_example_by_keys(i, (1,))[0] for i in range(len(dataset))] File "/home/anaconda3/envs/deeplab/lib/python3.6/site-packages/chainercv/chainer_experimental/datasets/sliceable/getter_dataset.py", line 89, in get_example_by_keys cache[getter_index] = self._gettersgetter_index File "/home/anaconda3/envs/deeplab/lib/python3.6/site-packages/chainercv/datasets/voc/voc_instance_segmentation_dataset.py", line 66, in _get_annotations label_img, inst_img) File "/home/anaconda3/envs/deeplab/lib/python3.6/site-packages/chainercv/datasets/voc/voc_utils.py", line 55,in image_wise_to_instance_wise assert lbl != -1 AssertionError

jiwoon-ahn commented 5 years ago

Hi @whitesockcat,

It seems like the error does not occur from my code. Please keep chainercv up-to-date, and visit https://github.com/chainer/chainercv for more solutions.

yangyu12 commented 4 years ago

Hi @whitesockcat , Have you solved it? I am faced with the same problem.

yangyu12 commented 4 years ago

Hi @whitesockcat @jiwoon-ahn , My problem is solved. The AssertionError is due to the inconsistency between the masks in SegmentationClass and masks in SegmentationObject. So I download the ground truth from the official website once more, and now it works. So my ground truth was wrong, but anyway, newly downloading one solves my problem.