Vision API cont'd - Google Cloud Python Tutorials p.3

preview_player
Показать описание
Welcome to part 3 of the Google Cloud tutorial series. In this tutorial, we're going to address more about the vision API.

What we've seen so far is just a quick, general, "idea" of what our image contains, but the vision API gives us quite a bit more. To begin, again, you can use any image you like for this, but I would like to illustrate a quick method for just seeing if your image happens to have any text and, if so, what that text is.

Рекомендации по теме
Комментарии
Автор

I want to test, but I suspect the "location" is the GPS data that is included (or not) in the meta data. As In GPS coordinates of the picture. Easy to test. Make sure GPS data is saved with camera pic on a good smart phone, and the try and process that image. It's on my list to try. Thank you so much for your courses!

MikePorterII
Автор

this video and the last one mentions bounding boxes for different features of Guido's picture (beard, chin, nose). Does label.bounds give the bounding box for each feature?

siavashparkhideh
Автор

Hey,

thanks for the tutorial, I have been playing around with vision API myself recently. I have been using the apiclient instead of their packages since it works with python 3.5, but unfortunately you will end up having to parse the JSON yourself. Also I agree the docs are horrible and even the developer cloud interface is way over engineered (my opinion of course) and its super hard to find anything. I have heard that the marketing API docs are excellent though.

I think you can find the `location` in the `bounds` method/variable :) I guess it should give you a list of x, y coordinates of the `bounding box`. I think location would probably give you geo coordinates if it finds something like the eiffel tower or other noteworthy things (I suppose)

henningsperr
Автор

Can we have the API run in own VM. Not on the Google DC?

openlambdabynandishkumar
Автор

That Vision API could be useful. Their OCR is really good. But also pretty expensive, when you get over 1000 Images.
It is not really that expensive, but for just fooling around with it, it is.

And it requires a Credit Card to sign up. Then i have to stick with tesseract.

leberkassemmel
Автор

It worked for the first time, now on labels = image.detect_labels() provides error. Refresh error and whole lot of html text in error. Some problem with credentials I think.

deepankverma
Автор

Age 50 is approximately 75% of the way to being a senior citizen, maybe it was on to something

chriswong
Автор

the last lines of code starting with labels are not working for me .it says labels are not defined .and i am having a problem with dir(image) . i am getting the error
File "<stdin>", line 1, in <module>
NameError: name 'image' is not defined

lathakiransamudrala
Автор

Hi, can I use this api on my local pc or the code necessarily has to be executed on a virtual machine on google cloud?

alexanderkarsonis
Автор

No vision.client() is replaced with However, I am not getting same fields as in Video on checking with dir()

image = types.Image(content=content)
>>> dir(image)
['ByteSize', 'CONTENT_FIELD_NUMBER', 'Clear', 'ClearExtension', 'ClearField', 'CopyFrom', 'DESCRIPTOR', 'DiscardUnknownFields', 'Extensions', 'FindInitializationErrors', 'FromString', 'HasExtension', 'HasField', 'IsInitialized', 'ListFields', 'MergeFrom', 'MergeFromString', 'ParseFromString', 'RegisterExtension', 'SOURCE_FIELD_NUMBER', 'SerializePartialToString', 'SerializeToString', 'SetInParent', 'WhichOneof', '_CheckCalledFromGeneratedFile', '_SetListener', '__class__', '__deepcopy__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '__unicode__', '_extensions_by_name', '_extensions_by_number']

>>> dir(label)
['BOUNDING_POLY_FIELD_NUMBER', 'ByteSize', 'CONFIDENCE_FIELD_NUMBER', 'Clear', 'ClearExtension', 'ClearField', 'CopyFrom', 'DESCRIPTION_FIELD_NUMBER', 'DESCRIPTOR', 'DiscardUnknownFields', 'Extensions', 'FindInitializationErrors', 'FromString', 'HasExtension', 'HasField', 'IsInitialized', 'LOCALE_FIELD_NUMBER', 'LOCATIONS_FIELD_NUMBER', 'ListFields', 'MID_FIELD_NUMBER', 'MergeFrom', 'MergeFromString', 'PROPERTIES_FIELD_NUMBER', 'ParseFromString', 'RegisterExtension', 'SCORE_FIELD_NUMBER', 'SerializePartialToString', 'SerializeToString', 'SetInParent', 'TOPICALITY_FIELD_NUMBER', 'WhichOneof', '_CheckCalledFromGeneratedFile', '_SetListener', '__class__', '__deepcopy__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '__unicode__', '_extensions_by_name', '_extensions_by_number']

Can anyone suggest, how to find fields like "description", "score" from above. Or if I am mission something?

saurabhrathor
Автор

Has anyone have a way to generate descriptions beyond the keywords (label detection)? I'm thinking about how keywords could be manipulated into a more comprehensible (maybe a natural language sentence) description of an image. My current approach: use label detection, then have built a logic tree to then determine whether to use landmark, logo, or text detection for a more targeted recognition. The issue lies in turning this info into an organic or natural sounding. A sentence!

A good example: let's say we're using Cloud Vision of something simple like a picture of a stop sign in front of a road. Labels would dig up text, road, traffic sign, stop sign (in that order of confidence or score). How do you graduate the description from those labels to at least "a red stop sign in front of a road." Something in human language. Any advice?

afarber
Автор

Hey, can we give image as to search in the video.

vishwanathamganesh
Автор

please make tutorial about python wifi or creating hotspot using python..

saqibyounis
Автор

Please find the updated working code -

saurabhrathor
Автор

Is there any way in python by which I can logon to windows automatically without entering password

ipointmistakes
visit shbcf.ru