Kick off your Machine Learning project with Google Cloud

Photo of Robert Kostrzewski

Robert Kostrzewski

Updated Jul 2, 2024 • 12 min read
neonbrand-617052-unsplash

The fields of Artificial Intelligence and Machine Learning have opened up brand new opportunities for your project.

Predicting patterns in your business domain can save time and money and make your business more effective.

If your project needs just a little 'something' that will set it apart from already existing solutions, you're in the right place. But how can you integrate Machine Learning solutions into your products? There are two approaches to consider.

You can schedule a Machine Learning system within own resources or delegate the task to a third party. If you are not into producing your own AI solutions, you can consider using cloud services. One of the most popular tools used worldwide is the Google Cloud Platform.

Google Cloud Tools

The cloud platform by Google is a set of tools dedicated for various actions, including:

  • Big Data
  • Cloud Data Storage
  • Databases
  • Lambda computations
  • Internet of Things modules
  • ...and Machine Learning services.

Google Cloud offers various Machine Learning tools which can extend your project with AI components easily. It can be integrated into your existing projects without having to maintain and set up additional infrastructure. First of all, the most general one is called Machine Learning Cloud. You can build, store, and perform your own Machine Learning structures, like Neural Networks, Decision Trees, and Clustering Algorithms on it. The biggest advantage of using this technology is the ability to run complex calculations on strong CPUs and GPUs. This way, you don’t have to buy and maintain you own powerful servers.

Another advantage is payments. Building your own infrastructure requires bigger initial costs and continuous maintenance. With Google Cloud you just pay per usage, for example 1 hour of running complex calculations.

The next option would be a more specific solution, called Natural Language Processing Cloud. The service is dedicated to processing blocks of text and fetching various bunches of informations based on that. The biggest advantage of using NLP Cloud is that you don't have to define your own processing algorithms, for example Convolutional Neural Networks. The service brings its own huge database of already learnt words and that allows you to use the service immediately, without preparing any databases. This way you can discover various information about text blocks by simply calling an NLP cloud service.

If you need to apply the potential of Machine Learning to images, Computer Vision Cloud is just for you. The service allows you to recognize the meaning of image files. Similarly to NLP Cloud, you don't have to define your own algorithms there. Google comes with a trained model dedicated to recognizing objects in image files. Just call the Computer Vision Cloud service with an image attachment and collect information about the content inside.

Why Use Cloud Services

During the process of designing Machine Learning features, you have to consider many steps, including:

  1. Implementation - do we rely on our own "smart" algorithms or use available solutions?
  2. Deployment - how do we want to push our Machine Learning infrastructure into testing and production environments?
  3. Maintenance - how do we want to care of servers, performance, and security?

Below you can find some benefits of choosing the Google Cloud Platform:

  1. You don’t have to own machines with powerful CPUs and GPUs.
  2. You pay for usage, not monthly, so it's best for testing or performing single tasks.
  3. You can use predefined data structures to make predictions easier and faster in case of development.
  4. You can use predefined data, so you don’t need to have much experience with Machine Learning techniques.
  5. Google Cloud provides an API for Ruby and Python, which allows you to integrate cloud services with your application quickly.

Google Cloud Natural Language Processing possibilities

What we can do using Google Cloud NLP:

  1. Recognize text categories.
    ML-googlecloud-image8

  2. Recognize main entities in a text block. By entities we mean the main keywords defining the meaning of the text.
    ML-googlecloud-image5

  3. Recognize the sentiment of a text block. By sentiment we mean some characteristic of specific keywords/sentences in text block. Sentiment can be positive, negative or neutral.
    ML-googlecloud-image3
  4. Syntax analysis - research the hierarchy of words in a text.

Real use cases - what we CAN do:

  1. Create a sentiment recognizer. Within that you can measure if opinions, posts or publications point to optimistic, negative or pessimistic emotions.
  2. Create an application which categorizes the given input. That could be a news categorizer or a tool to discover the topic of specific blog posts. It can be used to create a basic recommendation system.

  3. Create an application which extracts context and the most important details from news/posts/given block of text.


Real use cases - what we CAN'T do:

  1. Natural Language Processing is based on statistical methods and some Machine Learning models. With enough input training data these methods can learn how to predict sentiments/categories/entities in natural language. Google NLP provides a well-trained model which you can use immediately. However, it is important to mention that best statistical results are given when the analyzed text is long enough. The Basic Google NLP limit of text length is 120 characters, but the longer text we have, the better predictions we get. That’s why Google NLP is not the best solution for:
    1. Twitter content itself (without any additional content)
    2. Single words like advertisement titles

    3. Single human command sentences

Google Cloud Vision API

The examples below show what the Google Cloud Vision API is capable of.

What we can do using Google Cloud Vision API:

  1. Label a picture with keywords describing its elements.
    ML-googlecloud-image1

  2. Recognize labels and information related to Google web search (it's pretty amazing, isn't it?)
    ML-googlecloud-image7

  3. Collect some technical information about pictures (like dominant colors, color structure, etc.)
    ML-googlecloud-image6

  4. Validate content (searches for adult imagery, violence, and other unwanted content in the picture).
    ML-googlecloud-image2

  5. Detect faces and emotions in a picture.
    ML-googlecloud-image4

Real use cases - what we CAN do:

  1. Create an application which tries to collect, categorize, and sort images into meaningful groups.
  2. Any type of application which needs face detection.
  3. Application translating images into web search results.
  4. Application analyzing visual properties of images (is the image light, dark, how about composition and contrast, low or high resolution of pictures).
  5. Application which blocks improper content while browsing the web.

Real use cases - what we CAN'T do:

  1. Recognition of people - at least not always. With the power of Google web search we were able to detect the Polish president, but this might not work with less popular people.
  2. Application which rates "the prettiness" of photos. Machine Learning can determine a features of a photo, but it has no mind and cannot rate the quality or concept of photos.
  3. Application which creates new pieces of art. The cloud service can bring you information about pictures, but cannot transform a photo into something new.

Summary

Depending on your case, you can decide between running your own development of Machine Learning or using a third party service, such as the Google Cloud API. The decision is yours. You should make it based on calculations and the future perspective. However, Google’s solution is always worth consider - it does magical things without extensive knowledge. Furthermore, it’s a great entry point for developing even more complex, custom models. Maybe that would be the perfect cure for your Machine Learning doubts?

Photo of Robert Kostrzewski

More posts by this author

Robert Kostrzewski

Robert obtained a Bachelor degree in Computer Science at the Wroclaw University of Science with a...
Lost with AI?  Get the most important news weekly, straight to your inbox, curated by our CEO  Subscribe to AI'm Informed

Read more on our Blog

Check out the knowledge base collected and distilled by experienced professionals.

We're Netguru

At Netguru we specialize in designing, building, shipping and scaling beautiful, usable products with blazing-fast efficiency.

Let's talk business