PF-AFN
PF-AFN copied to clipboard
How to get output on custom images?
On any custom dimensional image, I get this error.
Traceback (most recent call last): File "test.py", line 50, in <module> flow_out = warp_model(real_image.cuda(), clothes.cuda()) File "C:\Users\sjasu\anaconda3\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\sjasu\Projects\fyp\PF-AFN\PF-AFN_test\models\afwm.py", line 192, in forward cond_pyramids = self.cond_FPN(self.cond_features(cond_input)) # maybe use nn.Sequential File "C:\Users\sjasu\anaconda3\envs\fyp\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "C:\Users\sjasu\Projects\fyp\PF-AFN\PF-AFN_test\models\afwm.py", line 103, in forward feature = feature + F.interpolate(last_feature, scale_factor=2, mode='nearest') RuntimeError: The size of tensor a (175) must match the size of tensor b (176) at non-singleton dimension 2
I tried to solve this by resizing the image to multiple of 192 x 256.
Here I resized to 384 x 512, this is the output I am getting ..
The provided model is trained on images of 192 x 256. You can try to resize the image to 192 x 256.
If i want to trian the model with high resolution,shall i change the network's input or output?
@geyuying Then how did you obtain output for VITON-HD dataset? Also, should the background of the image be always white?