pytorch-image-models icon indicating copy to clipboard operation
pytorch-image-models copied to clipboard

[FEATURE] Support of FocalNet

Open rose-jinyang opened this issue 2 years ago • 3 comments

Hello How are you? Thanks for contributing to this project. Did u implement FocalNet in this repo? If NOT, could u support FocalNet in repo ASAP? Thanks

rose-jinyang avatar Nov 22 '22 06:11 rose-jinyang

If you need to use the model ASAP with this library, you could just do as the authors and add the model from https://github.com/microsoft/FocalNet/blob/main/classification/focalnet.py, hooked up with this library's @register_model. Then you can use the standard create_model to create the FocalNet models.

TorbenSDJohansen avatar Nov 23 '22 21:11 TorbenSDJohansen

@rose-jinyang what @TorbenSDJohansen suggested will work in a pinch, the model is already pretty much timm style and should work well, but it always takes a bit of time to sort out the pretrained configs, fix various torchscript/FX issues, and integrate with the builder so the head adapation, etc works... I do plan to do that, just have a pile of other things I need to get out first (a lot of adapted CLIP ViT models, more MaxVit, etc)

rwightman avatar Nov 23 '22 21:11 rwightman

Thank you.

rose-jinyang avatar Nov 24 '22 00:11 rose-jinyang

@rose-jinyang took a while, but added with some improvements, on main branch now and in a pypi pre-release soon (were pushed to hf-hub as well https://huggingface.co/timm)

rwightman avatar Mar 20 '23 04:03 rwightman