The question is really straightfoward. My research group is working on the development of different models for identification of outliers in a time series context. They are experimenting with models such as ANN, CNN, and LSTM.
Models were produced and trained via Keras (python). The artifact output is a .h5 file. My task is to implement this models on the Google Earth Engine environment with some limitations and specs.:
Models are already trained and "frozen", so it is really a matter of input data on-the-fly and make it avaiable on GEE so people can access it's predictions and the identification of outliers on-the-fly, accordingly to an user-defined region/time;
The implementation of the models should rely solely on a plain/pure Javascript code, so it can be reproduced on GEE without charges for using Tesnorflow`s built in capabilities of GEE (associated with Google cloud and Google AI) nor any other libraries, such as tensorflowjs;
I started with an ANN model for it's relative simplicity. So far I've tried firstly to convert .h5 models to JS by using tensflowjs-converter, firstly via Python (layers output): (numpy 1.22.0; python 3.9.13)
`pip instal tensorflowjs
tensorflowjs_converter --input_format keras codes/wts_multiANN_1171_701_h26v06_default_lr_v2.h5 codes\output`
and subsequentially via node (graph output):
`npm install -g @tensorflow/tfjs-converter
tensorflowjs_converter --input_format=tfjs_layers_model --output_format=tfjs_graph_model ./model.json ./graph_output`
The output is a model.json and group1-shard1of1.bin. I would be able to run it on a JS environment as long as I have access to tensorflowjs. However, that is not the case, as described above. I tought the outputs would be somehow human readable and I would be able to code it from zero, which it has shown to be not the case.
So far, this seems to be not feasible at all, given the complexity of interpreting and reproducing these models' archtecture, weights and specs in a plain code without relaying on libraries that are not embedded on GEE platform.
I'm obviously not very literate on coding, specially in Java (I've been using only on GEE). I do have some experience in python (only general geo operations) and R (for statistical purposes).
I'm open to workaround solutions and insights of all sorts. Thank you!