fcdl94 / WILSON

Official implementation of "Incremental Learning in Semantic Segmentation from Image Labels"
https://arxiv.org/abs/2112.01882
MIT License
59 stars 9 forks source link

COCO-to-VOC details #3

Closed roysubhankar closed 2 years ago

roysubhankar commented 2 years ago

Hi Fabio,

I would like to ask some questions regarding the COCO-to-VOC experiment:

  1. While running the code for COCO-to-VOC setting, it runs into a runtime error due to this line. The arg new_protocol is not defined in the argparser.py file https://github.com/fcdl94/WILSON/blob/41c7d5b21b627722311d559ad5f6d835917f95d1/argparser.py#L20
  2. Which pre-trained model are you using for this setting? Is it the WideResNet38 InPlace-ABN, as in the InPlace repo? Screenshot 2022-07-25 at 12 36 45
  3. After training the step 1 (the weakly-supervised step), do you simply evaluate on the COCO 61-80 classes? Or do you also include those classes (61-80) in the weakly-supervised training along with VOC classes?
  4. I notice that in your code you are ignoring some classes in COCO. Why are they excluded?https://github.com/fcdl94/WILSON/blob/41c7d5b21b627722311d559ad5f6d835917f95d1/dataset/coco.py#L7
  5. Running python data/coco/make_annotation.py creates a folder called annotations_my/, whereas in the line below the old annotations/ folder is used. Which annotation folder must be used for the COCO-to-VOC experiment?https://github.com/fcdl94/WILSON/blob/41c7d5b21b627722311d559ad5f6d835917f95d1/dataset/coco.py#L32

Thank you.

fcdl94 commented 2 years ago

Hi @roysubhankar, 1) I forgot to remove the parameter. You can easily remove opts.new_protocol from the if. 2) Yes, it is the pretrained from InPlace-ABN 3) I don't think I got the question, I try to answer then correct me. The COCO 61-80 classes are the same VOC classes. I don't use the COCO images during training in step 1 but only the VOC ones. During the evaluation, I evaluate both on full-COCO (Considering all the classes and averaging the IoU for 1-60 and 61-80) and on full-VOC. 4) These classes are excluded in the COCO dataset since under-represented. Actually, COCO has 91 object classes, but 11 are ignored by default. You can check at this link the removed classes. 5) You're right. To avoid deleting old annotations, I named the folder annotations_my in the script, but I renamed them after to be simply annotations. You should use the generated labels (they start from 1 instead of 0 to add the background class and to remove stuffs).

roysubhankar commented 2 years ago

Hi @fcdl94

Thanks for your responses, all my questions have been answered.

Just regarding question 1 above, if I remove the opts.new_protocol from the if statement then both the if statements will evaluate to true and the crop_size = 321 will be set from the second if statement. Are you using crop_size = 321 or crop_size=448 in your coco-to-voc experiment?

Screenshot 2022-08-03 at 11 27 13

Moreover, when I ran WILSON on coco-to-voc the numbers are off by some margin in both the datasets. Here is what I obtain compared to what is reported in the paper.

Screenshot 2022-08-03 at 11 31 38

I will describe the dataset preparation steps to be sure if I am doing the same, as you have done:

  1. Download and extract COCO and VOC datasets as per your download scripts.
  2. Run python data/coco/make_annotation.py. This generates a annotations_my/ folder. The segmentation masks from this folder is used in the experiments and the original annotations/ folder is ignored.
  3. Run python data/make_cocovoc.py to re-map the VOC labels to the COCO label space of 61-80 classes. This generates a folder called SegmentationClassAugAsCoco/.

Please let me know if you are doing anything differently than me. Thank you again.

fcdl94 commented 2 years ago

Hey! I used crop size 448.

Regarding the results, I updated the results on arxiv after fixing a small bug I had in the CVPR submission. The new results are COCO: 39.8 41.0 40.6 VOC (All) 55.7, which is very close to what you get.

What parameter of alpha (label smoothing) did you use? I'll report the results I obtained in coco-to-voc changing the value of alpha.

Alpha 1-60 61-80 All (COCO) All (VOC)
0.3 40.3% 38.1% 40.3% 51.0%
0.5 40.2% 38.9% 40.4% 52.1%
0.7 40.0% 39.9% 40.5% 53.8%
1.0 37.6% 29.1% 35.9% 40.7%
0.9 (reported) 39.8% 41.0% 40.6% 55.7%
roysubhankar commented 2 years ago

Hi,

I am also using alpha=0.9.

Thanks for all the clarifications.