API documentation and developer tools: what do you want to know?

Hi all, I am working on a FAQ around the Mapillary developer resources, and hope to help address questions like @Richlv and @trekview have posed recently.

Is there anything you want to know about using the Mapillary API, whether with coding projects, downloading data, or other use cases, that I can help document answers to?

3 Likes

My primary items are things that seem to be completely missing from the API - once those appear, might have some feedback on docs, too :slight_smile:

1 Like

Some working python scripts that actually demonstrate available functionalities would be extremely helpful.

For example, I’d like to use the api to put vegetation detections to see if those can be used for mapping vegetation in cities. This would be a hugely useful tool for city environmental managers and researchers.

The API appears to be able to do this but the documentation is written at a level that only experts can make sense of which eliminates the ability of casual programmers to make use of your awesome platform and hard work developing all this.

For example, I spent the better part of a day getting an API query working to find detected vegetation and the sum of 8 hrs work is an ID that I can’t make sense of and the next step would be some complex geospatial matrix that apparently I divide by 4096 and then what?

I presume it would be trivial for one of the mapillary devs to write a sample python script that demonstrates the workflow of querying location for a feature/object then outputting a coordinate file and an associated image with the object marked.

Usable examples like this would be super useful for people

Thanks, great suggestion! I agree that this is difficult to use.

Can you clarify: would you be looking for simply “where are images located which contain vegetation?” or for “where are these images, and what is the image segmentation data for them that indicates the location of vegetation within the image?”

Hi,

Thanks for your response. Sorry, I couldn’t think of a clearer way to explain that.

My understanding is that the api can return the pixel coordinates of a detected object and then one can transform that to either draw the bounding box on the associated image, or crop the image to only return the image data within the bounding box.

For more exploratory work, an intermediate step might be to returns a list of detected objects marked in their associated images for location(s) supplied.

In a Jupyter notebook, an (deluxe) idealised workflow might go something like this:
User provides a location or bounding box
User selects which detection(s) they would like, or a drop-down (via widgets) provides a list of the available detections at that spot.
Script returns:

  • a list of detected objects at the location
  • GPS coordinates of each object on the map
  • pointers to the associated images the objects were detected in
  • bounding box in raw or image-centric coordinates (the latter is probably more useful) of each requested object
  • Functionality to either draw the object bounding box onto the image or pull the object’s pixels.

I have since found this page, not sure if it was just added or just hard to find via google. At any rate, it has good python code examples for most of the above.

One question though, for the last example “How do I retrieve the images in which a specific map feature is visible?”…
How does one find the Map Feature ID? I don’t see how to retrieve that via any of the other code examples on this page. Sorry in advance if it listed somewhere and I missed it.

Cheers