Zehaos / MobileNet

MobileNet build with Tensorflow
Apache License 2.0
1.62k stars 470 forks source link

Accuracy difference on PC and Phone #42

Open bis-carbon opened 7 years ago

bis-carbon commented 7 years ago

Hello everyone, I have a question. Which is I used MobileNets for classification purpose and implemented it on android and PC, the problem is I get different prediction values on android and PC (linux) for the same picture and model. The difference is magnitude of 5% on average. What can cause this difference ? Is it because of the different decoding technique used on phone and PC?

I check the input tensor in to MobileNets on phone and PC and I found some differences on the pixel values.

gxdalu-yaya commented 7 years ago

I have meet the same problem,have you fixed the problem?

bis-carbon commented 7 years ago

I did run some experiments and the noise seems to come from bilinear down scaling operation used. Both java and tf implementations use bilinear method to downscale input image to 224x224, unfortunately there is slight difference in the down scaled image. The reason is cropping ratio and other parameters used to downscale input image are different for Java and TF.