V3 -> v4 image segmentation

Hi all,

I’m working with a team of engineers on a research project, and we only just decided on mapillary as a platform about a month ago. Unfortunately, we didn’t realize there was an API shift about to happen. None of us are web developers, it’s mostly a HPC / C++ house. We had just gotten to the point where we were building the queries we needed to search areas, pull down sequences, and get the images we were after. We’ve got the data, and if we can continue using the v3 api, if even for a short time, that would be preferable to the solution to my question below. We will eventually switch to v4 (sooner than later it seems), but I’d prefer a wholesale rebuild of our process, and not have v3/v4 components mixed together.

We have sequences downloaded, on per directory, where we’ve rebuilt the image metadata (GPS, camera, etc.) for the 2048 thumbnails. What we’d like to do is get the segmentation layers for these images, {nature–, object–vehicle–, human–*, void–ground, …}

The v3 docs (which are now gone, I had to grab them from the wayback machine), say that this would have been endpoint to grab them from, but I’m not having much luck. Can you post a snippet or small example, where a user would get the mask of the sky, using an image id, with either the v3 or v4 api?

/images/{key}/object_detections/{layer}

Thanks!

Kyle

Perhaps this helps with v3:
http://mapillary.trydiscourse.com/t/api-json-limits-100-features/4658/10
Segmentation endpoint gives error 500 for me right now, but maybe it passes.

I’m getting all kinds of different replies, depending on the minute I try to run the script. For example, I’m trying to get a sky mask for an image, using curl, with an anonymized key of course.

curl "https://a.mapillary.com/v3/images/0te1Cvp8kAC8IhkxlB9Ofw/object_detections/segmentations?&client_id=$CLIENT_ID"

That’s giving me

Found. Redirecting to /v3/object_detections/segmentations?client_id=$CLIENT_ID&image_keys=0te1Cvp8kAC8IhkxlB9Ofw

I put the on the end of https://a.mapillary.com/ and the response is

301 Moved Permanently

I though I read the V3 api would be running until mid August? Am I still doing it wrong or is stuff just broke at the moment?

Thanks,

Kyle

Try

curl -L "https://a.mapillary.com/v3/images/0te1Cvp8kAC8IhkxlB9Ofw/object_detections/segmentations?&client_id=$CLIENT_ID"

which follows the redirection.

Tao,

Thanks for the suggestion. I had tried that earlier, after trying to build the right url myself. I still get the same response at the moment, 500 Internal Server Error.

<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>openresty</center>
</body>
</html>

For what it’s worth, we’ve started looking into caffee-enet, which provides the same semantic segmentation that mapillary is using to segment their images. It’s not ideal, but in the meantime it will work.

It might be a server side glitch. I tested the curl command above it did return some data. Could you try again with the correct client_id.

Tao,

I’ve been using my client ID the whole time, not $CLIENT_ID. I just haven’t been putting it in the post.

Could this be related to the facebook IP address switch? I don’t think my work blocks any traffic to/from facebook, as I’m able to use messenger from work and all that. I just tried again and I’m still getting the same error.

Thanks,

Kyle

Hey Kyle, would you mind PM me the full curl call? It shouldn’t be a IP issue because you got response from the server, although it’s an error response.

Also I would suggest switch to API v4 Mapillary

Tao,

PM Sent. I’d like to keep further discussion in here, as it may also help others with the same issue.

Thanks!

Kyle

Thanks. Just keep the discussion useful to the others:

To start with v4, all need is to create an app here Mapillary. Once you create the app you will get a client token for the app, then replace /v3/images/:image_id/object_detections?client_id=OLD_CLIENT_ID with https://graph.mapillary.com/:image_id/detections?access_token=YOUR_CLIENT_TOKEN. See Mapillary