Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -55,17 +55,18 @@ those who prefer traditional storage formats, GeoTIFF files are available in our
|
|
55 |
|
56 |
*CloudSEN12+ spatial coverage. The terms p509 and p2000 denote the patch size 509 × 509 and 2000 × 2000, respectively. ‘high’, ‘scribble’, and ‘nolabel’ refer to the types of expert-labeled annotations*
|
57 |
|
58 |
-
**
|
59 |
```python
|
60 |
-
import
|
61 |
-
|
|
|
62 |
```
|
63 |
|
64 |
**Sensor: Sentinel2 - MSI**
|
65 |
|
66 |
-
**
|
67 |
|
68 |
-
**
|
69 |
|
70 |
**Data raw repository: [https://cloudsen12.github.io/](https://cloudsen12.github.io/)**
|
71 |
|
@@ -161,31 +162,39 @@ website [https://cloudsen12.github.io/](https://cloudsen12.github.io/).
|
|
161 |
|
162 |
|
163 |
```python
|
164 |
-
import
|
165 |
-
import
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
```
|
186 |
|
187 |
|
188 |
-

|
63 |
```
|
64 |
|
65 |
**Sensor: Sentinel2 - MSI**
|
66 |
|
67 |
+
**TACO Task: image-segmentation**
|
68 |
|
69 |
+
**TACO Dataset Version: 1.1.0**
|
70 |
|
71 |
**Data raw repository: [https://cloudsen12.github.io/](https://cloudsen12.github.io/)**
|
72 |
|
|
|
162 |
|
163 |
|
164 |
```python
|
165 |
+
import tacoreader
|
166 |
+
import rasterio as rio
|
167 |
+
|
168 |
+
print(tacoreader.__version__) # 0.5.3
|
169 |
+
|
170 |
+
# Remotely load the Cloud-Optimized Dataset
|
171 |
+
dataset = tacoreader.load("tacofoundation:cloudsen12-l1c")
|
172 |
+
#dataset = tacoreader.load("tacofoundation:cloudsen12-l2a")
|
173 |
+
#dataset = tacoreader.load("tacofoundation:cloudsen12-extra")
|
174 |
+
|
175 |
+
# Read a sample
|
176 |
+
sample_idx = 2422
|
177 |
+
s2_l1c = dataset.read(sample_idx).read(0)
|
178 |
+
s2_label = dataset.read(sample_idx).read(1)
|
179 |
+
|
180 |
+
# Retrieve the data
|
181 |
+
with rio.open(s2_l1c) as src, rio.open(s2_label) as dst:
|
182 |
+
s2_l1c_data = src.read([4, 3, 2], window=rio.windows.Window(0, 0, 512, 512))
|
183 |
+
s2_label_data = dst.read(window=rio.windows.Window(0, 0, 512, 512))
|
184 |
+
|
185 |
+
# Display
|
186 |
+
fig, ax = plt.subplots(1, 2, figsize=(10, 5))
|
187 |
+
ax[0].imshow(s2_l1c_data.transpose(1, 2, 0) / 3000)
|
188 |
+
ax[0].set_title("Sentinel-2 L1C")
|
189 |
+
ax[1].imshow(s2_label_data[0])
|
190 |
+
ax[1].set_title("Human Label")
|
191 |
+
plt.tight_layout()
|
192 |
+
plt.savefig("taco_check.png")
|
193 |
+
plt.close(fig)
|
194 |
```
|
195 |
|
196 |
|
197 |
+

|
198 |
|
199 |
## Citation
|
200 |
|