Replies: 2 comments 11 replies
-
AttributesThe first thing we should think about is what attributes we consider to be important. This dictates what goes into the naming scheme.
Anything else we could potentially consider important? 1 and 2 are obviously required, you can't load weights if they are from a different model, and you can't transfer learn from one sensor to the next (although maybe you could with RGB-only bands...). @calebrob6 wants to be able to provide models trained on all spectral bands or a subset of those bands (RGB-only, RGB+NIR, etc.). Torchvision uses 4 in their naming scheme. Based on https://github.com/zhu-xlab/SSL4EO-S12#pre-trained-models, it seems that 5 can affect model performance (i.e., you may want to choose a different SSL method depending on which dataset you are using). 6 is unclear to me and could be subsumed into 4. Torchvision uses 7 in their naming scheme to provide updated model weights without breaking backwards compatibility. In addition to the question of what are all possible things we could care about, we also need to think about how many things we should care about. I want TorchGeo to be easy to use for a remote sensing expert who knows very little about ML. Users shouldn't have to research various SSL methods in order to decide which weights to use. I want to try to keep things as simple as possible so someone can say "I'm working with Sentinel-2 data, give me your recommended weights". This could come in the form of a table that provides model performance on various 1–7 combinations, or optional parameters that allow you to only specify the things you care about, or shortened aliases marked as default/recommended/latest. |
Beta Was this translation helpful? Give feedback.
-
Model APIThe next thing we should consider is the API with which we present our weights. Here are some options. Current APIOur current API mimics the old torchvision design, with additional parameters for sensor/bands: model = resnet50(sensor="sentinel2", bands="all", pretrained=True) Pros:
Cons:
EnumsWe could adopt an API that mimics the new torchvision design with enums: model = resnet50(weights=ResNet50_Weights.SENTINEL2_ALL_DEFAULT) Pros:
Cons:
OtherDo any other libraries (timm, smp) allow you to select which model weights to use? How do they do it? Is there some kind of hybrid of the above two that would work better? Is there a completely different technique we could use, like some kind of nested enum with defaults at each level? I kind of like the idea of having a single |
Beta Was this translation helpful? Give feedback.
-
This discussion concerns #762 and support for multi-weight pretrained models following the recently introduced torchvision multi-weight api. Specifically, this discussion should focus on a naming scheme for already available or future pretrained weights. I suppose for TorchGeo a name could include the dataset on which model was pretrained on and band specifics (only rgb or multispectral), as well as the satellite source.
Beta Was this translation helpful? Give feedback.
All reactions