Time-Travel-Rephotography / Time-Travel-Rephotography.github.io

We simulate traveling back in time with a modern camera to rephotograph famous historical subjects.
https://time-travel-rephotography.github.io/
MIT License
342 stars 53 forks source link

Is there a way to modify output image size or crop settings? #8

Open cmdlinebeep opened 2 years ago

cmdlinebeep commented 2 years ago

First of all, thank you so much for open sourcing this for us to play with. It's one of the neatest things I've seen with AI.

I'm wondering if there is a way to get a higher resolution output than the 1024x1024 default? I don't see any way going through the code in Colab. It seems normalized regardless of input image size.

Second, can the crop effect also be a parameterized setting? I'm guessing that's a limitation set by StyleGAN, but it would be nice if it didn't have to crop in so tightly.

Thanks.

roxanneluo commented 2 years ago

Hi, Thank you for your interest in our work! The output resolution is determined by the underlying StyleGAN model. You’d need to train a higher-res stylegan to achieve that with our method. Cropping to a lower-res image is always possible from a high-res output.

bboylalu commented 2 years ago

A quick and dirty workaround suggestion: I make a normal version for the face, aligned with the tools.data.align_images and also a not-so-tightly-cropped version manually which gives poor results on the face, but good ones on the rest and then just combine them in Photoshop, setting the normal version on difference mode on top of the larger one, positioning/scaling/rotating it properly and then masking a blend area.