Open-EO / openeo-gfmap

Generic framework for EO mapping applications building on openEO
Apache License 2.0
4 stars 0 forks source link

Prototype first cropland mapping UDF #17

Closed kvantricht closed 1 month ago

kvantricht commented 5 months ago

As discussed with @GriffinBabe, I worked on a minimal example showing the entire flow required to create a crop/no-crop map for WorldCereal in OpenEO.

The notebook is here: https://github.com/WorldCereal/wc-classification/blob/openeo/notebooks/OPENEO/inference_example_openeo.ipynb

Actual inference code is here: https://github.com/WorldCereal/wc-classification/blob/openeo/src/worldcereal/openeo/inference.py

It's so far not yet done with GFMAP. Example starts from pregenerated result from the worldcereal_preprocessed_inputs block, which in GFMAP terminology contains the data fetching and preprocessing steps. That NetCDF is loaded and a UDF is applied to it locally. That UDF contains both feature extraction (using presto encoder) and model inference (using catboost).

Only works locally for numerous reasons: No env compiled yet that contains the required libraries Access needed to EPSG (hardcoded for the moment) to get the coordinates required as input for Presto On CDSE wouldn't work yet anyway because Meteo collection loader is required Probably this effort should only be done when we know how to do it in GFMAP directly instead of first as a standalone and then refactoring it.

kvantricht commented 5 months ago

Blocked by https://github.com/Open-EO/openeo-gfmap/issues/27

HansVRP commented 2 months ago

Just had a short allignment call with Darius and want to summarize our discussion;

Currently I am also looking at the inference example. From a GF-MAP (UUGLIMAP?) perspective, there should be general Torch and ONNX UDFs which only require you to provide the model + dependency link and the cube of interest.

Then you can efficiently build a pipeline either for classification or feature extraction.

As part of that excercise I am cleaning up the inference.py to get a better sense of what should go in the general udf en what not and for improving my understanding of the code.

Most likely there will be some overlap with Darius current work, so we will reallign next week

jdries commented 1 month ago

The prototype is there, from a functional perspective it also runs in openEO, now working out specific issues.