Skip to content

Add sentinel hub example #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@

- [Prebuilt ResNet50 Usage](nets/resnet.py)
- [LeNet in MXNet](nets/SageMaker_mx-lenet.ipynb)

## Other Examples

- [Preparing Data with Sentinel Hub](sentinel-hub.md)
Binary file added examples/images/valencia-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/valencia-example-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/valencia-example-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions examples/sentinel-hub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Preparing Data with Sentinel Hub

[Sentinel Hub](https://www.sentinel-hub.com/) is an easy way to access Sentinel imagery for use in machine learning applications. As an example, here is a configuration file for creating building segmentation masks in Valencia, Spain from Sentinel-2 imagery:

```json
{
"country": "spain",
"bounding_box": [
-0.745697021484375,
39.28010491220614,
-0.3076171875,
39.625788248139436
],
"zoom": 14,
"classes": [
{ "name": "Building", "filter": ["has", "building"] }
],
"imagery": "https://services.sentinel-hub.com/ogc/wms/[WMS_ID]?service=WMS&request=GetMap&layers=1_TRUE_COLOR&styles=&format=image%2Fpng&transparent=true&version=1.1.1&showlogo=false&name=Sentinel-2%20L1C&width=256&height=256&pane=activeLayer&maxcc=100&time=2018-07-15%2F2018-07-15&srs=EPSG%3A3857&bbox={bbox}",
"background_ratio": 1,
"ml_type": "segmentation"
}

```

We've chosen zoom 14 because it roughly corresponds to the maximum resolution of Sentinel imagery (~9.547m vs 10m). Also make sure to replace `[WMS_ID]` with your Sentinel Hub WMS in the `imagery` link above.

Here are some example labels created from this configuration:

![Labeled imagery in Valencia, Spain](images/valencia-example-1.png)
![Labeled imagery in Valencia, Spain](images/valencia-example-2.png)
![Labeled imagery in Valencia, Spain](images/valencia-example-3.png)

While the resolution might not support accurate single building footprint mapping, it can be used to create a classifier for built-up or urban areas.