You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 145-148 in main.py
I think content_image is obtained in RBG fomat.
However, utils.subtract_imagenet_mean_preprocess_batch take img in BGR fomat.
Is that right?
#main.pycontent_image=utils.tensor_load_rgbimage(args.content_image,ctx, size=args.content_size, keep_asp=True)
content_image=utils.subtract_imagenet_mean_preprocess_batch(content_image)
style_image=utils.tensor_load_rgbimage(args.style_image, ctx, size=args.style_size)
style_image=utils.subtract_imagenet_mean_preprocess_batch(style_image)
#utils.pydefsubtract_imagenet_mean_preprocess_batch(batch):
"""Subtract ImageNet mean pixel-wise from a BGR image."""batch=F.swapaxes(batch,0, 1)
(r, g, b) =F.split(batch, num_outputs=3, axis=0)
And I think a better understanding way to transform RGB to BGR or vise versa is to use:
F.swapaxes(batch,0, 1) is not that obvious.
Line 145-148 in main.py
I think content_image is obtained in RBG fomat.
However, utils.subtract_imagenet_mean_preprocess_batch take img in BGR fomat.
Is that right?
And I think a better understanding way to transform RGB to BGR or vise versa is to use:
F.swapaxes(batch,0, 1) is not that obvious.
The text was updated successfully, but these errors were encountered: