lorenmt / reco

The implementation of "Bootstrapping Semantic Segmentation with Regional Contrast" [ICLR 2022].
https://shikun.io/projects/regional-contrast
Other
162 stars 25 forks source link

Request for the code of DeepLab V2. #5

Closed super233 closed 2 years ago

super233 commented 2 years ago

Hi, thanks for your sharing code, it's really an awesome work!

Can you release the code of DeepLabe V2 which contains the projector? There's only code of DeepLab V3.

Currently I'm studying the contrastive learning based on DeepLabe V2, if you can provide the corresponding code for my reference, it will really appreciate.

lorenmt commented 2 years ago

Hello,

I have updated the DeepLabv2 code. You may use flag --backbone deeplabv2 on the training script to switch to the DeepLabv2 backbone. Please note that deeplabv2 would run slower and achieve worse performance compared to DeepLabv3+ (the default option).

I haven't fully re-tested the results for DeepLabv2, so please let me know if you find any unusual behavior. :)

super233 commented 2 years ago

Ok, thanks very much! 👍

super233 commented 2 years ago

Hi, I have run your code with DeepLab V2 and DeepLab V3+ respectively on Cityscapes where only 20 images have labels.

However, the ReCo with DeepLab V3+ only has the best performance of 48.76%, which is slightly worse than 49.86%±0.28 reported in Table 1 of your paper. What's more, the ReCo with DeepLab V2 has a better performance of 50.51%.

Is this a normal phenomenon? I only run your code with the following commands and not do any modification to code:

python train_semisup.py --dataset cityscapes --num_labels 20 --apply_aug classmix --apply_reco --backbone deeplabv3p
python train_semisup.py --dataset cityscapes --num_labels 20 --apply_aug classmix --apply_reco --backbone deeplabv2
lorenmt commented 2 years ago

Hello, yes that's perfectly normal. With as few as 20 labelled images, the performance can be a bit unstable. +-2% would be in a reasonable range.

super233 commented 2 years ago

Ok, thanks. :-)

super233 commented 2 years ago

I'm sorry to disturb you again, there seems an extra indent in return out, is it a typo or for some purpose? https://github.com/lorenmt/reco/blob/3e856a316cd082f2e84bd3972d5f6c5fe24254bd/network/deeplabv2.py#L16-L20

lorenmt commented 2 years ago

good catch! it's a typo indeed.

super233 commented 2 years ago

Ok, thanks. :-)