Issue with bmp processing during ResNet application inference
KirillP2323 opened this issue · comments
Hello, I'm using the ResnetJNI application as a template to build android APK.
I'm working on implementing the Infer
function in the app, and I'm using inferModel
from https://github.com/nnstreamer/nntrainer/blob/main/Applications/Android/ResnetJNI/app/src/main/jni/resnet.cpp#L565
However, it looks like the input
variable is constant across different images I tried. Adding this snippet
for (unsigned int i = 0; i < 5; i++) {
ANDROID_LOG_I("%s", std::to_string(input[i].c_str());
}
here always outputs these numbers:
-0.000000
1.000000
2.000000
3.000000
4.000000
I think the issue might be because of pBmp processing here: https://github.com/nnstreamer/nntrainer/blob/main/Applications/Android/ResnetJNI/app/src/main/jni/resnet_jni.cpp#L134
I think the issue might be because of pBmp processing here: https://github.com/nnstreamer/nntrainer/blob/main/Applications/Android/ResnetJNI/app/src/main/jni/resnet_jni.cpp#L134
Could you please elaborate?
I'm not completely sure how the process works, but to me it looks like on https://github.com/nnstreamer/nntrainer/blob/main/Applications/Android/ResnetJNI/app/src/main/jni/resnet_jni.cpp#L134 we assign RGB values of (i,j,0)
to pixel (i,j)
of pBmp
, instead of copying information from bmp
object.
We will check. Thanks for the issues.