google-cloud-vision

How can I call or emulate Google Mobile Vision API in Google Cloud?

本小妞迷上赌 提交于 2019-12-11 05:54:37
问题 Background: Building on Does google cloud vision OCR support bar code reading?, I want to do offline analysis of PDF417 barcodes using Google Mobile Vision (Barcode API) but accessible from Google Cloud. Is there any way to call, emulate or otherwise access the Google Mobile Vision API off-Android/off-iOS? 回答1: I ended up rolling a Google Cloud Function to detect QR codes for images loaded into Google Cloud Storage, which handled the use case where, like you, I would have preferred to use

Why GCP Vision API returns worse results in python than at its online demo

最后都变了- 提交于 2019-12-10 22:08:17
问题 I wrote a basic python script to call and use the GCP Vision API. My aim is to send an image of a product to it and to retrieve (with OCR) the words written on this box. I have a predefined list of brands so I can search within the returned text from the API the brand and detect what it is. My python script is the following: import io from google.cloud import vision from google.cloud.vision import types import os import cv2 import numpy as np os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "**

Google Cloud vision demo behaving differently from actual API?

孤街浪徒 提交于 2019-12-08 03:28:25
问题 The same image leads to different text detection results in the google cloud vision API demo versus the actual API. In the demo, the accuracy is much higher. More importantly, the newline behavior is more correct in the demo; blocks of text are treated as together, whereas in the API I'm using with the free trial, the ordering of the text is treated as strictly "top to bottom" with no regard for horizontal proximity. Am I doing something wrong, or is this a bug? 回答1: It's possible that you

Can i train it to detect my face? or any other people face

僤鯓⒐⒋嵵緔 提交于 2019-12-07 15:33:07
问题 I want to create an application where in I capture images of people within my family and detect who it is. can I use vision API to create cloud database to store different pictures of each family members labelled with their names so that when I pull a request from the API it scans the images from the database and detects which family member it is rather than just detecting the faces in it. can I train it to do so??? 回答1: It is possible to train the classifier. More details can be found in

Get Lines and Paragraphs, not symbols from Google Vision API OCR on PDF

允我心安 提交于 2019-12-06 17:07:42
问题 I am attempting to use the now supported PDF/TIFF Document Text Detection from the Google Cloud Vision API. Using their example code I am able to submit a PDF and receive back a JSON object with the extracted text. My issue is that the JSON file that is saved to GCS only contains bounding boxes and text for "symbols", i.e. each character in each word. This makes the JSON object quite unwieldy and very difficult to use. I'd like to be able to get the text and bounding boxes for "LINES",

Python resize image and send to google vision function

会有一股神秘感。 提交于 2019-12-06 08:25:15
Since google vision has some restrictions on input image size, I want to first resize input image and then use the detect_labels() function. Here's their sample code def detect_labels(path): """Detects labels in the file.""" vision_client = vision.Client() with io.open(path, 'rb') as image_file: content = image_file.read() image = vision_client.image(content=content) labels = image.detect_labels() print('Labels:') for label in labels: print(label.description) they use io to open the image file. I wonder in this way, how to resize the image in memory and then call detect_labels() ? You can

Can I receive a boudingPoly for LABEL_DETECTION results?

冷暖自知 提交于 2019-12-04 13:38:22
问题 How can this be completed with the Google Vision-API please? send image to vision-api request: 'features': [{': 'LABEL_DETECTION','maxResults': 10,}] receive the labels in particular the one I'm interest in is a "clock" receive the boundingPoly so that I know the exact location of the clock within the image having received the boundingPoly I would want to use it to create a dynamic AR marker to be tracked by the AR library Currently it doesn't look like Google Vision-API supports a

Format OCR text annotation from Cloud Vision API in Python

房东的猫 提交于 2019-12-04 13:28:52
问题 I am using the Google Cloud Vision API for Python on a small program I'm using. The function is working and I get the OCR results, but I need to format these before being able to work with them. This is the function: # Call to OCR API def detect_text_uri(uri): """Detects text in the file located in Google Cloud Storage or on the Web. """ client = vision.ImageAnnotatorClient() image = types.Image() image.source.image_uri = uri response = client.text_detection(image=image) texts = response.text

Can I receive a boudingPoly for LABEL_DETECTION results?

℡╲_俬逩灬. 提交于 2019-12-03 08:32:32
How can this be completed with the Google Vision-API please? send image to vision-api request: 'features': [{': 'LABEL_DETECTION','maxResults': 10,}] receive the labels in particular the one I'm interest in is a "clock" receive the boundingPoly so that I know the exact location of the clock within the image having received the boundingPoly I would want to use it to create a dynamic AR marker to be tracked by the AR library Currently it doesn't look like Google Vision-API supports a boudingPoly for LABELS hence the question if there is a way to solve it with the Vision-API. Currently Label

Results locale from Cloud Vision API using TEXT_DETECTION

别等时光非礼了梦想. 提交于 2019-12-02 07:55:49
问题 I'm using npm node-cloud-vision-api API correctly detects language of the document but the results characters are returned in western character subset not corresponding to a locale. I assume they should be returned in UTF-8 characters but all the locale specific characters are mapped into basic western character subset. For example: Wartosc is return insted of Wartość How to instruct the API to return correct UTF-8 characters? 回答1: Have you tried passing in a language hint to the OCR