Skip to content

Error when training for instance segmentation with a custom dataset  #17

Closed
@Robotatron

Description

@Robotatron

Using my custom dataset in COCO format for instance segmentation training.
Changed CFG to

cfg.MODEL.TEST.TASK = "instance"
cfg.INPUT.TASK_PROB.SEMANTIC = 0
cfg.INPUT.TASK_PROB.INSTANCE = 1

Still getting an error UnboundLocalError: local variable 'pan_seg_gt' referenced before assignment

From #5 and reading docs I understand I have to somehow prepare my dataset for instance segmentation training.

  1. Is it correct to say OneFormer expects COCO dataset in a panoptic format?
  2. If 1) is true, how do I convert my custom instance segm. COCO dataset to a panoptic format?
  3. I found a script from panopticapi to convert from instance to panoptic format, but judging from the description it will merge every instance annotation in an image to a single annotation, which would defy the purpose of training an instance segmentation model.
    Also getting a KeyError when using that script KeyError when using detection2panoptic_coco_format cocodataset/panopticapi#58
  4. How do I prepare a detection COCO dataset to train for instance segmentation with OneFormer? Thanks.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions