python - Google Vision API's label detection -


problem 1:

i'm using vision api's label detection , i'm getting following error:

"httperror 429 when requesting https://vision.googleapis.com/v1/images:annotate?alt=json returned "insufficient tokens quota group , limit defaultgroupuser-100s using limit id mynumericid@mynumericid."

i'm not issuing many requests, 9 per minute, way lower limit per 100 seconds ( queries/100s/user limit 1,000 ), i've no idea why error message displaying.


problem 2

instead of sending 9 requests, 1 per image (as i'm using above), i'm able request @ once on same request, problem images cannot labeled , response doesn't specify ones, it's impossible know which label corresponds image, i.e:

the request 9 images labeled:

 service_request = service.images().annotate(body={         'requests': [{             'image': {                 'content': image1.decode('utf-8')             },              'image': {                 'content': image2.decode('utf-8')             }, etc.. 

response:

the response contains 8 labels , image names aren't specified, i've no idea image couldn't labeled.

example response:

{u'responses': [{u'labelannotations': [{u'score': 0.95578641, u'mid': u'/m/036qh8', u'description': u'produce'}, {u'score': 0.917763, u'mid': u'/m/02wbm', u'description': u'food'}, {u'score': 0.7463333, u'mid': u'/m/0270h', u'description': u'dessert'}, {u'score': 0.70616114, u'mid': u'/m/0krfg', u'description': u'meal'}, {u'score': 0.69225645, u'mid': u'/m/0f4s2w', u'description': u'vegetable'}, {u'score': 0.68722612, u'mid': u'/m/02xwb', u'description': u'fruit'}, {u'score': 0.58573318, u'mid': u'/m/0hz4q', u'description': u'breakfast'}, {u'score': 0.52691895, u'mid': u'/m/05cq63', u'description': u'kue'}]}]} 

i'm aware question specific , i'm hopping 1 of you, previous experience this, can share me.

try rebuilding "service" each loop/call image, refresh token


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo