Google AutoML Vision API and Google Vision API Custom Algorithm - google-cloud-platform

I am looking at Google AutoML Vision API and Google Vision API. I know that if you use Google AutoML Vision API that it is a custom model because you train ML models based on your own images and define your own labels. And when using Google Vision API, you are using a pretrained model...
However, I am wondering if it is possible to use my own algorithm (one which I created and not provided by Google) and using that instead with Vision / AutoML Vision API ? ...

Sure, you can definitely deploy your own ML algorithm on Google Cloud, without being tied up to the Vision or AutoML API.
Two approaches that I have used many times for this same use case:
Serverless approach, if your model is relatively light in terms of computational resources requirement - Deploy your own custom cloud function. More info here.
To be more specific, the way it works is that you just call your cloud function, passing your image directly (base64 or pointing to a storage location). The function then automatically allocates all required resources (automatically), run your custom algorithm to process the image and/or run inferences, send the results back and vanishes (all resources released, no more running costs). Neat :)
Google AI Platform. More info here
Use AI Platform to train your machine learning models at scale, to host your trained model in the cloud, and to use your model to make predictions about new data.
In doubt, go for AI Platform, as the whole pipeline is nicely lined-up for any of your custom code/models. Perfect for deployment in production as well.

Related

GCP Video Intelligence API Object Tracking

I've used the Video Intelligence API to do object tracking on video.
In the document [1], it recognizes more than 20,000 objects, places, and actions in stored and streaming video.
I have a questions. Is there any document that shows what kind of objects can be recognized or can't be recognized?
It's my first question. Thank you.
[1] https://cloud.google.com/video-intelligence
In this GCP documentation, it enumerates the categories in which Cloud Video Intelligence API can detect, analyze, track, transcribe and recognize: https://cloud.google.com/video-intelligence/docs/how-to
Among the things that are listed on the GCP documentation that Cloud Video Intelligence API can detect, track and recognize are: faces, people, shot changes, explicit content, objects, logos and text. Cloud Video Intelligence API are already pre-trained, if in case there are objects that Cloud Video Intelligence API can't recognize, you can train your own custom models using AutoML Video Intelligence. To get started with AutoML Video Intelligence, you can refer to this GCP documentation: https://cloud.google.com/video-intelligence/automl/docs/beginners-guide
As to the limitation of object that can be recognized in Cloud Video Intelligence API, there is no document that states which object are not recognizable. The only limits that are in the Cloud Video Intelligence API documentation are in terms of video size, per request and length. GCP Documentation: https://cloud.google.com/video-intelligence/quotas

google ai platform vs ml engine

I did lots of search, but I cannot understand what the difference between google ai platform and ml engine.
It seems that both of them can be used for training and deploying models.
Other words like google-cloud-automl, google ai hub are also very confusing.
What are the differences between them? Thanks
The short answer is: there isn't. In 2019 "ML Engine" was renamed to "AI Platform" and in time some services changed and expanded. To see what has changed, check the release notes, starting from around April. "Around", as they haven't left much trace that ML Engine ever existed.
Here's one of pull requests to "Rename Cloud ML Engine to AI Platform" for Python samples.
Cloud ML Engine = AI Platform Training + AI Platform Prediction (It was just a name change). Used for training and deploying ML models.
AI Platform Training: Bring your own code and submit Training jobs using supported ML frameworks such as TensorFlow, scikit-learn, XGBoost, Keras, etc.
AI Platform Prediction: Host your Model and use AI Platform Prediction to infer target values for new data.
Google Cloud Auto ML = You don't need to code, bring your dataset and GCP automatically picks the best model for you.
Different products:
Vision
Video Intelligence
Natural Language
Translation
Tables.
Google AI Hub = It is a Catalog: Discover Notebooks, Models and Pipelines.
Edit: Now AI Platform is called Vertex AI
Correct, the previous ML Engine service is now under Cloud AI Platform portfolio of products and provides end-to-end platform to build, run, and manage ML projects.
Please follow the instructions on how to use the service here.

Google Cloud Vision AI how to select similar images from range of provided images

I want to be able to select similar images using Google Cloud Vision AI out of range of images that I provide.
It seems there is Web Detection feature allows to show similar images across the web but I want to search across user provided images or even just within a particular website (not across entire web).
Is this possible to do?
There is no built in feature that allows you to do that on the Google Cloud Vision API, but what you can do is fetch the URL of the matching images detected across the web and filter the ones you are interested in. You can follow this tutorial.
I hope that helps
You could try out Vision API's ProductSearch: https://cloud.google.com/vision/product-search/docs/
See this answer: https://stackoverflow.com/a/58402071/11201290

Planning an architecture in GCP

I want to plan an architecture based on GCP cloud platform. Below are the subject areas what I have to cover. Can someone please help me to find out the proper services which will perform that operation?
Data ingestion (Batch, Real-time, Scheduler)
Data profiling
AI/ML based data processing
Analytical data processing
Elastic search
User interface
Batch and Real-time publish
Security
Logging/Audit
Monitoring
Code repository
If I am missing something which I have to take care then please add the same too.
GCP offers many products with functionality that can overlap partially. What product to use would depend on the more specific use case, and you can find an overview about it here.
That being said, an overall summary of the services you asked about would be:
1. Data ingestion (Batch, Real-time, Scheduler)
That will depend on where your data comes from, but the most common options are Dataflow (both for batch and streaming) and Pub/Sub for streaming messages.
2. Data profiling
Dataprep (which actually runs on top of Dataflow) can be used for data profiling, here is an overview of how you can do it.
3. AI/ML based data processing
For this, you have several options depending on your needs. For developers with limited machine learning expertise there is AutoML that allows to quickly train and deploy models. For more experienced data scientists there is ML Engine, that allows training and prediction of custom models made with frameworks like TensorFlow or scikit-learn.
Additionally, there are some pre-trained models for things like video analysis, computer vision, speech to text, speech synthesis, natural language processing or translation.
Plus, it’s even possible to perform some ML tasks in GCP’s data warehouse, BigQuery in SQL language.
4. Analytical data processing
Depending on your needs, you can use Dataproc, which is a managed Hadoop and Spark service, or Dataflow for stream and batch data processing.
BigQuery is also designed with analytical operations in mind.
5. Elastic search
There is no managed Elastic search service directly provided by GCP, but you can find several options on the marketplace, like an API service or a Kubernetes app for Google’s Kubernetes Engine.
6. User interface
If you are referring to a user interface for your own use, GCP’s console is what you’d be using. If you are referring to a UI for end-users, I’d suggest using App Engine.
If you are referring to a UI for data exploration, there is Datalab, which is essentially a managed notebook service, and Data Studio, where you can build plots of your data in real time.
7. Batch and Real-time publish
The publishing service in GCP, for both synchronous and asynchronous messages is Pub/Sub.
8. Security
Most security concerns in GCP are addressed here. Which is a wide topic by itself and should probably need a separate question.
9. Logging/Audit
GCP uses Stackdriver for logging of most of its products, and provides many ways to process and analyze those logs.
10. Monitoring
Stackdriver also has monitoring features.
11. Code repository
For this there is Cloud Source Repositories, which integrate with GCP’s automated build system and can also be easily synched with a Github repository.
12. Analytical data warehouse
You did not ask for this one, but I think it's an important part of a data analysis stack.
In the case of GCP, this would be BigQuery.

Does ml-engine provide a similar to Google Cloud Prediction blackbox?

As Google Cloud Prediction API is deprecated (https://cloud.google.com/prediction/docs/end-of-life-faq), does ml-engine provide a similar black-box?
Google Cloud ML Engine is managed TensorFlow and supports higher level APIs (see Datalab notebooks for regression and image classification - runnable in Datalab). Compared to Prediction API, there are some capability differences between the data types and some user experience delta that is being addressed in the near term.
Note that TensorFlow and ML Engine allow you a greater degree of freedom to select and tune the model & much larger scale than a blackbox - albeit with some added complexity at present. That too will be addressed soon.
Dinesh Kulkarni
Product Manager, Google Cloud ML & Datalab