Monday, May 20, 2019

Python 3.7.3 : The google-cloud-vision python module - part 002.

I used Windows 8.1 and python 3.7.3 version.
The first step is to install the python module.
C:\Python373\Scripts>pip install --upgrade google-cloud-vision
You can see another tutorial about this python module here.
Let's test the python module.
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD6
4)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from import vision
>>> from import types
>>> from PIL import Image, ImageDraw
You need to have billing enabled for your Google Cloud Platform project.
Evaluated prices can vary and Google gives us this online calculator, or let us test with a FREE account with 300$.
To change the billing account go to the Google Cloud Platform Console.
Open the console left side menu and select Billing.
If you have more than one billing account then you need to solve this issue, see this webpage.
The Cloud Vision API integrates vision features, like: including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.
You need to set the authentification for your google account and your project, see this page.
The next step is to instantiate a client:
client = vision.ImageAnnotatorClient()
Google provides this tutorial with the same steps as into this tutorial.
You can test and read more about Google Vision on the official page.

No comments:

Post a Comment