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

GASSL ResNet50 Weights #1325

Merged
merged 2 commits into from
May 24, 2023

Conversation

isaaccorley
Copy link
Collaborator

This PR adds the ResNet50 RGB weights trained on fMoW (mostly Maxar WorldView imagery) using the Geography Aware Self-supervised Learning (GASSL) method. This is basically a modified MoCo-v2 with Geolocation as a pretext task (Geo) as well as temporal pairs contrastive learning (TP).

Weights taken from this repo and uploaded to huggingface.

Adding these weights is essential since it's being compared as a baseline in both the SatMAE and Scale-MAE papers.

@isaaccorley isaaccorley requested a review from nilsleh May 11, 2023 22:04
@isaaccorley isaaccorley self-assigned this May 11, 2023
@github-actions github-actions bot added the models Models and pretrained weights label May 11, 2023
@isaaccorley isaaccorley changed the title add gassl weights GASSL ResNet50 Weights May 11, 2023
@adamjstewart adamjstewart added this to the 0.5.0 milestone May 11, 2023
Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add to docs/api/resnet_pretrained_weights.csv. We should start thinking about how we want to handle multiple satellites. I'm thinking we'll want different tables for each satellite since the benchmark datasets will differ. We can punt that to the PR where we add all our new SSL4EO-L models.

torchgeo/models/resnet.py Outdated Show resolved Hide resolved
torchgeo/models/resnet.py Outdated Show resolved Hide resolved
@isaaccorley
Copy link
Collaborator Author

isaaccorley commented May 12, 2023

Should I add the transforms as well? They only train on the fmow RGB data which is uint8 and they just divide by 255 and use imagenet normalization. Nvm, needed to add transforms.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 12, 2023
@isaaccorley isaaccorley reopened this May 12, 2023
@isaaccorley isaaccorley force-pushed the models/resnet50-gassl-weights branch from acb8be3 to fe3948d Compare May 12, 2023 22:09
@isaaccorley
Copy link
Collaborator Author

No idea why coverage is failing

@calebrob6
Copy link
Member

This LGTM, @adamjstewart any problems with merging this?

@adamjstewart
Copy link
Collaborator

Give me some time to review. How urgent is this? Would prefer to focus on the paper until the deadline, but can review sooner if needed. I mostly want to verify the transforms and filename and such.

@calebrob6
Copy link
Member

I've checked the sha256sum and transforms so I think we're good
image

image

@adamjstewart
Copy link
Collaborator

Do we want to call it fMoW or Maxar? Might be more clear what the weights can be used for with the latter.

@calebrob6
Copy link
Member

The current name fits with the existing scheme {model}_{dataset}_{bands}_{paper/source}_{hash} -- regardless, users aren't interacting with the actual file.

@adamjstewart
Copy link
Collaborator

The existing scheme uses image source, not dataset.

@isaaccorley
Copy link
Collaborator Author

Fmow RGB is more than just Maxar though.

@adamjstewart
Copy link
Collaborator

Why did you choose Apache 2.0 for the license?

@adamjstewart
Copy link
Collaborator

Also, should we confirm the license of the pre-trained model before we modify and redistribute it? If it's unlicensed then technically we can't use it. If @calebrob6 doesn't care then I don't care, it's Microsoft that will take the blame.

@calebrob6
Copy link
Member

Where are you seeing "Apache 2.0"?

@adamjstewart
Copy link
Collaborator

@calebrob6
Copy link
Member

It seems the weights aren't licensed -- but just to be clear, we are not uploading the weights to this repo. It is always good to ask the authors though.

@calebrob6 calebrob6 merged commit bc33326 into microsoft:main May 24, 2023
18 checks passed
@calebrob6
Copy link
Member

It seems the weights are licensed here (https://zenodo.org/record/7379715/) as Creative Commons Attribution 4.0 International, which is quite open.

@isaaccorley
Copy link
Collaborator Author

I'll change the license on HF

@isaaccorley isaaccorley deleted the models/resnet50-gassl-weights branch May 24, 2023 16:19
@calebrob6
Copy link
Member

Already did

adamjstewart added a commit that referenced this pull request May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation models Models and pretrained weights
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants