Skip to content

Commit

Permalink
fields reordered so datetimes are together
Browse files Browse the repository at this point in the history
  • Loading branch information
rbavery committed Mar 8, 2024
1 parent d091c2e commit 9e58fdf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ A deviation from the [STAC 1.1 Bands Object](https://github.com/radiantearth/sta
|------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--|
| shape | [integer] | **REQUIRED.** Shape of the input n-dimensional array ($N \times C \times H \times W$), including the batch size dimension. The batch size dimension must either be greater than 0 or -1 to indicate an unspecified batch dimension size. | |
| dim_order | string | **REQUIRED.** How the above dimensions are ordered within the `shape`. "bhw", "bchw", "bthw", "btchw" are valid orderings where b=batch, c=channel, t=time, h=height, w=width. | |
| data_type | enum | **REQUIRED.** The data type of values in the n-dimensional array. For model inputs, this should be the data type of the processed input supplied to the model inference function, not the data type of the source bands. Use one of the [common metadata data types](https://github.com/radiantearth/stac-spec/blob/f9b3c59ba810541c9da70c5f8d39635f8cba7bcd/item-spec/common-metadata.md#data-types). | |
| data_type | enum | **REQUIRED.** The data type of values in the n-dimensional array. For model inputs, this should be the data type of the processed input supplied to the model inference function, not the data type of the source bands. Use one of the [common metadata data types](https://github.com/stac-extensions/raster?tab=readme-ov-file#data-types). | |

Note: It is common in the machine learning, computer vision, and remote sensing communities to refer to rasters that are inputs to a model as arrays or tensors. Array Objects are distinct from the JSON array type used to represent lists of values.

Expand Down
2 changes: 1 addition & 1 deletion best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We recommend using at least the `processing:lineage` and `processing:level` fiel

For example:

```
```json
"processing:lineage": "GRD Post Processing",
"processing:level": "L1C",
"processing:facility": "Copernicus S1 Core Ground Segment - DPA",
Expand Down
20 changes: 10 additions & 10 deletions examples/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"properties": {
"start_datetime": "1900-01-01",
"end_datetime": null,
"datetime": null,
"mlm:name": "Resnet-18 Sentinel-2 ALL MOCO",
"mlm:task": "classification",
"mlm:framework": "pytorch",
"mlm:framework_version": "2.1.2+cu121",
"mlm:file_size": 1,
"mlm:file_size": 43000000,
"mlm:memory_size": 1,
"mlm:input": [
{
Expand Down Expand Up @@ -80,7 +81,7 @@
"valid_percent": null
},
"norm_with_clip_values": null,
"pre_processing_function": "https://github.com/microsoft/torchgeo/blob/545abe8326efc2848feae69d0212a15faba3eb00/torchgeo/datamodules/eurosat.py"
"pre_processing_function": "torchgeo.datamodules.eurosat.EuroSATDataModule.collate_fn"
}
],
"mlm:output": [
Expand Down Expand Up @@ -204,16 +205,15 @@
"accelerator_constrained": false,
"hardware_summary": "Unknown",
"container": null,
"commit_hash": null,
"commit_hash": "61efd2e2c4df7ebe3bd03002ebbaeaa3cfe9885a",
"batch_size_suggestion": null
}
],
"mlm:total_parameters": 11700000,
"mlm:pretrained_source": "EuroSat Sentinel-2",
"mlm:summary": "Sourced from torchgeo python library,identifier is ResNet18_Weights.SENTINEL2_ALL_MOCO",
"datetime": null
"mlm:summary": "Sourced from torchgeo python library,identifier is ResNet18_Weights.SENTINEL2_ALL_MOCO"
},
"geometry": null,
"geometry": "{\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n -7.882190080512502,\n 37.13739173208318\n ],\n [\n -7.882190080512502,\n 58.21798141355221\n ],\n [\n 27.911651652899923,\n 58.21798141355221\n ],\n [\n 27.911651652899923,\n 37.13739173208318\n ],\n [\n -7.882190080512502,\n 37.13739173208318\n ]\n ]\n ]\n}",
"links": [
{
"rel": "derived_from",
Expand All @@ -223,10 +223,10 @@
],
"assets": {},
"bbox": [
-90,
-180,
90,
180
-7.882190080512502,
37.13739173208318,
27.911651652899923,
58.21798141355221
],
"stac_extensions": [
"https://raw.githubusercontent.com/crim-ca/dlm-extension/main/json-schema/schema.json"
Expand Down
2 changes: 1 addition & 1 deletion stac_model/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class InputArray(BaseModel):
dim_order: Literal["bhw", "bchw", "bthw", "btchw"]
data_type: str = Field(
...,
pattern="^(uint8|uint16|uint32|uint64|int8|int16|int32|int64|float16|float32|float64)$",
pattern="^(uint8|uint16|uint32|uint64|int8|int16|int32|int64|float16|float32|float64|cint16|cint32|cfloat32|cfloat64|other)$",
)


Expand Down

0 comments on commit 9e58fdf

Please sign in to comment.