FastStyle icon indicating copy to clipboard operation
FastStyle copied to clipboard

Cannot transfer the style on any arbitrary size image while inference

Open KushGabani opened this issue 4 years ago • 1 comments

When I try to evaluate the model with the content image provided, If I set load_image(content, resize=False) then there's an error that says the sizes of input doesn't match with the model's input. The model needs an (1, 256, 256, 3) image that it is trained on. But if I allow resizing load_image(content, resize=True) , it works but the image has low resolution. And the photos in your read me are high res, how did you allow arbitrary image size into the model?

KushGabani avatar Mar 31 '21 18:03 KushGabani

Only at training phase needs to specify the image size because it uses a VGG network to extract features. After training is complete, you can transfer images of arbitrary size. BTW, transfer network doesn't need to specify input shape. so I think it won't cause any mismatch problem.

cryu854 avatar Apr 01 '21 13:04 cryu854