I am working on a de-weatherization android app adopting a pix2pix model (similar to UNET). the app mainly uses the phone camera (one plus 7) to capture images, de-weatherize and display the result in the main interface. The deep learning inference interface adopts Qualcomm's SNPE framework. Currently, we encountered a problem that the output of the model to Bitmap is misaligned, as shown in the figure.
https://i.stack.imgur.com/zGhXu.jpg
To further analyze this issue, I took the input tensor and output it directly instead of inferring it.
return tensor;
After converting the input tensor to Bitmap, I found that the image is correct. Therefore, I'm guessing if the inference step is wrong. I used the Pytorch framework for training and the trained model was exported to the ONNX. I tested the model in pytorch framework and the model outputs the correct image. Then, model was then simplified by onnx-sim and converted to a dlc model by SNPE's conversion tool. I would like to ask what are the possible reasons for the occurrence of this misalignment. Thank you very much!