microsoft / FocalNet

[NeurIPS 2022] Official code for "Focal Modulation Networks"
MIT License
682 stars 61 forks source link

Pre-weight of FocalNet backbone for custom segmentation network #14

Closed rose-jinyang closed 1 year ago

rose-jinyang commented 1 year ago

Hello How are you? Thanks for contributing to this project. I am going to use FocalNet network as backbone (encoder) of my custom network for semantic segmentation. I am using my own custom decoder. Where can I get the pre-trained weight of FocalNet backbone for segmentation? Of course, you shared the pre-trained models for segmentation but they were used with ONLY MaskRCNN or UperNet method.

jwyang commented 1 year ago

Hi, @rose-jinyang , thanks for your interests.

Please find the image-1k pretrained backbone here:

https://github.com/microsoft/FocalNet#imagenet-1k-pretrained

and the large+ focalnets pretrained on imagenet-21k here:

https://github.com/microsoft/FocalNet#imagenet-22k-pretrained

just simply clip the ckpt hyperlink for downloading the checkpoints.

rose-jinyang commented 1 year ago

Thanks for your quick reply. I think that FocalNet for image classification and FocalNet for segmentation are a little different each other. Nevertheless, can we use the pre-weights of FocalNet for image classification in segmentation architecture?

jwyang commented 1 year ago

yes, you can use it for your segmentation architecture. please make sure all parameters are loaded correctly as the initialization.

rose-jinyang commented 1 year ago

Thank you.