謝辞:このページで紹介するソフトウエアの作者に感謝します.
2020/05 時点では,動作に TensorFlow 2.0.0 を必要とするため,Python 3.7 が必要になる.
Python の URL: http://www.python.org/
インストール手順の詳細は: 別ページで説明している.
コマンドプロンプトを管理者として実行し,次のコマンドを実行.
python -m pip install -U pip setuptools python -m pip install -U jupyterlab jupyter jupyter-console jupytext spyder
※ 「 python -m pip install ...」は,Python パッケージをインストールするためのコマンド.
※ 「 py -3.7 」は,Python 3.7 を起動するためのもの
py -3.7 -m pip install --upgrade pip py -3.7 -m pip install ISR
https://github.com/idealo/image-super-resolutionで公開されているプログラムを書き替えて使用.
次のプログラムを a.py のようなファイル名で保存
import numpy as np
import sys
from PIL import Image
from ISR.models import RDN
img = Image.open('sys.argv[1]')
lr_img = np.array(img)
rdn = RDN(weights='psnr-small')
sr_img = rdn.predict(lr_img)
result = Image.fromarray(sr_img)
result.save('sys.argv[2]')
py -3.7 a.py sample2-0000001.png a.png
結果を確認.
下は,メガネ部分の拡大
下は,メガネ部分の拡大
本サイトは金子邦彦研究室のWebページです.サイトマップは,サイトマップのページをご覧下さい. 本サイト内の検索は,サイト内検索のページをご利用下さい.
問い合わせ先: 金子邦彦(かねこ くにひこ) ![]()