Table of Contents

Cloud functions: a FaaS for event-driven ML prediction

Skin Cancer is one of the most common cancers in the world. An AI powered product can prove greatly useful to detect this type of cancer due to the following reasons.

-The fact that the symptoms are generally visible to the naked eye.
-Additionally, an early diagnosis is proven to be instrumental in preventing fatality and assuring the recovery of the patient.

The AI product, MySkinDoc, is expected to take user input image as an upload and based on a click event predict ML results by using an ML model saved on Google Storage, which is in effect an Image Classification ML model. The click event would happen on the website or mobile app and then different GCP services would work together to achieve and end to end functionaity. The cloud function helps to tie the different parts of this implementation together. The website/mobile app would send a third party HTTP POST request, for each click event. The function in turn would use the image file from the POST request and use the saved ML model from other GCP services like Google Storage together to give a prediction result for Skin Cancer (Melanoma).

The Cloud function in this case would need to be configured with an HTTP trigger and also unauthenticated calls to the function would need to be allowed. Additionally, we would need to specify the Timeout and Memory Allocated for the function call beforehand. The default service account in use is the App Engine Service Account. In the code step of the function deployment, we get to choose from multiple runtime languages like .NetCore, Node.js, Python and Go. For our case we will be using Python. The Source code can be typed in using an Inline editor or from other available options. Finally, an entry point function name needs to be specified, this will serve as the entry point for the function. The actual code goes in the main.py file and requirements.txt supplements the function with the required stable versions of all the python libraries in use. After this the function is ready for deployemnt.

We can now trigger the function using HTTP POST requests from a third party app. Each function call is logged and can be used for any debugging or troubleshooting. Other options include editing the function and deploying again as a new version, monitoring and metrics for number of functions calls and average function execution times etc.

 

 

Some of the other features for Cloud functions include:
-Connects and extends services to build complex applications
-End-to-end development and diagnosability using Cloud Trace and Cloud Debugger
-Automatic scaling based on events
-No server management required
-Pay only for what you use

Nikhil Philip Mathew

Liked what you read !

Please leave a Feedback

Leave a Reply

Your email address will not be published. Required fields are marked *

Join the sustainability movement

Is your carbon footprint leaving a heavy mark? Learn how to lighten it! ➡️

Register Now

Calculate Your DataOps ROI with Ease!

Simplify your decision-making process with the DataOps ROI Calculator, optimize your data management and analytics capabilities.

Calculator ROI Now!

Related articles you may would like to read

How To Setup An AI Center of Excellence (COE) With Use Cases And Process 
Proposals

Know the specific resource requirement for completing a specific project with us.

Blog

Keep yourself updated with the latest updates about Cloud technology, our latest offerings, security trends and much more.

Webinar

Gain insights into latest aspects of cloud productivity, security, advanced technologies and more via our Virtual events.

ISmile Technologies delivers business-specific Cloud Solutions and Managed IT Services across all major platforms maximizing your competitive advantage at an unparalleled value.

Request a Consultation