6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

画像劣化を超解像する Blind Super Resolution モデル DCLS-SRを使う

Posted at

劣化画像をきれいにしたい

【画像:input→output】

これくらいの小さい画像から、上のサイズに4倍のスケールアップしています。

Blind Super Resolutionは、さまざまな画像劣化に対応するための技術です。

State of Art モデルを使う

Paper with CodeのBlind Super-Resolution on Set5 - 4x upscaling分野でトップのDCLS-SRモデルを使ってみましょう。

手順

リポジトリをクローン。
Pre-trained Weight をGitHubのリポジトリページから取得します。
Pytorch==1.6をインストールします(他のバージョンだとフーリエ変換の関数がうまく使えませんでした)。

inference.sh
python inference.py -opt "./options/setting2/test/test_setting2_x4.yml" -input_dir input_mages -output_dir output_mages

-opt で使いたいモデル(バージョンと、何倍にするか)の設定ファイルを指定し、設定ファイル内の Pre-trained WeightのPathを書き換えます。

結果

【画像:input→output】

🐣


フリーランスエンジニアです。
お仕事のご相談こちらまで
rockyshikoku@gmail.com

Core MLやARKitを使ったアプリを作っています。
機械学習/AR関連の情報を発信しています。

Twitter
Medium
GitHub

6
6
0

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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?