1

I have retrained the inception model to recognize custom set of images. I have tried the simple and camera examples and replaced the .pb and .txt files with my own files. I am able to get a reliable result of probability of 0.99 when using the simple example (replaced the grace_hopper with my image). However, I got different results when using the camera example. I point my camera to the photo but the result seems different from that obtained from simple example. The config I am using is as follows, is there any config I need to make? Thank you.

const int wanted_input_width = 299;
const int wanted_input_height = 299;
const int wanted_input_channels = 3;
const float input_mean = 128.0f;
const float input_std = 128.0f;
const std::string input_layer_name = "Mul";
const std::string output_layer_name = "final_result";
chengsam
  • 7,315
  • 6
  • 30
  • 38
  • I am pinging you here because [your edit got rejected](https://stackoverflow.com/review/suggested-edits/16735105) on my answer about the WeChat API. Actually I think it was probably a good edit, but I am no long maintaining that answer so I don't have time to check it out. If you are willing, could you [add a separate answer](https://stackoverflow.com/questions/35718897/how-to-add-the-wechat-api-to-a-swift-project) explaining how to use CocoaPods and the iOS 9+ changes? I think that would be helpful for others trying to figure out the WeChat API. – Suragch Jul 18 '17 at 00:33
  • @Suragch Surprised that you're pinging me here. I will post another answer during my free time as I think my edit is useful because I came across those issues during the setup. Thanks dude. – chengsam Jul 18 '17 at 02:22
  • Glad to hear it. I pinged you here on a random question because you can't ping the authors of rejected edits directly on the edited question/answer. – Suragch Jul 18 '17 at 04:28

1 Answers1

1

The input/output layers have changed between Inception v1 (the version packaged with the Android demo) and v3 (the one you retrained).

You'll need to update the constants found in in ClassifierActivity.java with the values for Inception v3 (also found in the comments there).

Andrew Harp
  • 331
  • 1
  • 4