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

[WIP] Generic multimodal dataset and MultiMAE #237

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

blumenstiel
Copy link
Contributor

This pr includes:

  • A generic multimodal dataset that can process multiple image and non-image modalities (GenericMultiModalDataModule)
  • MultiMAE backbone (multimae_base and multimae_large, no pre-trained models)
  • The generic dataset comes versions for segmentation, pixel-wise regression, and scalar tasks
  • The data config is based on the generic datasets. But instead of passing one train_data_root, you can now pass a directory with the modalities as keys.
    train_data_root:
      S2L2A: data/sen1floods11/data/data/flood_events/HandLabeled/S2L2AHand
      S1: data/sen1floods11/data/data/flood_events/HandLabeled/S1Hand
      LULC: data/sen1floods11/data/data/flood_events/HandLabeled/LULCHand
  • Additional parameters are:
    • modalities (list of all modality names)
    • image_modalities (list of image modalities, optional, otherwise considers all modalities as images)
    • rgb_modality, task (e.g. segmentation, pixel-wise regression, scalar (similar to classification etc.))
    • shared_transforms (apply the same transformation to all images, default True)
    • chunk_data (if the data already includes a sample dimension, default False)
    • sample_num_modalities (int, sample a subset of the modalities per batch, default None)
    • sample_replace (sample modalities with replacement, default False)
    • concat_bands (concatenate all images modalities along the band dim which enables running single-modal models ,default False)

Example configs: multimae_sen1floods11.yaml multimodal_prithvi_sen1floods11.yaml

Open Todos:

  • Implement allow_missing_modalities on a data module level. Idea: Add nan data for missing modalities.
  • Update docs
  • Check plotting code for scalar tasks
  • Add pre-trained RGB MultiMAE model and weight loading
  • Add tests

blumenstiel and others added 20 commits October 9, 2024 19:05
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
Merging with upstream commits
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
@blumenstiel blumenstiel marked this pull request as draft November 14, 2024 16:53
Signed-off-by: Benedikt Blumenstiel <benedikt.blumenstiel@ibm.com>
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

Successfully merging this pull request may close these issues.

1 participant