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

About load EVA_02 weights #16

Closed cocowy1 closed 5 months ago

cocowy1 commented 5 months ago

Congratulations! This paper inspired me a lot, but I still have some questions. For instance, the selection of the EVA_02 model appears to have multiple versions, which doesn’t seem to be addressed in the paper. Additionally, could you release the corresponding Python file about loading and selecting the eva_02 model weights? I was unable to locate this information in the paper. Thank you! By the way, your paper is well-written, and the figures are elegant.

w1oves commented 5 months ago

Thanks for your attention! We use EVA02-Large in the paper, and the weight for it should be eva02_L_pt_m38m_p14to16. The simple code for convert it is at tools/convert_models/convert_eva2_512x512.py. The detailed code for load, training and test of EVA02 will be uploaded, however, i'm sorry this may take a lot of time.

cocowy1 commented 5 months ago

Thank you for being so helpful! However, I have a query regarding the semantic segmentation code in EVA2. Is it exclusively compatible with a resolution of 224x224, or does it extend support to arbitrary resolutions (such as 256x784 resolution)?

w1oves commented 5 months ago

Based on my experiments, the models is capable of supporting the majority of resolutions, including but not limited to 512x512 and 1024x1024. So, it's reasonable to deduce that a resolution of 256x768 would also be compatible. However, you will need to resize the position embeddings and create corresponding converted weights for the training process.

To facilitate this, you might find the code located within the 'tools/convert_models' directory particularly useful, as it provides functionalities to help you implement these adjustments.

cocowy1 commented 5 months ago

Thank you! I tried this and succeeded!