2
1

More than 1 year has passed since last update.

Inpaintingやってみたいけど難しそう

room1.pngbafd8007-676f-488a-bf58-881faa645d0c.png

意外と簡単です。

使い方

InpaintingモデルAOT-GAN-for-Inpaintingの使い方です。

リポジトリからトレーニング済みの重みをダウンロードしておきます。
リポジトリをクローンして、

・トレーニング済みの重みのパス
・画像ディレクトリ
・マスク画像ディレクトリ

を指定して実行します。
マスク画像は入力画像と同じ大きさの白黒(GrayScale)画像で、隠したいところを白く塗ります。

# clone
git clone https://github.com/researchmm/AOT-GAN-for-Inpainting.git
cd AOT-GAN-for-Inpainting/src

# run
python test.py --pre_train G0000000.pt --dir_image ../examples/object/image --dir_mask ../examples/object/mask

outputsディレクトリに出力が保存されます。

インプット画像
room1.png

マスク画像
room.png

出力
bafd8007-676f-488a-bf58-881faa645d0c.png

2
1
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
2
1