Created
April 10, 2018 06:26
-
-
Save Davidnet/98dcdce9cdd87a5222c90677c51fc4c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import cv2 | |
import objectdetection | |
config = tf.ConfigProto() | |
config.gpu_options.allow_growth = True | |
with tf.Session(config=config) as sess: | |
detector = objectdetection.ObjectDetection('ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.pb', session=sess) | |
cam = cv2.VideoCapture(0) | |
while True: | |
ret_val, img = cam.read() | |
print(detector.predict([img])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment