Open Robotatron opened 1 year ago
Trying to convert instance segmentations in COCO format to a panoptic format, but getting a KeyError:
Creating folder ../Playment/01-playment-1000-images/panoptic for panoptic segmentation PNGs CONVERTING... COCO detection format: JSON file: ../Playment/01-playment-1000-images/02-playment_1_class_poly.json TO COCO panoptic format Segmentation folder: ../Playment/01-playment-1000-images/panoptic JSON file: ../Playment/01-playment-1000-images/panoptic.json loading annotations into memory... Done (t=0.00s) creating index... index created! Number of cores: 8, images per core: 13 Core: 0, 0 from 13 images processed Core: 1, 0 from 13 images processed Caught exception in worker thread: Core: 2, 0 from 13 images processed Caught exception in worker thread: Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 10643857408083048448 Core: 3, 0 from 13 images processed Caught exception in worker thread: Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 3484711879296423936 Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 10094264106565765120 Core: 4, 0 from 12 images processed Caught exception in worker thread: Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] Core: 5, 0 from 12 images processed File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 382583937906978560 Caught exception in worker thread: Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 16482284176345886720 Core: 6, 0 from 12 images processed Core: 7, 0 from 12 images processed Caught exception in worker thread: Caught exception in worker thread: Traceback (most recent call last): Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 11941352026092914688 KeyError: 4354006610727533568 Caught exception in worker thread: Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 12128046965261295616 multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/opt/conda/envs/oneformer2/lib/python3.8/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 20, in wrapper raise e File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/panopticapi/utils.py", line 16, in wrapper return f(*args, **kwargs) File "converters/detection2panoptic_coco_format.py", line 42, in convert_detection_to_panoptic_coco_format_single_core img = coco_detection.loadImgs(int(img_id))[0] File "/opt/conda/envs/oneformer2/lib/python3.8/site-packages/pycocotools/coco.py", line 229, in loadImgs return [self.imgs[ids]] KeyError: 12128046965261295616 """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "converters/detection2panoptic_coco_format.py", line 148, in <module> convert_detection_to_panoptic_coco_format(args.input_json_file, File "converters/detection2panoptic_coco_format.py", line 118, in convert_detection_to_panoptic_coco_format annotations_coco_panoptic.extend(p.get()) File "/opt/conda/envs/oneformer2/lib/python3.8/multiprocessing/pool.py", line 771, in get raise self._value KeyError: 12128046965261295616
Trying to convert instance segmentations in COCO format to a panoptic format, but getting a KeyError: