w1oves / Rein

[CVPR 2024] Official implement of <Stronger, Fewer, & Superior: Harnessing Vision Foundation Models for Domain Generalized Semantic Segmentation>
https://zxwei.site/rein
GNU General Public License v3.0
215 stars 19 forks source link

On the full training performance of Table 2 #45

Closed IzumiKDl closed 2 weeks ago

IzumiKDl commented 2 months ago

We are very grateful for your outstanding contributions to domain generalization. However, we are experiencing some problems with the execution of the code in question.

When we run the 'configs/dinov2/dinov2_mask2former_512x512_bs1x4.py' configuration file, we end up with citys_mIoU: 32.8100, bdd_mIoU: 26.7600, map_mIoU: 36.3800, mean_mIoU : 31.9833, showing confusing performance, with a large gap from 61.7 in Table 2. We executed multiple experiments, with the mean_mIoU results holding basically around 30, with the command "python tools/train.py configs/dinov2/dinov2_mask2former_512x512_bs1x4.py ".

I hope to have a response from you. Thanks again for your work!

w1oves commented 2 months ago

I guess it's because of error pre-trained weights load. Please provide your logs for more detailed analysis.

IzumiKDl commented 2 months ago

Thanks for your reply, here is my training log, the pre-training weights are consistent with the choice of 'configs/dinov2/rein_dinov2_mask2former_512x512_bs1x4.py'. Looking forward to your reply again! 20240618_152021.log

w1oves commented 2 months ago

I have updated configs/dinov2/dinov2_mask2former_512x512_bs1x4.py to include the configuration backbone=dict(lr_mult=0.1). I hope this resolves your issue.

IzumiKDl commented 2 months ago

Thank you very much for your reply, we have successfully reproduced the results. In addition, we have a code question for you regarding MMSegmentation. We see that you have built a "ReinsDinoVisionTransformer" and we are curious how this class is recognized by MMSegmentation. We also tried to build a new class, but it is only recognized by the MMSegmentation framework if the relevant class name is written in “mmseg.models.backbones.init.py”. We are not sure what the issue is and look forward to your reply. Thank you very much!

w1oves commented 2 months ago

This is straightforward. I've imported the rein package in train.py. Inside the __init__.py of the rein package, we make sure that every class we register is imported. If you need to register a new class, you can register it at the appropriate location within the rein package and then import that class in init.py of the rein package.

IzumiKDl commented 2 months ago

Thank you very much, problem solved!