Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError when using detection2panoptic_coco_format #58

Open
Robotatron opened this issue Dec 26, 2022 · 0 comments
Open

KeyError when using detection2panoptic_coco_format #58

Robotatron opened this issue Dec 26, 2022 · 0 comments

Comments

@Robotatron
Copy link

Trying to convert instance segmentations in COCO format to a panoptic format, but getting a KeyError:

image

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant