YutingXiao / Amodal-Segmentation-Based-on-Visible-Region-Segmentation-and-Shape-Prior

Implementation of the AAAI-2021 paper "Amodal Segmentation Based on Visible Region Segmentation and Shape Prior"
52 stars 7 forks source link

Details of the Data Setting (COCOA) #8

Closed chenbys closed 3 years ago

chenbys commented 3 years ago

Thanks for the excellent paper and code. Could you please clarify more details of the data setting? Otherwise, there may exist some mismatches (for me).

For example, my data for COCOA training set seems to contain only 2276 images (2476 claimed in the paper). I have modified ./detectron2/data/datasets/builtin.py as:

_PREDEFINED_SPLITS_COCO_AMODAL_CLS = {
    "cocoa_cls_train": ("coco/train2014",
                        "coco/amodal_cls_annotations/COCO_amodal_train2014_with_classes.json"),
    "cocoa_cls_train_visible": ("coco/train2014",
                                "coco/amodal_cls_annotations/COCO_amodal_train2014_with_classes.json"),
    "cocoa_cls_val": ("coco/val2014",
                      "coco/amodal_cls_annotations/COCO_amodal_val2014_with_classes.json"),
    "cocoa_cls_val_visible": ("coco/val2014",
                              "coco/amodal_cls_annotations/COCO_amodal_val2014_with_classes.json"),
}

, because the dataset in the config is registered as:

DATASETS:
  TRAIN: ("cocoa_cls_train",)
  TEST: ("cocoa_cls_val",)

. And my images are wget from

http://images.cocodataset.org/zips/train2014.zip
http://images.cocodataset.org/zips/val2014.zip

Is there any mistake in my setting? Thanks for any suggestions.

Claimed in the paper:

The COCOA cls dataset consists of 2476 images in the training set and 1223 images in the validation
set.

Printed by the code:

Loaded 2276 images in COCO format from ./coco/amodal_cls_annotations/COCO_amodal_train2014_with_classes.json
Removed 0 images with no usable annotations. 2276 images left.
|   category    | #instances   |   category   | #instances   |   category    | #instances   |
|:-------------:|:-------------|:------------:|:-------------|:-------------:|:-------------|
|    person     | 2311         |   bicycle    | 21           |      car      | 279          |
|  motorcycle   | 47           |   airplane   | 65           |      bus      | 92           |
|     train     | 60           |    truck     | 115          |     boat      | 79           |
| traffic light | 13           | fire hydrant | 35           |   stop sign   | 12           |
| parking meter | 10           |    bench     | 48           |     bird      | 57           |
|      cat      | 94           |     dog      | 100          |     horse     | 57           |
|     sheep     | 102          |     cow      | 91           |   elephant    | 80           |
|     bear      | 28           |    zebra     | 84           |    giraffe    | 90           |
|   backpack    | 14           |   umbrella   | 74           |    handbag    | 26           |
|      tie      | 9            |   suitcase   | 77           |    frisbee    | 29           |
|     skis      | 13           |  snowboard   | 21           |  sports ball  | 36           |
|     kite      | 49           | baseball bat | 33           | baseball gl.. | 5            |
|  skateboard   | 41           |  surfboard   | 37           | tennis racket | 49           |
|    bottle     | 222          |  wine glass  | 70           |      cup      | 215          |
|     fork      | 25           |    knife     | 69           |     spoon     | 33           |
|     bowl      | 161          |    banana    | 26           |     apple     | 34           |
|   sandwich    | 33           |    orange    | 31           |   broccoli    | 9            |
|    carrot     | 19           |   hot dog    | 27           |     pizza     | 60           |
|     donut     | 70           |     cake     | 76           |     chair     | 195          |
|     couch     | 55           | potted plant | 12           |      bed      | 26           |
| dining table  | 34           |    toilet    | 80           |      tv       | 91           |
|    laptop     | 74           |    mouse     | 25           |    remote     | 28           |
|   keyboard    | 36           |  cell phone  | 38           |   microwave   | 33           |
|     oven      | 23           |   toaster    | 5            |     sink      | 53           |
| refrigerator  | 63           |     book     | 59           |     clock     | 39           |
|     vase      | 45           |   scissors   | 8            |  teddy bear   | 68           |
|  hair drier   | 0            |  toothbrush  | 10           |               |              |
|     total     | 6763 
chenbys commented 3 years ago

In addition, zero instance for hair drier, though 80 categories claimed in their dataset. Thanks for any suggestions.

YutingXiao commented 3 years ago

Hi, thanks for your interest in our work.

  1. 2276 is the correct number of training images, I am sorry for this mistake. We trained our model and other baselines on 2276 images.
  2. There are only 79 categories in COCOA cls dataset, though this dataset claims that there are 80 categories.
chenbys commented 3 years ago

Thanks for the verification.