blumenstiel commited on
Commit
eb91fea
·
verified ·
1 Parent(s): 4a0e081

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -5
README.md CHANGED
@@ -203,23 +203,32 @@ dataset = build_terramesh_dataset(
203
  )
204
  ```
205
 
206
- If you only use a single modality, you can directly pass a `A.Compose` instance to `build_terramesh_dataset` without the `MultimodalTransforms` wrapper. It still requires `Transpose([1, 2, 0])` as a first step.
207
 
208
  ### Returning metadata
209
 
210
  You can pass `return_metadata=True` to `build_terramesh_dataset()` to load center longitude and latitude, timestamps, and the S2 cloud mask as additional metadata.
211
 
212
- The resulting batch keys include: `["__key__", "__url__", "S2L2A", "S1RTC", ..., "center_lon", "center_lat", "cloud_mask", "time_S2L2A", "time_S1RTC", ...]`
213
 
214
- Therefore, you need to update the transforms if you use one:
215
- ```
216
  ...
217
  additional_targets={m: "image" for m in modalities + ["cloud_mask"]}
218
  ),
219
  non_image_modalities=["__key__", "__url__", "center_lon", "center_lat"] + ["time_" + m for m in modalities]
220
  ```
221
 
222
- Note that center points are not corrected when random crop is used.
 
 
 
 
 
 
 
 
 
223
  The cloud mask provides the classes land (0), water (1), snow (2), thin cloud (3), thick cloud (4), and cloud shadow (5), and no data (6).
224
  DEM does not return a time value while LULC uses the S2 timestamp because of the augmentation usign the S2 cloud and ice mask. Time values are returned as integer values but can be converted back to datetime with
225
  ```python
 
203
  )
204
  ```
205
 
206
+ If you only use a single modality, you don't need to specify `additional_targets`.
207
 
208
  ### Returning metadata
209
 
210
  You can pass `return_metadata=True` to `build_terramesh_dataset()` to load center longitude and latitude, timestamps, and the S2 cloud mask as additional metadata.
211
 
212
+ The resulting batch keys include: `["__key__", "__url__", "S2L2A", "S1RTC", ..., "center_lon", "center_lat", "cloud_mask", "time_S2L2A", "time_S1RTC", ...]`.
213
 
214
+ Therefore, you need to update the `transform` if you use one:
215
+ ```python
216
  ...
217
  additional_targets={m: "image" for m in modalities + ["cloud_mask"]}
218
  ),
219
  non_image_modalities=["__key__", "__url__", "center_lon", "center_lat"] + ["time_" + m for m in modalities]
220
  ```
221
 
222
+ For a single modality dataset, "time" does not have a suffix and the following changes for the `transform` are required:
223
+ ```python
224
+ ...
225
+ additional_targets={"cloud_mask": "image"}
226
+ ),
227
+ non_image_modalities=["__key__", "__url__", "center_lon", "center_lat", "time"]
228
+
229
+ ```
230
+
231
+ Note that center points are not updated when random crop is used.
232
  The cloud mask provides the classes land (0), water (1), snow (2), thin cloud (3), thick cloud (4), and cloud shadow (5), and no data (6).
233
  DEM does not return a time value while LULC uses the S2 timestamp because of the augmentation usign the S2 cloud and ice mask. Time values are returned as integer values but can be converted back to datetime with
234
  ```python