youngwanLEE / centermask2

[CVPR 2020] CenterMask : Real-time Anchor-Free Instance Segmentation
Other
772 stars 159 forks source link

How can I train Centermask on Pascal VOC 2012? (no gt_mask) #71

Closed RizhaoCai closed 3 years ago

RizhaoCai commented 3 years ago

I would like to try centermask on PascalVOC. According to line 79-85 of 'datasets/READMD.md'\

Expected dataset structure for Pascal VOC:

VOC20{07,12}/
  Annotations/
  ImageSets/
  JPEGImages/

It seems that centermask supports VOC. However, when I set up the config file as

_BASE_: "Base-CenterMask-ResNet-VOC.yaml"
INPUT:
  MASK_FORMAT: "bitmask"
MODEL:
  WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl"
  RESNETS:
    DEPTH: 50
  ROI_HEADS:
    NUM_CLASSES: 20
SOLVER:
  STEPS: (210000, 250000)
  MAX_ITER: 270000
  IMS_PER_BATCH: 8
OUTPUT_DIR: "output/CenterMask-R-50-FPN-ms-3x_VOC2012"

DATASETS:
  TEST: ('voc_2012_trainval',)
  TRAIN: ('voc_2012_trainval',)

Then I run train_net.py

But I find that there is no gt_mask image

image

How can I debug to make the centermask on Pascal VOC?

By the way, for PascalVOC2012, there are also instance segmentation labels (bitmasks) image

RizhaoCai commented 3 years ago

The code supports VOC detection, not instance segmentation.

I solve my problem by transforming VOC annotations to COCO format and use register the custom dataset using detecron2