SwinTransformer / Swin-Transformer-Semantic-Segmentation

This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" on Semantic Segmentation.
https://arxiv.org/abs/2103.14030
Apache License 2.0
1.17k stars 222 forks source link

如何把经过预训练的resnet50换成预训练好的swin #58

Open longmalongma opened 2 years ago

longmalongma commented 2 years ago

您好,非常感谢你的工作,我是做视频分割的,我现在的backbone是resnet50,我想把经过预训练的resnet50换成预训练好的swin,可以这样做吗?具体要怎么做?

impiga commented 2 years ago

Hi, most of the experiment settings are set in the config file. So, you can modify the backbone part of the config, replacing the ResNet-50 backbone with a Swin backbone.

You may compare these two configs to see how to modify the backbone config: upernet_r50: https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/blob/main/configs/_base_/models/upernet_r50.py upernet_swin: https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/blob/main/configs/_base_/models/upernet_swin.py

jinghanxu1999 commented 2 years ago

网络结构都不一样要怎么转😂

lzl2040 commented 1 year ago

您好,非常感谢你的工作,我是做视频分割的,我现在的backbone是resnet50,我想把经过预训练的resnet50换成预训练好的swin,可以这样做吗?具体要怎么做?

请问您解决了吗?