chen742 / PiPa

Official Implementation of PiPa: Pixel- and Patch-wise Self-supervised Learning for Domain Adaptative Semantic Segmentation
https://arxiv.org/abs/2211.07609
88 stars 15 forks source link

About reproducing the performance about pixel-wise contrast #9

Closed Caillen-W closed 1 year ago

Caillen-W commented 1 year ago

Hi, I do the experiment about the pixel-wise contrast on GTA to Cityscapes, but I can only get 69.8 mIoU finally. I only delete the code about the patch-wise contrast and don't modify the other code. What is wrong in my experiment? Looking forward to your reply, thanks. image image

wengkai0 commented 1 year ago

I also tried Patch loss alone and get a similar result, but when I only apply Pixel contrast loss, I get 70.2, 69.9, 70.5 at three runs. Is that normal fluctuation? @chen742

Caillen-W commented 1 year ago

I also tried Patch loss alone and get a similar result, but when I only apply Pixel contrast loss, I get 70.2, 69.9, 70.5 at three runs. Is that normal fluctuation? @chen742

Do you apply the pixel contrast loss as same as me? It seems that the performance is somewhat random.

chen742 commented 1 year ago

Hi, I do the experiment about the pixel-wise contrast on GTA to Cityscapes, but I can only get 69.8 mIoU finally. I only delete the code about the patch-wise contrast and don't modify the other code. What is wrong in my experiment? Looking forward to your reply, thanks. image image

Hi Caillen,

Thanks for your interest in our work! Could you pls provide the environment you used to run our code? I will have a check

Kind Regards Mu

Caillen-W commented 1 year ago

Hi, I do the experiment about the pixel-wise contrast on GTA to Cityscapes, but I can only get 69.8 mIoU finally. I only delete the code about the patch-wise contrast and don't modify the other code. What is wrong in my experiment? Looking forward to your reply, thanks. image image

Hi Caillen,

Thanks for your interest in our work! Could you pls provide the environment you used to run our code? I will have a check

Kind Regards Mu

Thanks for your reply, I run the code in a single RTX3090, Ubuntu 18.04, mmcv-full 1.3.7, python 3.6.9. And when I remove all the contrastive loss, I can get 70.57 mIoU finally. I am confused about this.

chen742 commented 1 year ago

Hi, I do the experiment about the pixel-wise contrast on GTA to Cityscapes, but I can only get 69.8 mIoU finally. I only delete the code about the patch-wise contrast and don't modify the other code. What is wrong in my experiment? Looking forward to your reply, thanks. image image

Hi Caillen, Thanks for your interest in our work! Could you pls provide the environment you used to run our code? I will have a check Kind Regards Mu

Thanks for your reply, I run the code in a single RTX3090, Ubuntu 18.04, mmcv-full 1.3.7, python 3.6.9. And when I remove all the contrastive loss, I can get 70.57 mIoU finally. I am confused about this.

Hi Caillen,

It is good according to the information you provided, but can you please provide the entire log so that I can check some other details?

Kind Regards Mu

Caillen-W commented 1 year ago

Hi, I do the experiment about the pixel-wise contrast on GTA to Cityscapes, but I can only get 69.8 mIoU finally. I only delete the code about the patch-wise contrast and don't modify the other code. What is wrong in my experiment? Looking forward to your reply, thanks. image image

Hi Caillen, Thanks for your interest in our work! Could you pls provide the environment you used to run our code? I will have a check Kind Regards Mu

Thanks for your reply, I run the code in a single RTX3090, Ubuntu 18.04, mmcv-full 1.3.7, python 3.6.9. And when I remove all the contrastive loss, I can get 70.57 mIoU finally. I am confused about this.

Hi Caillen,

It is good according to the information you provided, but can you please provide the entire log so that I can check some other details?

Kind Regards Mu

Hi Mu, Thanks a lot for your reply, here are my log files. The files start with 20230227 are logs about pixel wise contrastive loss and the files start with 20230313 are logs about removing all the contrastive loss.

Kind Regards caillen log.zip

chen742 commented 1 year ago

Hi caillen,

Thanks for providing the training log. The installed pytorch uses Cuda11.0, to compile mmcv-full with the correct Cuda version (pip install mmcv-full==1.3.7), I recommend adopting Cuda11.0 on your system ( it seems that your MMCV CUDA Compiler version is 11.6).

Kindly Regards Mu

YYDSDD commented 1 year ago

I also tried Patch loss alone and get a similar result, but when I only apply Pixel contrast loss, I get 70.2, 69.9, 70.5 at three runs. Is that normal fluctuation? @chen742

Hi, how do you apply the pixel contrast loss, can you help me, because I got a poor performance. Thanks a lot!

YYDSDD commented 1 year ago

Hi, I do the experiment about the pixel-wise contrast on GTA to Cityscapes, but I can only get 69.8 mIoU finally. I only delete the code about the patch-wise contrast and don't modify the other code. What is wrong in my experiment? Looking forward to your reply, thanks. image image

Hi Caillen, Thanks for your interest in our work! Could you pls provide the environment you used to run our code? I will have a check Kind Regards Mu

Thanks for your reply, I run the code in a single RTX3090, Ubuntu 18.04, mmcv-full 1.3.7, python 3.6.9. And when I remove all the contrastive loss, I can get 70.57 mIoU finally. I am confused about this.

Hi Caillen, It is good according to the information you provided, but can you please provide the entire log so that I can check some other details? Kind Regards Mu

Hi Mu, Thanks a lot for your reply, here are my log files. The files start with 20230227 are logs about pixel wise contrastive loss and the files start with 20230313 are logs about removing all the contrastive loss.

Kind Regards caillen log.zip

Hi, I checked your log file,there is the following code in file 20230313, but not in 20230227. This is probably why your performance hits 70.5. auxiliary_head=dict( type='ProjHead', in_channels=[64, 128, 320, 512], in_index=[0, 1, 2, 3], input_transform='resize_concat', channels=256, num_convs=2, dropout_ratio=0.1, num_classes=19, norm_cfg=dict(type='BN', requires_grad=True), align_corners=False, loss_decode=dict( type='ContrastiveLoss', use_dist=False, use_bank=False, use_reg=False, use_avg_pool=True, scale_min_ratio=0.75, num_classes=19, contrast_temp=100.0, loss_weight=1.0, reg_relative_weight=0.01)),

kaigelee commented 1 year ago

Hi, I do the experiment about the pixel-wise contrast on GTA to Cityscapes, but I can only get 69.8 mIoU finally. I only delete the code about the patch-wise contrast and don't modify the other code. What is wrong in my experiment? Looking forward to your reply, thanks. image image

Hi Caillen, Thanks for your interest in our work! Could you pls provide the environment you used to run our code? I will have a check Kind Regards Mu

Thanks for your reply, I run the code in a single RTX3090, Ubuntu 18.04, mmcv-full 1.3.7, python 3.6.9. And when I remove all the contrastive loss, I can get 70.57 mIoU finally. I am confused about this.

Hi Caillen, It is good according to the information you provided, but can you please provide the entire log so that I can check some other details? Kind Regards Mu

Hi Mu, Thanks a lot for your reply, here are my log files. The files start with 20230227 are logs about pixel wise contrastive loss and the files start with 20230313 are logs about removing all the contrastive loss. Kind Regards caillen log.zip

Hi, I checked your log file,there is the following code in file 20230313, but not in 20230227. This is probably why your performance hits 70.5. auxiliary_head=dict( type='ProjHead', in_channels=[64, 128, 320, 512], in_index=[0, 1, 2, 3], input_transform='resize_concat', channels=256, num_convs=2, dropout_ratio=0.1, num_classes=19, norm_cfg=dict(type='BN', requires_grad=True), align_corners=False, loss_decode=dict( type='ContrastiveLoss', use_dist=False, use_bank=False, use_reg=False, use_avg_pool=True, scale_min_ratio=0.75, num_classes=19, contrast_temp=100.0, loss_weight=1.0, reg_relative_weight=0.01)),

Hi, I have some questions, can you hlep me?

  1. How to train the self.classifier in dacs.py?
  2. And How to train self.cls_head in encoder_decoder.py? I did not find related loss such as cross entropy.