Pretrained Models #3451
Replies: 11 comments 20 replies
-
duplicate of #271. Thanks for the suggestions, I'm converting this into a discussion. Some of the models in this project already support loading from the pretrained, please see: |
Beta Was this translation helpful? Give feedback.
-
Hi Monai team (cc @wyli)! Continuing this Discussion, I wanted to formally propose the integration with the Hugging Face Hub. At Hugging Face we are aware of the relevance of Monai in deep learning for healthcare and would love to contribute with you to this effort. This integration would allow you to freely download/upload models from/to the Hugging Face Hub: https://huggingface.co/. I see you currently save your model checkpoints through the NGC Catalogue and the MMAR. Would you be interested in sharing your pre-trained models such as We can help you set up a Monai organization (examples, Facebook AI y Stanford NLP). The Hub offers free hosting of over 25K models, and it would make your work more accessible and visible to the rest of the ML community. Some of the benefits of sharing your models through the Hub would be:
Creating the repos and adding new models should be a relatively straightforward process if you've used Git before. This is a step-by-step guide explaining the process in case you're interested. Please let us know if you would be interested and if you have any questions. Happy to hear your thoughts, |
Beta Was this translation helpful? Give feedback.
-
As an additional point, we have a library to programmatically access repositories (both downloading pretrained models and pushing models as well, with a lot of nice things such as filtering, caching, etc). If we want to try out this integration, I would suggest taking a first step:
|
Beta Was this translation helpful? Give feedback.
-
thanks for the great proposals, I'll bring them up at the dev meeting and get back to you. |
Beta Was this translation helpful? Give feedback.
-
Thank you, I've created an org https://huggingface.co/MONAI, we'll probably upload model examples as part of #3482 (ongoing discussions about monai model format) and look into the python APIs for model downloading. We'll get back to you with further questions if there's any @osanseviero @omarespejel! |
Beta Was this translation helpful? Give feedback.
-
Hi @wyli! Hope you are well. We are very excited about collaborating with you to share MONAI models with the 🤗 HF community. With the possibility of also allowing MONAI users to quickly share and load models from the HF Hub (adding I can help you with what you need. If you wish I can create a Slack channel (#MONAI-hf) where we can support and help you with what you need. Would this be a bad idea? (cc @Nic-Ma) Kind regards! |
Beta Was this translation helpful? Give feedback.
-
Hi @omarespejel , I am trying to create an account on huggingface, but blocked by below page, the "create account" button doesn't work: Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi @omarespejel , I uploaded an example bundle model to: https://huggingface.co/MONAI/example_spleen_segmentation.
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Mark: a related task tracking ticket related to this topic: #4042 Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi @omarespejel , here I wish to ask a question about the download part of hugging face.
However, I'm not sure if hugging face support to download a whole folder directly? The only way I found is to use: |
Beta Was this translation helpful? Give feedback.
-
Regarding a previous question from @Nic-Ma, we have new collaboration features in the Hub: pull requests and discussions (link to announcement). This would allow MONAI users to submit, edit, or discuss models within the MONAI organization. This is in addition to what @ericspod mentioned: other users can tag monai on their own models so you can recognize models that you don't want to host in your own organization, but still engage with your community. Also, if you want, we can do a PR to allow image segmentation inference directly from the browser like for example with DETR. Please let me know if we can help further. |
Beta Was this translation helpful? Give feedback.
-
I wonder if it aligns with the project goals to support the integration of pretrained models.
A possible solution could be to host the pretrained models on the Huggingface Model Hub. It would then be possible to build a wrapper that loads a model from the hub & directly use it for inference to lower the entry barrier for noobs like me 🙂
Beta Was this translation helpful? Give feedback.
All reactions