Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -81,7 +81,32 @@ The MMLSv2 paper is available [here](https://openaccess.thecvf.com/content/CVPR2
|
|
| 81 |
## Isolated test clarification
|
| 82 |
|
| 83 |
Due to the inclusion of the MMLSv2 dataset in the Mars Landslide Segmentation Challenge at PBVS/CVPR, the isolated test set will not be released at this time. It will be made available in the near future.
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
## Citation
|
| 86 |
|
| 87 |
If you find this dataset useful, please star ⭐️⭐️⭐️ our repo and cite our papers:
|
|
|
|
| 81 |
## Isolated test clarification
|
| 82 |
|
| 83 |
Due to the inclusion of the MMLSv2 dataset in the Mars Landslide Segmentation Challenge at PBVS/CVPR, the isolated test set will not be released at this time. It will be made available in the near future.
|
| 84 |
+
|
| 85 |
+
## Usage
|
| 86 |
+
|
| 87 |
+
```python
|
| 88 |
+
from datasets import load_dataset
|
| 89 |
+
import numpy as np
|
| 90 |
+
|
| 91 |
+
# 1. Load the dataset directly from Hugging Face Hub
|
| 92 |
+
dataset = load_dataset("MarsLS/MMLSv2")
|
| 93 |
+
|
| 94 |
+
# 2. Load a sample from the training set
|
| 95 |
+
sample = dataset["train"][0]
|
| 96 |
+
|
| 97 |
+
# 3. Convert to numpy array to preserve all 7 channels from the .tif files
|
| 98 |
+
# Shape will be (128, 128, 7)
|
| 99 |
+
image_channels = np.array(sample["image"])
|
| 100 |
+
mask = np.array(sample["label"])
|
| 101 |
+
|
| 102 |
+
# 4. Index specific bands based on the dataset structure
|
| 103 |
+
rgb_channels = image_channels[:, :, 0:3] # B1 (Red), B2 (Green), B3 (Blue)
|
| 104 |
+
dem_channel = image_channels[:, :, 3] # B4 (DEM)
|
| 105 |
+
slope_channel = image_channels[:, :, 4] # B5 (Slope)
|
| 106 |
+
thermal_inertia = image_channels[:, :, 5] # B6 (Thermal Inertia)
|
| 107 |
+
grayscale = image_channels[:, :, 6] # B7 (Grayscale)
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
## Citation
|
| 111 |
|
| 112 |
If you find this dataset useful, please star ⭐️⭐️⭐️ our repo and cite our papers:
|