SinGAN icon indicating copy to clipboard operation
SinGAN copied to clipboard

min_size and max_size in random_samples.py?

Open peterk opened this issue 6 years ago • 9 comments
trafficstars

What is the intended use of [--min_size MIN_SIZE] and [--max_size MAX_SIZE] in random_samples.py? Setting min_size larger than 256 seems to impact image generation but does not result in larger images.

peterk avatar Nov 01 '19 21:11 peterk

min_size and max_size effect the training. These are the minimal/maximal image dimensions over the model's levels. The number of level is adjusted accordingly.

tamarott avatar Nov 05 '19 16:11 tamarott

Ah ok!, thank you! Is there a way to output higher resolution images from random_samples.py?

peterk avatar Nov 05 '19 20:11 peterk

Your examples used 250px size training images, though in some cases it was 1000px wide by 250px high. If I want to maximize quality at the expense of training time, should I use the highest resolution input that can still fit into GPU memory?

JonathanFly avatar Nov 05 '19 23:11 JonathanFly

yes, you can adjust max_size according to the desire output size.

tamarott avatar Nov 07 '19 08:11 tamarott

Ah so training on a larger image I can use this?

python main_train.py --input_name <my 2000x800 image.png> --max-size 2000

peterk avatar Nov 07 '19 10:11 peterk

yes, but you may encounter some computation limitation

tamarott avatar Nov 07 '19 10:11 tamarott

With 16GB of GPU memory, the highest resolution output I have achieved is 667 x 413 (scale 9 or 10). Does this seem about right? I'd like to fit more information in there so I will experiment with different aspect ratios for training images.

JonathanFly avatar Nov 07 '19 19:11 JonathanFly

python main_train.py --input_name <my 2000x800 image.png> --max-size 2000 I tried this but I got an error stating; main_train.py: error: unrecognized arguments: --max-size 2000 Can anyone please help to solve this issue

warrider301 avatar Mar 02 '20 12:03 warrider301

you need to use max_size instead of max-size

tamarott avatar Mar 04 '20 13:03 tamarott