8000 add UperNet model · Issue #906 · qubvel-org/segmentation_models.pytorch · GitHub
[go: up one dir, main page]

Skip to content

add UperNet model #906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jawi289o opened this issue Aug 13, 2024 · 7 comments
Closed

add UperNet model #906

jawi289o opened this issue Aug 13, 2024 · 7 comments

Comments

@jawi289o
Copy link

kindly add UperNet model

@GrantorShadow
Copy link

commenting to be a part of the discussion

@qubvel
Copy link
Collaborator
qubvel commented Aug 14, 2024

Hi! Thanks for the interest! Would anyone like to add this model? I will appreciate any contribution, just let me know if you are interested and need any guidance 🙂

@GrantorShadow
Copy link
GrantorShadow commented Aug 22, 2024

I would love to take this on, any guidance is much appreciated
@qubvel

@qubvel
Copy link
Collaborator
qubvel commented Aug 23, 2024

Thanks for your interest @GrantorShadow!

You can fork the repo, clone it, and copy-paste the Unet model folder in decoders/ and modify it to Upernet. I suppose this will be the easiest way to adopt a new model. You have to rewrite decoder.py file, while model.py most probably will be similar or with minor changes.
Then you can open a PR for initial review and feedback.

In terms of testing would be nice to fine-tune it with an example notebook in the repo to check if the model is trainable and add some basic tests under /tests folder.

If you will face any particular difficulties we can discuss it here or under the PR!
Looking forward to collaborating with you, thanks!

@jawi289o
Copy link
Author

@GrantorShadow Hi are you working on it?

@GrantorShadow
Copy link

Yes sorry I got a little delayed but will be getting it done in the next 2 weeks

@yurithefury
Copy link

Given Hugging Face integration, I believe you can simply use UperNetForSemanticSegmentation from transformers:

from transformers import UperNetForSemanticSegmentation
self.model = UperNetForSemanticSegmentation.from_pretrained(
    pretrained_model_name_or_path='openmmlab/upernet-convnext-small'
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0