sattwik21 commited on
Commit
6426d55
·
verified ·
1 Parent(s): 2e33d35

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md CHANGED
@@ -62,4 +62,55 @@ configs:
62
  path: data/val-*
63
  - split: test
64
  path: data/test-*
 
 
 
 
 
 
 
 
 
 
 
 
65
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  path: data/val-*
63
  - split: test
64
  path: data/test-*
65
+ task_categories:
66
+ - image-segmentation
67
+ language:
68
+ - en
69
+ tags:
70
+ - computer-vision
71
+ - segmentation
72
+ - remote-sensing
73
+ - planetary-data
74
+ pretty_name: mmls-v2
75
+ size_categories:
76
+ - 1K<n<10K
77
  ---
78
+
79
+ # MMLS v2 (Multimodal Martian Landslide Dataset)
80
+
81
+ This dataset contains 128x128 multi-channel images for Martian landslide segmentation.
82
+ It features 7 data channels (RGB, DEM, Thermal Inertia, Grayscale) and 1 segmentation mask.
83
+
84
+ ## How to use in PyTorch
85
+
86
+ Because this dataset contains stacked multidimensional arrays, you should use the following wrapper to load it directly into your PyTorch training loops:
87
+
88
+ ```python
89
+ import torch
90
+ from torch.utils.data import DataLoader, Dataset
91
+ from datasets import load_dataset
92
+
93
+
94
+ class MMLSHubDataset(Dataset):
95
+ def __init__(self, split="train"):
96
+ # load_dataset pulls from the hub; .with_format("torch") auto-converts arrays to Tensors
97
+ self.hf_dataset = load_dataset("sattwik21/mmls-v2", split=split).with_format("torch")
98
+
99
+ def __len__(self):
100
+ return len(self.hf_dataset)
101
+
102
+ def __getitem__(self, idx):
103
+ sample = self.hf_dataset[idx]
104
+
105
+ # Returns a dictionary (or replace with your custom Tensorclass)
106
+ return {
107
+ "rgb": sample["rgb"],
108
+ "dem": sample["dem"],
109
+ "thermal": sample["thermal_inertial"],
110
+ "grayscale": sample["grayscale"],
111
+ "label": sample["label"]
112
+ }
113
+
114
+ # Usage:
115
+ train_dataset = MMLSHubDataset(split="train")
116
+ train_loader = DataLoader(train_dataset, batch_size=32, shuffle=True)