Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Useful tools and scripts related to Mapillary

Project Description

# Mapillary: Python API


A big thanks to the guys at [@Mapillary] for publishing many great [Python tools for Mapillary].

## Install

Latest version from **Github Repo**

$ git clone
$ cd mapillary_tools
$ python install

Stable version from **PyPi**

$ pip install mapillary

## Compatibility

Mapillary API is tested on the following Python versions:

- 2.7

## Command Line Interface

$ mapillary -h

| Parameter | Description |
| `command` | Mapillary API |
| `input` | Input: File Path |
| `-o`, `--out` | Output: File Path |
| `-e`, `--email` | Mapillary: Email |
| `-u`, `--username` | Mapillary: Username |
| `-p`, `--password` | Mapillary: Password |
| `-g`, `--gpx` | GPX Track: File Path |
| `-b`, `--bearing` | GPX: Bearing offset |
| `-t`, `--time` | GPX: Time offset |
| `-h`, `--help` | Help File |


## Geotag Photos

This process will add GPS information to all photos inside a folder correlated from a GPX Track.

**WARNING** This will overwrite any existing GPS EXIF to the existing files

$ mapillary geotag "<File Path>" --gpx "<GPX File Path>"

### Bearing Offset

If your camera was pointed to the right (90 Degrees), you can include a `bearing` offset to correct the **GPSImageDirection**

$ mapillary geotag "<File Path>" --gpx "<GPX File Path>" --bearing 90

### Time Offset

If the **Timestamp** of your GPS and camera are not in sync, you can include a `time` offset (Seconds) to adjust the **GPSDateTime**.

$ mapillary geotag "<File Path>" --gpx "<GPX File Path>" --time 2

### Successful GeoTag

A typical output for a successful Geotag process

$ mapillary geotag "100GOPRO" -g "GoPro 4.gpx"
Saving file: 100GOPRO/G0018624.JPG
Saving file: 100GOPRO/G0028783.JPG
Saving file: 100GOPRO/G0018600.JPG
Saving file: 100GOPRO/G0028752.JPG

## Manual Uploads

The Standard manual upload method requires your Mapillary credential

$ mapillary upload "<File Path>" -u "<Username>" \
-e "<>" -p "<Password>"

### Using Environment Variables

Using environment variables you can send your Mapillary credentials safely.

1. Connect the the following URL for to retrieve the **Hashes**.

2. Export env variables `MAPILLARY_PERMISSION_HASH` & `MAPILLARY_SIGNATURE_HASH`, you can edit `~/.bashrc` to store them to your terminal.

3. Use the Mapillary `upload` command with your `Username`.

$ export $MAPILLARY_PERMISSION_HASH=<permission_hash>
$ export $MAPILLARY_SIGNATURE_HASH=<signature_hash>
$ mapillary upload "<File Path>" -u "<Username>"

### Successful Upload

A typical successful upload will look like the following:

$ mapillary upload "GoPro" -u "deniscarriere"

[SUCCESS] Mapillary connection established.
Uploading sequence 3e41e334-3a50-4e41-8206-dae2a4d24e5a.
Uploading: G0047731.JPG
Uploading: G0047747.JPG
Uploading: G0047736.JPG
Uploading: G0047742.JPG
Success: G0047736.JPG
Success: G0047768.JPG
Success: G0047751.JPG
Finalizing upload will submit all successful uploads and ignore all failed.
If all files were marked as successful, everything is fine, just press 'y'.
Finalize upload? [y/n]: y
Upload a DONE file to tell the backend that the sequence
is all uploaded and ready to submit.
Uploading: DONE
Success: DONE
Done uploading.

[Python tools for Mapillary]:

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(28.8 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Feb 8, 2015
(24.7 kB) Copy SHA256 Hash SHA256
Source None Feb 8, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers