If you know your way around the command line, you can use a number of Python scripts that we have prepared for handling 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. Install the tools on your computer as described in the installation section of the readme to get started.
Then, you proceed 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
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/front/ --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/front/ --user_name mapillary_user --advanced --organization_username "mapillary_organization"