<p>The disappointing but accurate answer is that ImageNet training only produces label(s) from an input image, not a bounding box. You would need to train a network to identify ROI. There are a few interesting papers in <a href="https://stackoverflow.com/a/11390618/17328">this SO answer</a> that might help, the key terms being "ROI" and "Saliency Detection".</p>

<p>If you're desperate to reuse that pre-trained network you could try taking random sub-crops of the image and picking the smallest one that still has the correct label. I've never tried this so it might be a poor proxy.</p>

<p>Edit: It looks like <a href="https://arxiv.org/abs/1312.6034" rel="nofollow noreferrer">this paper</a> has used an image classification net to 
compute a saliency map. I'd follow their ideas.</p>
how to obtain heatmap or x y coordinates (bounding box) of classified picture in the inception model using tensorflow
<p>so i recently followed this tutorial to train my own image classifier </p>

<p><a href="https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/?utm_campaign=chrome_series_machinelearning_063016&amp;utm_source=gdev&amp;utm_medium=yt-desc#0" rel="nofollow">https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/?utm_campaign=chrome_series_machinelearning_063016&amp;utm_source=gdev&amp;utm_medium=yt-desc#0</a></p>

<p>for those who dont know it allows the retraining of the last layer of the google inception model in order to make the prediction graph work on our own custom categories.</p>

<p>once i was done training i deployed the model on iOS using this tutorial </p>

<p><a href="https://petewarden.com/2016/09/27/tensorflow-for-mobile-poets/" rel="nofollow">https://petewarden.com/2016/09/27/tensorflow-for-mobile-poets/</a></p>

<p>and the model works great in the wild on natural images.im acheving up to 98% accuracy on natural images. it was trained on only 2 classes. lets say it was working to just give a yes no answer to weather a calculator is present in an image or not. if the calculator is present it says yes, if not, it says no.</p>

<p>my question is that if it's possible to draw a bounding box on the calculator using our output graph or even a heatmap of the detection. because i need to crop the image further based on detection. </p>