facebookarchive / AICamera-Style-Transfer

Neural Style Transfer with Caffe2 on your Android phone
https://caffe2.ai
Other
83 stars 31 forks source link

The app produces incorrect output image #5

Open rlegithub opened 6 years ago

rlegithub commented 6 years ago

Hi,

I was able to build and run the app but it seems the app produce incorrect output. I couldn't see the "night" effect on the output as shown in the sample image. Instead, the output image look just messed up. Any help here would be appreciated.

I wonder if we have to convert the format of the output_tensor? The input image_tensor is converted to format by preprocessImage() function before the input image is transformed. What is the format of the output image holding in ?

On the other hand, in the displayImage() function in StyleTransfer.javar, it try to create a bitmap from the ouput pixels as ==> it expects the output of transformImageWithCaffe2() in ARGB_8888.

Original Image: style_org

Transformed Image with Night_b style_night

Thanks, RLE

rlegithub commented 6 years ago

Hi,

Anyone could help giving some ideas on this issue?

Thanks in advance, rle

sunny8318 commented 6 years ago

@rlegithub I have same issue. Did you figure it out?

thanhtcptit commented 5 years ago

For anyone having the same problem in the future, Change your preview size of the camera. Incompatible input image size will lead to incorrect output image.