Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
add example bands and statitics details
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault committed Apr 4, 2024
1 parent 8b46388 commit 2b87297
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 14 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ Select one option from:
See [OpenCV - Interpolation Flags](https://docs.opencv.org/4.x/da/d54/group__imgproc__transform.html#ga5bb5a1fea74ea38e1a5445ca803ff121)
for details about the relevant methods. Equivalent methods from other packages are applicable as well.

When a normalization technique is specified, it is expected that the corresponding [Statistics](#bands-and-statistics)
parameters necessary to perform it would be provided for the corresponding input.
For example, the `min-max` normalization would require that at least the `minimum` and `maximum` statistic properties
are provided, while the `z-score` would require `mean` and `stddev`.

If none of the above values applies, `null` (literal, not string) can be used instead.
If a custom normalization operation, or a combination of operations (with or without [Resize](#resize-enum)),
must be defined instead, consider using a [Processing Expression](#processing-expression) reference.
Expand Down
2 changes: 1 addition & 1 deletion best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ choose to apply it for contexts outside the *recommended* extent for the same re
As another example, let us consider a model which is trained on imagery from all over the world
and is robust enough to be applied to any time period. In this case, the common metadata to use with the model
could include the bbox of "the world" `[-90, -180, 90, 180]` and the `start_datetime` and `end_datetime` range
would ideally be generic values like `["1900-01-01", null]` (see warning below).
would ideally be generic values like `["1900-01-01T00:00:00Z", null]` (see warning below).
However, due to limitations with the STAC 1.0 specification, this time extent is not applicable.

> [!WARNING]
Expand Down
238 changes: 225 additions & 13 deletions examples/example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"type": "Feature",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/mlm/v1.0.0/schema.json",
"https://stac-extensions.github.io/eo/v1.1.0/schema.json",
"https://stac-extensions.github.io/raster/v1.1.0/schema.json"
],
"type": "Feature",
"id": "resnet-18_sentinel-2_all_moco_classification",
"geometry": {
"type": "Polygon",
Expand Down Expand Up @@ -29,8 +34,15 @@
]
]
},
"bbox": [
-7.882190080512502,
37.13739173208318,
27.911651652899923,
58.21798141355221
],
"properties": {
"start_datetime": "1900-01-01",
"datetime": null,
"start_datetime": "1900-01-01T00:00:00Z",
"end_datetime": "9999-12-31T23:59:59Z",
"mlm:name": "Resnet-18 Sentinel-2 ALL MOCO",
"mlm:tasks": [
Expand Down Expand Up @@ -230,6 +242,216 @@
],
"post_processing_function": null
}
],
"eo:bands": [
{
"name": "coastal",
"common_name": "coastal",
"description": "Coastal aerosol (band 1)",
"center_wavelength": 0.443,
"full_width_half_max": 0.027
},
{
"name": "blue",
"common_name": "blue",
"description": "Blue (band 2)",
"center_wavelength": 0.49,
"full_width_half_max": 0.098
},
{
"name": "green",
"common_name": "green",
"description": "Green (band 3)",
"center_wavelength": 0.56,
"full_width_half_max": 0.045
},
{
"name": "red",
"common_name": "red",
"description": "Red (band 4)",
"center_wavelength": 0.665,
"full_width_half_max": 0.038
},
{
"name": "rededge1",
"common_name": "rededge",
"description": "Red edge 1 (band 5)",
"center_wavelength": 0.704,
"full_width_half_max": 0.019
},
{
"name": "rededge2",
"common_name": "rededge",
"description": "Red edge 2 (band 6)",
"center_wavelength": 0.74,
"full_width_half_max": 0.018
},
{
"name": "rededge3",
"common_name": "rededge",
"description": "Red edge 3 (band 7)",
"center_wavelength": 0.783,
"full_width_half_max": 0.028
},
{
"name": "nir",
"common_name": "nir",
"description": "NIR 1 (band 8)",
"center_wavelength": 0.842,
"full_width_half_max": 0.145
},
{
"name": "nir08",
"common_name": "nir08",
"description": "NIR 2 (band 8A)",
"center_wavelength": 0.865,
"full_width_half_max": 0.033
},
{
"name": "nir09",
"common_name": "nir09",
"description": "NIR 3 (band 9)",
"center_wavelength": 0.945,
"full_width_half_max": 0.026
},
{
"name": "cirrus",
"common_name": "cirrus",
"description": "SWIR - Cirrus (band 10)",
"center_wavelength": 1.375,
"full_width_half_max": 0.026
},
{
"name": "swir16",
"common_name": "swir16",
"description": "SWIR 1 (band 11)",
"center_wavelength": 1.61,
"full_width_half_max": 0.143
},
{
"name": "swir22",
"common_name": "swir22",
"description": "SWIR 2 (band 12)",
"center_wavelength": 2.19,
"full_width_half_max": 0.242
}
],
"raster:bands": [
{
"name": "coastal",
"common_name": "coastal",
"description": "Coastal aerosol (band 1)",
"center_wavelength": 0.443,
"full_width_half_max": 0.027
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 10,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 10,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 10,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 20,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 20,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 20,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 10,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 20,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 60,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 60,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 20,
"scale": 0.0001,
"offset": 0,
"unit": "m"
},
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 20,
"scale": 0.0001,
"offset": 0,
"unit": "m"
}
]
},
"links": [
Expand Down Expand Up @@ -261,15 +483,5 @@
"metadata"
]
}
},
"datetime": null,
"bbox": [
-7.882190080512502,
37.13739173208318,
27.911651652899923,
58.21798141355221
],
"stac_extensions": [
"https://raw.githubusercontent.com/crim-ca/dlm-extension/main/json-schema/schema.json"
]
}
}
4 changes: 4 additions & 0 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,10 @@
}
]
},
"InputStatistics": {
"$comment": "MLM statistics for the specific input relevant for normalization for ML features.",
"$ref": "https://stac-extensions.github.io/raster/v1.1.0/schema.json#/definitions/bands/items/properties/statistics"
},
"ProcessingExpression": {
"oneOf": [
{
Expand Down

0 comments on commit 2b87297

Please sign in to comment.