Skip to content Skip to sidebar Skip to footer

Using Google Cloud Ml With Android App

I am studying this example on google cloud ml : link. I want to know how I can connect my Android app to this so that I can send in a data value and receive the prediction back to

Solution 1:

You're right, the uploaded model is then provided to you as an API and you can make normal http POST requests and obtain predictions. This is their structure.

Perhaps read a little bit about the difference between batch and online predictions. It seem you are looking for online predictions - so make sure to make requests for those, not to submit jobs.

To use this inside of an application you also need to authenticate. The easiest way to do all that is to look for the documentation of the Cloud ML Java client library.

The steps to successfully implement Cloud ML predictions in your Android app might involve: - deploy a trained model to Cloud ML (I assume you have this) - create a service account in the Google Cloud project, give it appropriate Cloud ML rights and download its key - use this key from within the application to get credentials (following the API Client docs) when the application starts - make online prediction requests

I haven't seen any super easy to follow examples on doing this end to end just yet but surely they will come at some point. Right now your best bet is probably to go through the documentation.

Solution 2:

Training your model using the google cloud will be much faster compared to your model training on a laptop(CPU), thus saves lot of time.But you should be able to upload a trained model to the cloud and leverage it by calling it from the Android App.

Post a Comment for "Using Google Cloud Ml With Android App"