AICamera-Style-Transfer icon indicating copy to clipboard operation
AICamera-Style-Transfer copied to clipboard

The app produces incorrect output image

Open rlegithub opened this issue 6 years ago • 3 comments

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 <BGRA> format by preprocessImage() function before the input image is transformed. What is the format of the output image holding in <output_tensor>?

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

Original Image: style_org

Transformed Image with Night_b style_night

Thanks, RLE

rlegithub avatar May 10 '18 22:05 rlegithub

Hi,

Anyone could help giving some ideas on this issue?

Thanks in advance, rle

rlegithub avatar May 23 '18 20:05 rlegithub

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

sunny8318 avatar Jul 25 '18 05:07 sunny8318

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.

thanhtcptit avatar Aug 14 '19 07:08 thanhtcptit