LoginSignup
1
0

More than 3 years have passed since last update.

mapillary_tools を Windows で動かす

Last updated at Posted at 2018-10-06

mapillary_tools を使ってアクションカムで撮った写真をMapillaryに投稿する」を Windows で動かしてみます。Windows10から新しく使えるようになった Windows Subsystem for Linux (WSL) の機能を使用します。

(2019年5月追記) Mapillary公式で exe 形式の mapillary_tools がリリースされています。WSLはI/Oのパフォーマンスがよくないため、exeのほうが性能がよいと思われます。お試しください。
https://tools.mapillary.com/binary/win/mapillary_tools.exe

WSL と Ubuntu のインストール

WSLのインストール方法はWSL(Windows Subsystem for Linux)の導入とUbuntuの初期設定を参考にしました。
Ubuntu 18.04.3 LTS をインストールしました。

$ lsb_release -d
Description:    Ubuntu 18.04.3 LTS

環境構築

必要なパッケージをインストールします。動画からアップロードできる機能を使用するために ffmpeg もインストールします。Python のバージョンは 2.7.15rc1 でした。

$ sudo apt update
$ sudo apt install python ffmpeg gcc python-dev
$ python --version
Python 2.7.12

pip のアップデート

pip のバージョン10以上が要求されています。Ubuntu のパッケージは古い(9.0系)ので新しい pip をインストールしました。

$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ sudo python get-pip.py
$ pip --version
pip 18.0 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

依存ライブラリをインストール

Mapillaryプロジェクトがフォークした Piexif をインストールします。

$ sudo pip install git+https://github.com/mapillary/Piexif

mapillary_tools のインストール

mapillary_tools 本体をインストールします。

$ sudo pip install --upgrade git+https://github.com/mapillary/mapillary_tools

タイムゾーンの設定を確認する

タイムゾーンが正しいか確認します。私の環境ではなぜか DST になっていましたので、JST ( Asia / Tokyo ) にしました。

$ date
Thu Aug 30 12:55:52 DST 2018
$ sudo dpkg-reconfigure tzdata
( Asia / Tokyo にする )
$ date
Mon Aug 25 22:51:20 JST 2018

動作確認

以下のように表示されればインストール成功です。以降の使い方は mapillary_tools を使ってアクションカムで撮った写真をMapillaryに投稿する と同じです。

$ mapillary_tools --version

Mapillary tools version : 0.1.6

補足

WSL でWindows のリムーバルメディアを使用する

写真や動画が入ったSDカードなどWindowsが認識したリムーバブルメディアをマウントする方法は「WSLでSDカードをマウントする」の記事が参考になりました。

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0