Skip to content
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

Add more examples using torchgeo for segmentation #14

Open
Minoro opened this issue Sep 12, 2024 · 0 comments
Open

Add more examples using torchgeo for segmentation #14

Minoro opened this issue Sep 12, 2024 · 0 comments

Comments

@Minoro
Copy link

Minoro commented Sep 12, 2024

Hi, I'm very interested in this project.
Can you add a more profound example using Torchgeo to load the pre-trained weights and use it for segmentation?
I've tried to do some experiments using a custom dataset, but I'm not achieving good results.

Currently I'm doing something like this:

class SegmentationNet(nn.Module):
    def __init__(self):
        super(SegmentationNet, self).__init__()
        self.backbone = dofa_large_patch16_224(img_size=224, weights=DOFALarge16_Weights.DOFA_MAE)
        self.decoder = CustomDecoder(in_channels=1024, num_classes=1)

    def forward(self, x):
        # S2 wavelengths 
        wavelengths = [2.20, 1.61, 0.865]
        x = self.backbone.forward_features(x, wavelengths)        
        x = self.decoder(x)
        return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant