SinGAN
3333 ワード
Githubを参照
https://github.com/tamarott/SinGAN
注意!
このコードは、
torch 1.4.0
、torchvision 0.5.0
のバージョンを使用することができる.最新バージョンを使用する場合は、Githubを使用しますが、論文とまったく同じ結果は生成されません.そこで、これらのライブラリのバージョンを調整しました.学習環境
Train
%run main_train.py --input_name <input_file_name>
各scaleはiter回数を25単位で表示し、scaleごとに2000回反復する.scale値は単独で決定されず,大部分はscale 7,8で学習を終了した.(あと6日!)timeライブラリを用いて学習時間を測定した場合,最低20分(scale=6)から最大58分(scale=8)までの分布は,平均45~50分の学習時間を要する.
Paint2Image
%run paint2image.py --input_name <training_image_file_name> --ref_name <paint_image_file_name> --paint_start_scale <scale_to_inject>
paint start scale=1はランダムノイズから始まる結果であり、逆にソースから離れた状態を示し、概ねpaint start scale=2,3の場合はpaintimageの特徴を際立たせることができる.Example
まず,テストのために,2枚の図を論文に存在する例でテストした.
1.図1


学習にはscale 6,約20余り(1286秒)を用いた.
2.図2


学習にはscale 8、約48余量(2936秒)が必要である.
3.図3


学習にはscale 8、約48余量(2930秒)が必要です.
4-1. 図4-1


4-2. 図4-2


4-3. 図4-3


学習にはscale 8、約58余量(3519秒)が必要です.
総評
一般的に、学習にはscale 8が必要で、平均45~50分かかります.paint 2 imageの場合、paint start scale=1はランダムノイズからの結果であり、逆にソースから離れた状態を示し、概ねpaint start scale=2,3の場合、paint scale=2,3はpaint画像の特徴を際立たせることができる.
また、図4〜図4〜図4〜図2に示すように、原画像に用いられる色は、より良い結果を得ることができる.(SinGANを使用する場合は、Webプレゼンテーションでもこれらの要因を考慮すべきだと思います.)
そこで、予め設定された入力画像N章を学習し、各モデルを作成した後、ユーザから入力対入力画像の参照画像を入力する.この参照画像によりpaint start scale=2または3をパラメータとしてpaintto imageタスクを行うことができる.
Reference
この問題について(SinGAN), 我々は、より多くの情報をここで見つけました https://velog.io/@yoonj98/SinGAN-q8an99i9テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol