vinvino02 / GLPDepth

GLPDepth PyTorch Implementation: Global-Local Path Networks for Monocular Depth Estimation with Vertical CutDepth
191 stars 44 forks source link

Adding GLPN to HuggingFace Transformers #12

Closed NielsRogge closed 2 years ago

NielsRogge commented 2 years ago

Hi,

Thanks for the impressive work! As the model uses SegFormer's Mix-b4 as encoder, and I already ported SegFormer to HuggingFace Transformers as seen here, it was relatively easy to port this model as well.

Here's a notebook for quick inference on an image: https://colab.research.google.com/drive/1v6fzr4XusKdXAaeGZ1gKe1kh9Ce_WQhl?usp=sharing

Both models are hosted on the hub: https://huggingface.co/models?other=glpn. If you're not familiar with HuggingFace's hub, basically each model has its own Github repo (it's based on git-LFS), so you can git add, git commit and git push to each repo separately. Each model has its own git history, like this one.

Are you interested in creating a KAIST organization on the hub, similar to other oganizations like facebook, microsoft, google? Such that we can host the models under that name? That way, you'll be able to do:

from transformers import GLPNForDepthEstimation

model = GLPNForDepthEstimation.from_pretrained("kaist/glpn-nyu")

Or, if you prefer, we can host the weights under your name as well.

Let me know if you're interested!

Kind regards,

Niels

vinvino02 commented 2 years ago

Hello, Thanks for uploading my checkpoint file I think if there is no KAIST organization already, then it will be better to just host the name under my id.

Thanks :)

vinvino02 commented 2 years ago

I have just checked your colab notebook. It's awesome! I attached your link in my README file. Hope you don't mind. Thanks!

NielsRogge commented 2 years ago

Hi,

Great :) do you already have a username on huggingface.co? Then I can transfer the weights to your username.

Kind regards,

Niels

vinvino02 commented 2 years ago

Hello, my username in hugginface is vinvino02. Thanks!

NielsRogge commented 2 years ago

Thanks! I've transferred the checkpoints to your name: https://huggingface.co/models?other=glpn.

Feel free to write some model cards :) the model cards are just READMEs (as each model on the hub has its own Github repo). An example can be found here.

GLPN has been added to HuggingFace Transformers: https://huggingface.co/docs/transformers/master/en/model_doc/glpn

Closing this issue. Thanks for the help!