Example #1
0
def main(_):
    opt = {
        "config": YOLO_CONFIG,
        "model": YOLO_MODEL,
        "load": YOLO_WEIGHTS,
        "threshold": YOLO_THRES,
        "imgdir":
        "/home/yitao/Documents/fun-project/tensorflow-related/post-rim/test/test_yolo/inputs/",
        "batch": 8
    }
    tfnet = TFNet(opt)

    channel = grpc.insecure_channel(FLAGS.server)
    stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)

    # image = cv2.imread(FLAGS.image)

    # dets = tfnet.return_predict(image, "traffic_yolo", stub)

    # To-do: modify predict(), since self.sess.run(self.out, feed_dict) should support batch inputs
    tfnet.batch_predict()