Skip to content

Commit 17d78f3

Browse files
committed
Merge branch 'jpramil-review-jp'
2 parents aa60ad0 + ff6a135 commit 17d78f3

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

1-acquisition.qmd

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ format:
99
::: {.callout-note}
1010
## Where this chapter fits
1111

12-
Training a segmentation model needs a dataset of `(image, label)` pairs — satellite tiles on one side, land-cover maps on the other. **This chapter builds that dataset.** By the end, you'll know how to pull a Sentinel-2 tile for any European city, fetch its matching CLC+ label, and confirm the two are perfectly aligned pixel-for-pixel.
12+
Training a segmentation model needs a dataset of `(image, label)` pairs — satellite tiles on one side, land-cover maps on the other. **This chapter builds that dataset.** By the end, you'll know how to pull a Sentinel-2 tile for any European city, fetch its matching CLC + label (Corinne Land Cover), and confirm the two are perfectly aligned pixel-for-pixel.
1313

1414
```{mermaid}
1515
%%| eval: true
1616
flowchart LR
1717
C1["Chapter 1Build the(image, label) dataset"]:::current
18-
C2["Chapter 2 (optional)Train a modelon the dataset"]
18+
C2["Chapter 2 (optional)Train a model on the dataset"]
1919
C3["Chapter 3Use a trained modelto predict new masks"]
2020
C4["Chapter 4Compute regionalland-cover statistics"]
2121
C1 --> C2 --> C3 --> C4
@@ -56,15 +56,11 @@ These properties make Sentinel-2 a reference dataset for land-cover mapping, agr
5656
![The Twin-Satellite Sentinel-2 Orbital Configuration (Credits: Astrium GmbH)](https://sentiwiki.copernicus.eu/__attachments/1687033/image-20230605-102800.png?inst-v=7382be46-c982-4c77-bf23-f3ed1f2e446f)
5757

5858
::: {.callout-tip}
59-
**Learn more:** [Sentinel-2 Mission information](https://sentiwiki.copernicus.eu/web/s2-mission) · [Sentinel Hub custom scripts gallery](https://custom-scripts.sentinel-hub.com/)
59+
**Learn more:** [Sentinel-2 Mission information](https://sentiwiki.copernicus.eu/web/s2-mission) (see in particular the [Sentinel-2 Spectral Response Functions (S2-SRF) document](https://sentiwiki.copernicus.eu/__attachments/1692737/COPE-GSEG-EOPG-TN-15-0007%20-%20Sentinel-2%20Spectral%20Response%20Functions%202024%20-%204.0.xlsx?inst-v=29a9468e-c82d-4e65-9e31-d654700543f9) for the spectral bands) · [Sentinel Hub custom scripts gallery](https://custom-scripts.sentinel-hub.com/)
6060
:::
6161

6262
### Spectral bands
6363

64-
::: {.callout-tip}
65-
**Official reference:** [Sentinel-2 Mission information](https://sentiwiki.copernicus.eu/web/s2-mission), specifically [Sentinel-2 Spectral Response Functions (S2-SRF) document](https://sentiwiki.copernicus.eu/__attachments/1692737/COPE-GSEG-EOPG-TN-15-0007%20-%20Sentinel-2%20Spectral%20Response%20Functions%202024%20-%204.0.xlsx?inst-v=29a9468e-c82d-4e65-9e31-d654700543f9)
66-
:::
67-
6864
A **spectral band** is a narrow window of wavelengths that the sensor records separately. Sentinel-2's MultiSpectral Instrument (MSI) captures **13 bands** spanning visible, near-infrared (NIR) and short-wave infrared (SWIR) light — from 443 nm to 2190 nm. Each band is tuned to a specific physical property of the surface or atmosphere, and the table below groups them by **native spatial resolution**, which reflects a hardware trade-off made by ESA:
6965

7066
- **10 m — the "core" mapping bands.** `B2` (blue), `B3` (green), `B4` (red) and `B8` (NIR). These are the bands you'll use most often to look at the landscape: true-colour RGB composites, NDVI, and any high-detail analysis of vegetation, water or built-up areas.
@@ -74,9 +70,11 @@ A **spectral band** is a narrow window of wavelengths that the sensor records se
7470
::: {.callout-note}
7571
**L1C vs L2A — two processing levels.** Copernicus distributes Sentinel-2 data at two processing levels. **Level-1C** contains top-of-atmosphere reflectance for all 13 bands. **Level-2A** applies atmospheric correction and delivers surface reflectance, which is what we want for land-cover mapping. L2A drops `B10` (the cirrus band — only useful for cloud detection, not for the surface) and delivers **12 spectral bands**. The training dataset in this tutorial is built from L2A products: the pre-processed GeoTIFFs stack these 12 spectral bands and append **two derived vegetation/water indices, NDVI and NDWI**, for a total of **14 channels**.
7672

73+
A **GeoTIFF** is a standard TIFF image file with extra embedded metadata describing *where* the image sits on Earth — coordinate reference system (CRS), pixel size, and an affine transform that maps each `(row, column)` to a geographic `(x, y)` coordinate. In other words: a regular image plus the spatial information needed to overlay it correctly on a map. The format also supports multiple bands in a single file, which is why we can pack the 14 channels into one `.tif`
74+
7775
NDVI (Normalised Difference Vegetation Index) and NDWI (Normalised Difference Water Index) are computed once at preprocessing time so the model can use them as input features without having to re-derive them from the spectral bands at every batch.
7876

79-
*Regenerating from scratch:* `src/download_region.py` follows the same convention and produces 14-channel float64 GeoTIFFs identical in layout to those on `projet-funathon`.
77+
`src/download_region.py` follows the same convention and produces 14-channel float64 GeoTIFFs identical in layout to those on `projet-funathon`.
8078
:::
8179

8280
| Band | Central <br> wavelength (nm) | Resolution (m) | Description | Use / Application |
@@ -101,6 +99,8 @@ NDVI (Normalised Difference Vegetation Index) and NDWI (Normalised Difference Wa
10199

102100
::: {.callout-note}
103101
**Think of a raster as a spreadsheet with coordinates.** A regular spreadsheet has rows and columns filled with numbers. A raster is the same idea, except each cell is a *pixel* located at a specific place on Earth, and you can stack multiple layers (bands) on top of each other — one layer per spectral band.
102+
103+
![Single-band vs. multi-band raster. *Source: [Earth Lab — Earth Data Science](https://earthdatascience.org/courses/earth-analytics/multispectral-remote-sensing-data/naip-imagery-raster-stacks-in-r/) (CC BY-SA 4.0) / NEON.*](assets/RGB-bands-raster-stack.jpg){width=70% fig-align="center"}
104104
:::
105105

106106
Key concepts:
@@ -1551,6 +1551,8 @@ m
15511551

15521552
In supervised machine learning, you need **pairs** of inputs and labels to train a model. The inputs are the Sentinel-2 satellite images; the labels are provided by [CLC+ Backbone](https://land.copernicus.eu/en/products/clc-backbone), a high-resolution land-cover product from the [Copernicus Land Monitoring Service](https://land.copernicus.eu/en).
15531553

1554+
**What does CLC stand for?** CLC is short for **CORINE Land Cover** (*Coordination of Information on the Environment — Land Cover*), the European reference inventory of land cover and land use. First produced in 1990 and updated roughly every six years, it has long been the standard product for tracking land-cover change across Europe. **CLC+ Backbone** is the next-generation evolution of this programme: instead of the original 44 hierarchical classes mapped at 100 m resolution from manually delineated polygons, it delivers a **pixel-level raster at 10 m resolution** with a simplified set of 10 land-cover classes, derived automatically from Sentinel-2 imagery — which makes it directly suitable as ground truth for a deep-learning segmentation model.
1555+
15541556
CLC+ Backbone provides **pixel-level** land-cover classification across Europe at **10 m resolution**, making it an ideal ground-truth dataset for training and evaluating segmentation models. The labels are temporally aligned with the satellite imagery (same year), ensuring that the land-cover classification corresponds to what the satellite actually observed.
15551557

15561558
**Why 2021?** CLC+ Backbone's most recent public release at the time of writing is the **2021** edition, so that's the year we use for labels. Each label is paired with a Sentinel-2 image from the **same year** — land cover actually changes between years (new construction, deforestation, crop rotation), and mismatched pairs would teach the model to predict yesterday's ground truth for today's image. The 2024 Sentinel-2 imagery you saw in the earlier exercises is kept for Chapter 3, where we run the trained model on *new* images that have no label — which is the whole point of training a model in the first place.

assets/RGB-bands-raster-stack.jpg

248 KB
Loading

0 commit comments

Comments
 (0)