Zian-Xu / Swin-MAE

Pytorch implementation of Swin MAE https://arxiv.org/abs/2212.13805
62 stars 12 forks source link

How to fine-tuning? #3

Open zethan1 opened 1 year ago

zethan1 commented 1 year ago

How can I fine-tuning for the downstream tasks, such as segmentation? Could you share your code about fine-tuning?

Zian-Xu commented 1 year ago

As with most fine-tuning, you need to just use the pre-trained model as initialization parameters on the downstream task. For this purpose, I recommend using a segmentation network that uses the same backbone, such as Swin-Unet, the same network I used for the downstream task in my paper. If you need more help, please feel free to contact me again.

DLoboT commented 10 months ago

How do you use the Swin-Unet?

Zian-Xu commented 10 months ago

Are you asking how to use Swin-Unet for transfer learning? The method is the same as the original Swin-Unet using the pre-trained model of Swin Transformer. The Swin-MAE trained model is used directly as the pre-trained weights for the encoder and bottleneck of Swin-Unet. And the swin Transformer blocks in the decoder use the same weights of the corresponding layers in the encoder. @DLoboT