282857341 / nnFormer

MIT License
802 stars 85 forks source link

How to load pre-trained weights on natural images? #39

Closed whisney closed 2 years ago

whisney commented 3 years ago

The experiment in the paper shows that pre-trained weights on natural images can significantly improve the performance of the model. There seems to be nothing in the code about how to load pre-trained weights on natural images.

282857341 commented 2 years ago

Sorry for late reply https://github.com/282857341/nnFormer/blob/e69edc83c79a6a8ccbf634e0ffbdfc82077c277e/nnformer/training/network_training/nnFormerTrainerV2_ACDC.py#L167-L169 You can load the pretrained weights by modify these code

whisney commented 2 years ago

Thank you for your reply. Did you download the natural image pre-trained weights from the link: https://github.com/microsoft/Swin-Transformer. There are Swin-T, Swin-B, and Swin-L on different datasets and resolution, which one do you use?

------------------ 原始邮件 ------------------ 发件人: "282857341/nnFormer" @.>; 发送时间: 2021年12月7日(星期二) 上午10:50 @.>; @.**@.>; 主题: Re: [282857341/nnFormer] How to load pre-trained weights on natural images? (Issue #39)

Sorry for late reply https://github.com/282857341/nnFormer/blob/e69edc83c79a6a8ccbf634e0ffbdfc82077c277e/nnformer/training/network_training/nnFormerTrainerV2_ACDC.py#L167-L169 You can load the pretrained weights by modify these code

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

282857341 commented 2 years ago

synapse is swin L, and ACDC uses swin s in the https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation