If you know your way around the command line, you can use a number of Python scripts that we have prepared for processing and uploading images. Whether you are uploading large volumes, want to upload videos, or need to attach GPS tags to images, you’ll find what you need in the Mapillary Tools repository, including a readme which explains in detail how to set up and use the tools. The tools also let you easily upload imagery on behalf of an organization.
As with any other upload method, you need to have a Mapillary account to be able to use the command line tools. On Windows and macOS, you can get started quickly with help of our tools packages:
- Download the package
- Open your command line
- Refer to the location where you saved the package
- Start using the tools commands without any further installation
- On macOS, start the command with `mapillary_tools`
- On Windows, start the command with `mapillary_tools.exe`
You can also install the tools (together with all required dependencies) on your computer as described in the custom installation section of the readme.
Using the tools—processing and uploading imagery
Using the tools is simple: you need to run mapillary_tools on your command line with either process or upload (or both, to do them together) and specify a minimum of required arguments: the path to the image folder and the username of the account you want to upload to.
Take a look at the readme to find more detailed examples and explanations, as well as instructions on how to specify additional options to:
- Upload on behalf of an organization instead of an individual user (including private imagery)
- Geotag images from a separate GPX file (and define an offset between the files if clocks were not in sync)
- Derive image direction (compass angle) based on the latitude and longitude of the previous/next images in the sequence
- Split imagery into sequences
- Flag duplicates (when the camera has stopped moving, e.g. when waiting on traffic lights)
- Sample images from a video file (and specify the source for GPS information)
- Add image capture times or GPS tags from a CSV file
- Process copies of the original image (instead of editing the originals)
A few examples
NB! Remember to start your commands with mapillary_tools.exe if running the tools package directly (without custom installation) on Windows.
Upload with preparing the images (writing Mapillary-specific metadata into the image EXIF):
mapillary_tools process_and_upload --import_path "path/to/images" --user_name "mapillary_user"
Upload and flag duplicates:
mapillary_tools process_and_upload --import_path "path/to/images" --flag_duplicates --cutoff_time 30 --duplicate_distance 0.1 --user_name "mapillary_user" --advanced
Upload to an organization:
mapillary_tools process_and_upload --import_path "path/to/images" --user_name "mapillary_user" --advanced --organization_username "mapillary_organization"