sattwik21 commited on
Commit
fe38e72
·
verified ·
1 Parent(s): 16eb910

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -29
README.md CHANGED
@@ -73,43 +73,55 @@ tags:
73
  pretty_name: mmls-v2
74
  size_categories:
75
  - 1K<n<10K
 
 
 
 
 
 
 
 
 
 
 
76
  ---
77
 
78
- # MMLS v2 (Multimodal Martian Landslide Dataset)
 
 
 
 
79
 
80
- This dataset contains 128x128 multi-channel images for Martian landslide segmentation.
81
- It features 7 data channels (RGB, DEM, Thermal Inertia, Grayscale) and 1 segmentation mask.
82
 
83
- ## How to use in PyTorch
84
 
85
- Because this dataset contains stacked multidimensional arrays, you should use the following wrapper to load it directly into your PyTorch training loops:
 
 
 
 
 
 
 
 
86
 
87
  ```python
88
- import torch
89
- from torch.utils.data import DataLoader, Dataset
90
  from datasets import load_dataset
91
 
 
 
 
 
 
92
 
93
- class MMLSHubDataset(Dataset):
94
- def __init__(self, split="train"):
95
- # load_dataset pulls from the hub; .with_format("torch") auto-converts arrays to Tensors
96
- self.hf_dataset = load_dataset("sattwik21/mmls-v2", split=split).with_format("torch")
97
-
98
- def __len__(self):
99
- return len(self.hf_dataset)
100
-
101
- def __getitem__(self, idx):
102
- sample = self.hf_dataset[idx]
103
-
104
- # Returns a dictionary (or replace with your custom Tensorclass)
105
- return {
106
- "rgb": sample["rgb"],
107
- "dem": sample["dem"],
108
- "thermal": sample["thermal_inertial"],
109
- "grayscale": sample["grayscale"],
110
- "label": sample["label"]
111
- }
112
 
113
- # Usage:
114
- train_dataset = MMLSHubDataset(split="train")
115
- train_loader = DataLoader(train_dataset, batch_size=32, shuffle=True)
 
 
 
 
 
73
  pretty_name: mmls-v2
74
  size_categories:
75
  - 1K<n<10K
76
+
77
+ license: cc-by-4.0
78
+
79
+ citation: >
80
+ @inproceedings{paheding2026mmlsv2,
81
+ title={Mmlsv2: A multimodal dataset for martian landslide detection in remote sensing imagery},
82
+ author={Paheding, S. and Reyes-Angulo, A. A. and Ramos, L. T. and Sappa, A. D. and KS, S. K. and Oommen, T.},
83
+ booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
84
+ pages={10329--10338},
85
+ year={2026}
86
+ }
87
  ---
88
 
89
+ # MMLS v2: Multimodal Martian Landslide Dataset
90
+
91
+ This repository hosts a Hugging Face compatible, Parquet-formatted version of the **MMLS v2** dataset. It contains 128x128 multi-channel images for Martian landslide segmentation, featuring 7 data channels and 1 segmentation mask.
92
+
93
+ > **Disclaimer:** I am not the original creator of this dataset. I am hosting this pre-processed version to allow researchers to easily stream the multi-channel arrays directly into PyTorch training pipelines without dealing with manual TIFF decoding. All credit for data collection and the original paper belongs to the authors of MMLSv2. Please see the Citation section below.
94
 
95
+ ## Dataset Structure
 
96
 
97
+ Each sample in the dataset is a dictionary containing pre-formatted, multi-dimensional arrays. To maintain 3D spatial consistency across all modalities, single-channel arrays include an explicit channel dimension of `1`.
98
 
99
+ * **`rgb`**: `(3, 128, 128)` Float32
100
+ * **`dem`**: `(1, 128, 128)` — Float32
101
+ * **`thermal_inertial`**: `(1, 128, 128)` — Float32
102
+ * **`grayscale`**: `(1, 128, 128)` — Float32
103
+ * **`label`**: `(1, 128, 128)` — Float32 (Segmentation Mask)
104
+
105
+ ## Quickstart (PyTorch)
106
+
107
+ You can load this dataset directly into PyTorch tensors using the standard Hugging Face `datasets` library. No manual data conversion is required.
108
 
109
  ```python
 
 
110
  from datasets import load_dataset
111
 
112
+ # 1. Load a specific split from the Hub (train, val, or test)
113
+ dataset = load_dataset("sattwik21/mmls-v2", split="train")
114
+
115
+ # 2. Automatically format all arrays as native PyTorch Tensors
116
+ dataset = dataset.with_format("torch")
117
 
118
+ # 3. Pull a sample to verify
119
+ sample = dataset[0]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
+ # 4. Verify tensor dimensions
122
+ print("RGB shape:", sample["rgb"].shape) # Expected: torch.Size([3, 128, 128])
123
+ print("DEM shape:", sample["dem"].shape) # Expected: torch.Size([1, 128, 128])
124
+ print("Thermal shape:", sample["thermal_inertial"].shape)# Expected: torch.Size([1, 128, 128])
125
+ print("Grayscale shape:", sample["grayscale"].shape) # Expected: torch.Size([1, 128, 128])
126
+ print("Label shape:", sample["label"].shape) # Expected: torch.Size([1, 128, 128])
127
+ ```