geo-deep-learning icon indicating copy to clipboard operation
geo-deep-learning copied to clipboard

Reading training and inference rasters from STAC item list: input as json

Open remtav opened this issue 3 years ago • 2 comments

Soon, GDL will internally be used to read images from an S3 bucket, using STAC items and Franklin's API to submit requests based on spatial, temporal or other filters from metadata.

GDL's readers should therefore transition from csv as input (#221) to a json containing a list of STAC items (as json). Here's an example of a response from a request passed to Franklin that could directly be used by GDL in the future: { "type": "FeatureCollection", "context": { "returned": 1, "matched": 1 }, "features": [ { "id": "QC15_052686187030_01_QuickBird2", "stac_version": "1.0.0-beta.2", "stac_extensions": [ "https://stac-extensions.github.io/projection/v1.0.0/schema.json" ], "type": "Feature", "geometry": { "type": "Polygon", "coordinates": ... ], [ (2nd STAC item) ], [ (3rd STAC item) ], "links": [], "stac_version": "1.0.0" }

Here are 5 examples of STAC Items for IA-Ready images as served by Franklin's API: https://datacube-stage.services.geo.ca/api/collections/worldview-3-ortho-pansharp/items/QC22_055128844110_01_WV3 https://datacube-stage.services.geo.ca/api/collections/worldview-4-ortho-pansharp/items/MB8_059380728010_01_P001_WV4 https://datacube-stage.services.geo.ca/api/collections/worldview-2-ortho-pansharp/items/VancouverP003_054230029070_01_P003_WV2 https://datacube-stage.services.geo.ca/api/collections/geoeye-1-ortho-pansharp/items/AB13_059294491080_01_GeoEye1 https://datacube-stage.services.geo.ca/api/collections/quickbird-2-ortho-pansharp/items/QC15_052686187030_01_QuickBird2

An issue remains: how to link the ground truth to this list? A separate json? This needs further analysis.

remtav avatar Dec 15 '21 21:12 remtav

how to link the ground truth to this list?

There may be an answer in the STAC Label extension.

ymoisan avatar Dec 17 '21 15:12 ymoisan

Here's the proposed solution: https://github.com/remtav/geo-deep-learning/blob/222-stac-item-input/inference/SingleBandItemEO.py. Will open PR in the coming days.

remtav avatar May 09 '22 17:05 remtav