<p>You can not directly use the <code>.pb</code> model produced by image classification to perform object detection. You will have to obtain an object detection model, train it and then use it to detect. There are pretrained object detection models at Tensorflow obejct detection model <a href="https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md" rel="nofollow noreferrer">zoo</a>.</p>

<p><strong>detailed answer below:</strong></p>

<p>Image classification and object detection are two different but very closely related tasks. In fact, Ross Girshick asked a similar question on the famous paper <a href="https://arxiv.org/abs/1311.2524" rel="nofollow noreferrer">R-CNN</a></p>

<blockquote>
  <p>To what extent do the CNN classification results on ImageNet generalize to object detection results on the PASCAL VOC Challenge?</p>
</blockquote>

<p>This question basically means that image classification model can be used to help object detection but there are some more steps needed. So you cannot just directly use a classification network to do object detection task. (But the error you gave was something different, you can find the correct tensor name and fix the error, but it just does not make sense to directly use classification network to do object detection that way.)</p>

<p>There is naive solution to combine the two, you could just use a sliding window of various sizes passing through the image and perform classification, this can perform object detection.</p>

<p>Another solution is integrated. To give an example, Faster R-CNN is an object detection network which used VGG as the feature extractor (In the original paper). Here you can see that VGG is an image classification network and it is pretrained on some image classification task. </p>

<p><a href="https://i.stack.imgur.com/rTgYF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rTgYF.png" alt="enter image description here"></a></p>

<p><a href="https://courses.cs.washington.edu/courses/csep576/18sp/lectures/8_1_detection.pdf" rel="nofollow noreferrer">image source</a></p>
Can we use a model trained with image classification to help in object detection in tensorflow?
<p>I have used <strong>Tensorflow-for-poets</strong> to build an image classification model. However, I now want to use the trained model in an object detection model. Can I just import the .pb files directly or do I have to retrain the model?</p>

<p>I am getting this error when I try it</p>

<blockquote>
  <p>KeyError: "The name 'image_tensor:0' refers to a Tensor which does not exist. The operation, 'image_tensor', does not exist in the graph."</p>
</blockquote>