Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

No predictions from Earth Engine using custom trained model hosted on Vertex AI

Hi!

I have a script that is developed based on code from one of Google's Vertex AI examples. The script is nearly copied, but changed slightly to fit my own data.

My script: https://colab.research.google.com/drive/1UNHDp5SuKRVdSyvRAqLod_kb-hD7SKGf#scrollTo=2O6SO3eIOxbK

Google's Vertex AI example: https://colab.research.google.com/github/google/earthengine-community/blob/master/guides/linked/Eart...

First, a convolutional neural network is trained with the TensorFlow and Keras frameworks.
After the model is fitted it is saved in the SavedModel format in my Google Cloud Storage bucket. Then I upload the model to Vertex AI's model registry, create an endpoint, and deploy the model at the endpoint. I then connect to the model with ee.Model.fromVertexAi() and try to get predictions with an ee.Image with several bands (the input data) with ee.Model.predictImage(). The resulting ee.Image (the output) is empty, and nothing appears when I try to display the image on a map with folium. Therefore I expect that something is wrong when deploying the model on Vertex AI and subsequently connecting it to Earth Engine, even though there are no errors in the response on Google Colab.

Although the model fails to give predictions with Vertex AI, the TensorFlow model does produce predictions with the training data as input (using Model.predict()) in Google Colab. You can see below that I get several messages in the Logs Explorer in Vertex AI, categorized as severe, but according to Gemini, some of them are normal health events. Does anyone know what the problem might be or where to get help?

So far, I have tried to adapt my script to three examples from Vertex AI, without any luck.

Error messages from Vertex AI:

log.png

 

 

 

 

 

 

Thank you!

1 0 134
0 REPLIES 0