Stefan Radonjic
Stefan Radonjic

Reputation: 1598

Loaded MobileNet model giving wrong predictions

I am trying to load mobilenet_v2_1.4_224 (link: https://github.com/tensorflow/models/tree/master/research/slim/nets/mobilenet) which was trained in TensorFlow, and serve it in GoLang.

Thing is when I try to make a prediction of image with a panda, I get the wrong prediction. My guess is I downloaded wrong imagenet label file. On which imagenet dataset was network i mentioned above trained on?

Upvotes: 1

Views: 1366

Answers (1)

YoungChul
YoungChul

Reputation: 177

AFAIK MobileNet from the Tensorflow Model Zoo is trained on ILSVRC-2012-CLS, which has 1,000 classes including Giant Panda and Red Panda.

However as MobileNet is not 100% accurate, you might experience varying results depending on the input image you provide. Make sure to make it is tightly cropped around the Panda, and try various images, as some might return incorrect labels as even the best MobileNets V2 models have an accuracy around 70% on the ImageNet dataset.

If you want to be able to classify pandas more precisely, I'd suggest retrain your MobileNet model with a Panda dataset. There are plenty of available examples on how to do this, I have linked a couple below using the MobileNets architecture and Tensorflow as Framework.

https://www.tensorflow.org/hub/tutorials/image_retraining

https://hackernoon.com/creating-insanely-fast-image-classifiers-with-mobilenet-in-tensorflow-f030ce0a2991

https://medium.com/@sumit.arora/training-a-neural-network-using-mobilenets-in-tensorflow-for-image-classification-on-android-14f2792f64c1

Upvotes: 2

Related Questions