Skip to content

Instantly share code, notes, and snippets.

@WuStangDan
Created October 24, 2017 23:43
Show Gist options
  • Save WuStangDan/b2dad5039441030128fca271a694dbb4 to your computer and use it in GitHub Desktop.
Save WuStangDan/b2dad5039441030128fca271a694dbb4 to your computer and use it in GitHub Desktop.
def get_classification(self, img):
# Bounding Box Detection.
with self.detection_graph.as_default():
# Expand dimension since the model expects image to have shape [1, None, None, 3].
img_expanded = np.expand_dims(img, axis=0)
(boxes, scores, classes, num) = self.sess.run(
[self.d_boxes, self.d_scores, self.d_classes, self.num_d],
feed_dict={self.image_tensor: img_expanded})
return boxes, scores, classes, num
@munichpavel
Copy link

Thank you very much for your Medium post, which is where I found this Gist. Could you please clarify which license applies to your Gist(s)? MIT?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment