shaqian / tflite-react-native

React Native library for TensorFlow Lite
https://www.npmjs.com/package/tflite-react-native
MIT License
289 stars 108 forks source link

Results in ios and android is different for a same model #7

Open viuts opened 5 years ago

viuts commented 5 years ago

I am running example app on ios/android devices, using same model, same input image in both side, but the results is not same.

Generally the sequence of topN for Mobilenet is same, but the confidence percentage is a bit off, like testing a train image on android it says 69% but in ios it says 73%

I am also testing on some custom model on image classification as well, we result is more off in that case. In android it says 51%/49% and on ios it says 90%/10%

Is it the code of transforming the image to bitmap is a bit different on ios/android so the result is different?

SJCaldwell commented 5 years ago

Seeing similar things on my end, iOS prediction is significantly better than Android prediction for the same images. Find anymore info on this @viuts?