Coder Social home page Coder Social logo

l4es / tf-serving-client-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrew-k-21-12/tf-serving-client-cpp

0.0 0.0 0.0 29 KB

An example of TensorFlow Serving client to send images for prediction (using C++ and CMake)

CMake 7.58% C++ 5.46% Protocol Buffer 86.96%

tf-serving-client-cpp's Introduction

This project is a kind of boilerplate to be used to get acquainted with a process of TensorFlow Serving client development using C++ as a programming language and CMake as a build system.

PREREQUISITES

To use a TensorFlow Serving client provided in this project you should install next dependencies:

  • Protocol Buffers (https://github.com/google/protobuf/tree/master/src):

    • sudo apt-get install autoconf automake libtool curl make g++ unzip
    • git clone https://github.com/google/protobuf
    • cd protobuf
    • ./autogen.sh
    • ./configure && make && make check && sudo make install && sudo ldconfig
  • gRPC (https://github.com/grpc/grpc/tree/master/src/cpp):

    • sudo apt-get install build-essential autoconf libtool
    • git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
    • cd grpc
    • git submodule update --init
    • make
    • sudo make install
  • OpenCV (http://opencv.org/), there are a lot of ways of the installation are available.

COMPILATION AND USAGE

Before the compilation make sure that you have provided some host with a running TensorFlow Serving model in the main.cpp file.

The compilation is quite similar to ones which use CMake system. But make sure to provide a path to the installed Protobuf Compiler using Protobuf_PROTOC_EXECUTABLE for it. For example you can use a bunch of commands (from the root of the repo):

mkdir build && cd build && cmake -D Protobuf_PROTOC_EXECUTABLE=/usr/local/bin/protoc .. && make

A built executable accepts one argument with a path to an image to be sent to the server:

./tf-serving-client-cpp test.jpg

tf-serving-client-cpp's People

Contributors

andrew-k-21-12 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.