Google pre-trained models

ML for unstructured datasets, like images, drives value for businesses. ML for unstructured data can be found in different business use cases :

  • image classification
  • NLP email classification
  • chatbots
  • text extraction from an image

Google offers several pre-built models for unstructured data :

image

The Vision API can :

  • label an image
  • detect a face
  • perform Optical Character Recognition to extract text from the image
  • detect explicit content
  • detect landmark (popular monuments for example)
  • detect logo

You can try the Vision API on your own on https://cloud.google.com/vision/. I’ve tried to upload a picture of a horse :

image

It is correctly identified as a horse. The response of the algorithm is a JSON file :

{
    "cropHintsAnnotation": {
        "cropHints": [
            {
            "boundingPoly": {
                "vertices": [
                {
                    "x": 419
                },
                {
                    "x": 1499
                },
                {
                    "x": 1499,
                    "y": 1332
                },
                {
                    "x": 419,
                    "y": 1332
                }
                ]
            },
    "confidence": 0.79999995,
    "importanceFraction": 0.7
    },
...

All those tools can be tried on the Web :

Create a chatbot with DialogFlow

We will use Dialogflow. It is an end to end developer platform for building rich and natural conversations. It now has a community of over 600’000 developers.

It has built-in features :

  • Entity recognition
  • Sentiment analysis
  • Content classification
  • Multi-language support

image

We can train the agent quickly, with only a few examples. Otherwise, we can choose among pre-trained agents

image

Dialogflow offers analytics on how users interact with your chatbot. It can be integrated on most popular platforms in just a click :

image

Fine-tune an image classification with Vision AutoML

Suppose that we need to make a specific classification at a certain granularity level: cloud classification for weather forecast. We can use Vision AutoML to fine-tune Vision API to our specific challenge.

We first upload the images corresponding to each label :

image

Then, train the model :

image

And evaluate the model :

image

In the last tab, we can make predictions by either uploading images, or generating a new API. Here is a summary of when to use Vision AutoML :

image