GitHub で公開されている DmitryUlyanov / deep-image-prior は,画像復元(image restoration)の研究成果.超解像(super-resolution), ノイズ除去(denoisng), インペインティング(inpainting)など,画像復元全般についての機能を持つ Python のソースコードが公開され,簡単に追試ができる.学習にも役立つ.
ソフトウエアの利用条件は,利用者自身で確認すること.
このページは, Windows での pytorch 0.41 のインストール手順を示すことと, image restoration におけるAIの応用例の紹介のため,掲載している.
Python の URL: http://www.python.org/
インストール手順の詳細は: 別ページで説明している.
コマンドプロンプトを管理者として実行し,次のコマンドを実行.
python -m pip install -U pip setuptools python -m pip install -U jupyterlab jupyter jupyter-console jupytext nteract_on_jupyter spyder
システム Python を使用(インストール操作は不要)
端末で,次のコマンドを実行.
sudo apt -y install python3-dev python3-pip python3-setuptools python3-venv sudo pip3 uninstall ptyprocess sniffio terminado tornado jupyterlab jupyter jupyter-console jupytext nteract_on_jupyter spyder sudo apt -y install jupyter jupyter-qtconsole spyder3 sudo apt -y install python3-ptyprocess python3-sniffio python3-terminado python3-tornado sudo pip3 install -U jupyterlab nteract_on_jupyter
sudo apt -y install git
使用している Python のバージョンに合うものを選ぶこと. Python 3.7 を使っている場合には「cp37」の付いたファイルを選ぶ.
※ 「py -m pip install ...」は,Python パッケージをインストールするためのコマンド.
python -m pip install torch-0.4.1-cp37-cp37m-win_amd64.whl
python -m pip install pillow==6.2.2
python -m pip install torchvision==0.2.2
python -m pip install numpy scipy matplotlib scikit-image jupyter
ここでは,Windows で c:\pytools にダウンロードする手順を示す.
mkdir c:\pytools cd c:\pytools
cd c:\pytools git clone https://github.com/DmitryUlyanov/deep-image-prior
いままでの手順で,いくつかの Python プログラムは,簡単に試せるようになる.
「jupyter notebook <ノートブックファイル名>」で動かす
cd c:\pytools cd deep-image-prior jupyter notebook denoising.ipynb
cd c:\pytools cd deep-image-prior jupyter notebook super-resolution.ipynb
cd c:\pytools cd deep-image-prior jupyter notebook restoration.ipynb