List of labels used in google object localization - google-cloud-vision

I wonder if there is a list of the possible labels returned by google's object localization: 'human', 'dog', 'cat', etc.
Knowing all possible labels returned by the object localization service of Google, can help us use the service more efficiently. For example, if we are looking in our database for images with hats, we first send our images to the api, then we need to know all possible labels related to hat that google returned. Looking for the word "hat" in the labels will miss those images in which google object recognition returned "sombrero".

There is no extensive list available which has all the possible labels used in Google object localization. If you feel that list would be highly beneficial you may post a feature request in Google's issuetracker.
In any case, notice that Google object localization results contain a machine-generated identifier (MID) corresponding to a label's Google Knowledge Graph entry. Therefore, you may perform calls to the GKG API to check similar possible results.
For example, if you perform the call for Sombrero
https://kgsearch.googleapis.com/v1/entities:search?query=sombrero&key=<yourAPIKey>&limit=5&indent=True
you will obtain the results: Sombrero, Hat, Sun Hat, Sombrero Galaxy, Straw Hat.

Related

Localized ML Kit Image labels

Is it possible to obtain labels from ML Kit Image Labeling in a given language?
I easily manage to get them in english...
but I need different languages... any suggestion?
In the docs I found this
In addition the text description of each label that ML Kit returns, it also returns the label's Google Knowledge Graph entity ID. This ID is a string that uniquely identifies the entity represented by the label, and is the same ID used by the Knowledge Graph Search API. You can use this string to identify an entity across languages, and independently of the formatting of the text description.
Maybe it is possible to use a graph entity id to translate the label?
Or what else can I do?
As the Firebase support told me via mail the day Feb 1, 2019
Unfortunately at the moment it is not possible to use other languages for image labeling, however I have created a feature request for our engineering team to take a look at and consider for future releases. There's no telling on when this will be ready, but you can keep an eye on the Firebase Release Notes to be informed of the latest from Firebase.
On the other hand the Knowledge Graph entity ID can be used to find entities in the Google Knowledge Graph but at the moment it is not possible to connect these results with the image labeling in order to translate the label.
I firstly tryed to play with the Graph entity ID, in order to traslate the label description... but since i used the in-device Firebase library, i obtained some ID that Knowledge Graph wasn't able to recognize (for instance: Label: Flower, Confidence: 0.97793585, EntityID: /m/0c9ph5).
I ended up using a free translation API sevices (Yandex) wich is free for the first million translated character a day.

Using Google Places Search without violating terms

As the title says, my app takes parameters from the user and displays relevant locations around them. But from what I understand, the Google Maps API terms prohibit you from doing this. Can this use be termed as a listing service, where I'm simply displaying the data I got from Google. I'm also providing all relevant attributions.

List of Dimensions and Metrics in different languages

The Metadata API can be used to get a list of google analytic dimensions and metrics. Is it possible to have this list returned in different languages? Is there a list/database of the metrics and dimensions for different languages?
The MetaData API only returns in english there is no way to change the language. I dont think they will be changing that anytime soon. But you could try adding it as a feature request. http://code.google.com/p/analytics-issues/issues/list

Google Places api vs Google Maps search

I have successfully used Google Places Api and was able to retrieve business establishments (shops) given a latlongbound and a keyword. But I cant stop wondering why it returns lesser shops than when you go to maps.google.com and type the keyword. Google Places does not even return those with a name and icon drawn on the map itself.
I want to retrieve a json with a similar result when typing a keyword on maps.google.com and I don't really mind if Google Places is not used.
Sounds like you may have additional filtering preventing you from querying all the results. Make sure you aren't restricting the 'bounds' or 'region' around your lat/long.
https://developers.google.com/maps/documentation/geocoding/
Good luck!

GTFS/NextBus/Google Maps - transit distance traveled

I am trying to get the distance traveled on a transit route -- particularly San Francisco MUNI, but the standards NextBus, GTFS, and Google Maps API appear to be universal. I'm comfortable using any of these APIs, I'm just not sure how to go about this problem.
The easy way - ask Google Maps (this using webservices, but there is also the javascript API):
http://maps.googleapis.com/maps/api/directions/json?origin=37.7954199,-122.397&destination=37.7873299,-122.44691&sensor=false&mode=transit&departure_time=1348109609&alternatives=true
this JSON includes distance traveled, but there are two issues:
Google does not allow you to use this data unless you're displaying a map, which I don't want to do
I would need to ensure that the distance returned is for the correct route/line, since it can/will give multiple routing options. This is probably doable but would require more logic.
EDIT: using alternatives=true (or provideRouteAlternatives: true using the javascript API) only returns a maximum of 3 routes, which here in SF often doesn't include the route I'm looking for (other transit agencies, multiple lines on the same route, etc). So this isn't such a great option.
NextBus:
example route config:
http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a=sf-muni&r=1
The coordinates for each stop are given, but connecting the dots on those is not the same as the route taken -- it will cut corners, etc, and I need this to be accurate. The actual route taken is given under <path>/<point>, but I don't see any obvious correlation between stop and path coordinates. Plus, NextBus says in their documentation (p.10 near the bottom) that you should NOT connect points between <path> segments, they're only meant for drawing on a map and can overlap.
GTFS:
The GTFS data also separates stop and "shape" coordinates (like NextBus paths). Unfortunately, the coordinates are slightly different for the same stops between NextBus and GTFS (rounding), though the stop ID/tags are the same. Also, the data files are in the megabytes, and I need to use this for a mobile app. I suppose I could put all the data in a database and query that, but that still leaves figuring out how to correlate the stops with the shape. The "shapes_distance_traveled" column in the shapes.txt file is especially promising. MUNI chooses to leave the optional "shapes_distance_traveled" field out of stop_times.txt, though.
Any advice would be appreciated, I understand this seems like an epic task to get a simple value. Maybe I'll just throw a map in to legitimately use the distance :)
Instead of using Google Maps, I would look into the un-encumbered licensing of OpenStreetMap. There are multiple
routing engines that can use OSM data. Personally, I would use routing in PostGIS or SQLite, but depending on your skillset you might choose another.
You've clearly done your research, (+1), and as you said, the easy way is to ask Google. If it is worth for you then you might want to look into purchasing a business licence to use the Google Maps API, and negotiate with them about the requirement of displaying a map. That's the only legal way I can think of with the Google API. Alternatively, you can try building you own routing engine with data from the TIGER data set, which is freely available from the US Census Bureau, but again, as you said, it may seem like an epic task. :-)

Resources