Skip to content

Instantly share code, notes, and snippets.

@f-rumblefish
Last active October 23, 2018 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f-rumblefish/abd3bd31c0dae7e1a3b6fc49da0f8d51 to your computer and use it in GitHub Desktop.
Save f-rumblefish/abd3bd31c0dae7e1a3b6fc49da0f8d51 to your computer and use it in GitHub Desktop.
Object Detection via SSD/MobileNet
pb = 'frozen_inference_graph.pb'
pbt = 'ssd_mobilenet_v1_coco_2017_11_17.pbtxt'
Net_SSD = cv.dnn.readNetFromTensorflow(pb,pbt)
Net_SSD.setInput(cv.dnn.blobFromImage(img, 1.0/127.5, (300, 300), (127.5, 127.5, 127.5), swapRB = True, crop = False))
Net_SSD_pred = Net_SSD.forward()
print(">>> SSD/MobileNet prediction shape = ", Net_SSD_pred.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment