2023-01-20 03:55:18 +01:00
|
|
|
# mapillary_download
|
2023-09-20 22:14:40 +02:00
|
|
|
Simple code to download images in one or several mapillary sequences. The images will be geotagged and oriented.
|
2023-01-20 04:19:37 +01:00
|
|
|
|
|
|
|
## How to use
|
2023-09-14 20:06:51 +02:00
|
|
|
change the access token with your access token and the sequence ids with the ids of the sequences you want to download
|
2023-01-20 04:19:37 +01:00
|
|
|
```Shell
|
2023-09-21 21:43:58 +02:00
|
|
|
python mapillary_download.py "MLY|xxxx|xxxxxxx" --sequence_ids xxxxxxxxxxx xxxxxxxxxxx
|
2023-09-20 12:21:14 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Available arguments
|
|
|
|
```Shell
|
2023-09-21 21:43:58 +02:00
|
|
|
python mapillary_download.py -h
|
|
|
|
usage: mapillary_download.py [-h] [--sequence_ids [SEQUENCE_IDS ...]] [--image_ids [IMAGE_IDS ...]] [--destination DESTINATION]
|
2023-09-20 12:21:14 +02:00
|
|
|
[--image_limit IMAGE_LIMIT] [--overwrite]
|
|
|
|
access_token
|
|
|
|
|
|
|
|
positional arguments:
|
|
|
|
access_token Your mapillary access token
|
|
|
|
|
|
|
|
optional arguments:
|
|
|
|
-h, --help show this help message and exit
|
|
|
|
--sequence_ids [SEQUENCE_IDS ...]
|
|
|
|
The mapillary sequence id(s) to download
|
|
|
|
--image_ids [IMAGE_IDS ...]
|
|
|
|
The mapillary image id(s) to get their sequence id(s)
|
|
|
|
--destination DESTINATION
|
|
|
|
Path destination for the images
|
|
|
|
--image_limit IMAGE_LIMIT
|
|
|
|
How many images you want to download
|
|
|
|
--overwrite overwrite existing images
|
2023-09-21 21:43:58 +02:00
|
|
|
-v, --version show program's version number and exit
|
2023-01-20 04:19:37 +01:00
|
|
|
```
|
2023-09-20 22:10:06 +02:00
|
|
|
|
|
|
|
## How to get my access token
|
|
|
|
- Go to https://www.mapillary.com/dashboard/developers
|
|
|
|
- Click on "Registrer Application", enter the needed informations, enable the application to "Read" data, then click on register :
|
|
|
|
|
|
|
|
![register application](./doc/snapshot_mapillary_register_application.jpg)
|
|
|
|
- When this registration is done, click on "view" in the token column. This is you access token :
|
2023-09-20 22:12:45 +02:00
|
|
|
|
2023-09-20 22:10:06 +02:00
|
|
|
![token](./doc/snapshot_mapillary_token.jpg)
|
|
|
|
|
2023-09-20 22:12:45 +02:00
|
|
|
## How to get my sequence id (or sequence key)
|
2023-09-20 22:10:06 +02:00
|
|
|
|
|
|
|
- Go to https://mapillary.com/app
|
|
|
|
- Click on one of the picture of the sequence you want to download
|
|
|
|
- Click on the "image option" button (right panel)
|
2023-09-20 22:12:45 +02:00
|
|
|
- Click on "advanced" then click on the sequence key to copy it in the clipboard
|
2023-09-20 22:10:06 +02:00
|
|
|
|
2023-09-21 21:43:58 +02:00
|
|
|
![snapshot](./doc/snapshot_mapillary_sequence.jpg)
|
|
|
|
|
|
|
|
## How to install the script with a virtual environnement
|
|
|
|
|
|
|
|
```Shell
|
|
|
|
cd ~
|
|
|
|
git clone https://github.com/Stefal/mapillary_download.git
|
|
|
|
cd mapillary_download
|
|
|
|
python3 -m venv mly_venv
|
|
|
|
source mly_venv/bin/activate
|
|
|
|
python -m pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
Then you can run `python mapillary_download "MLY|xxxx|xxxxxxx" --sequence_ids xxxxxxxxxxx`
|
|
|
|
When you're done with the script, simply run `deactivate` to exit the virtual environnement.
|
|
|
|
|
|
|
|
On windows you can create a virtual environnement too, or use the prebuilt `mapillary_download.exe` available on the release page.
|