画像の拡大とJPEGノイズ除去で話題のwaifu2xを、Mac にインストールしてみようとしたけれどうまくいかなかったです。
- うまくいったら修正します
- うまくいった人コメントいただけるとありがたいです
torch7 のインストール
curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; ./install.sh
出てくるメッセージに従って、.bashrc / .bash_profile あたりに、登録してから実行。th コマンドが使えるようになる
CUDA のインストール
brew cask install cuda
waifu2x セットアップ
git clone https://github.com/nagadomi/waifu2x.git
cd waifu2x
luarocks install --local cudnn
find <画像ディレクトリ> -name "*.png" > data/image_list.txt
th convert_data.lua
残念ながらうまくいかなかった
/Users/.../torch/install/bin/luajit: .../torch/install/share/lua/5.1/trepl/init.lua:363: /tmp/luarocks_cutorch-scm-1-2376/cutorch/lib/THC/THCGeneral.c(9) : cuda runtime error : CUDA driver version is insufficient for CUDA runtime version at /tmp/luarocks_cutorch-scm-1-2376/cutorch/lib/THC/THCGeneral.c:237
stack traceback:
[C]: in function 'error'
.../torch/install/share/lua/5.1/trepl/init.lua:363: in function 'require'
/Users/.../waifu2x/lib/settings.lua:2: in main chunk
[C]: in function 'require'
convert_data.lua:2: in main chunk
[C]: in function 'dofile'
.../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
[C]: at 0x010ee45310