/TensorFlow2ServingDotNet5Client

Implement Tensor Flow 2.0 Serving C# client example with gRPC and Rest. MNIST prediction example and web paint ASP.NET Core 5.0 and ReactJS/Redux application.

Primary LanguageC#MIT LicenseMIT

Tensorflow 2.0 serving .Net Core 5 React/Redux client (GRPC/Rest)

Tensor Flow 2.0 Serving C# client example with gRPC and Rest. There are MNIST CNN prediction model example and ASP.NET Core 5.0 client application with ReactJS/Redux/Typescript front end.

Repository contains the following content:

  • learning - python scripts with MNIST CNN model preparing using Keras and Tensorflow 2.0.
  • ClientBaseLib - base library with TF Serving gRPC generated classes and utils classes to create Tensors on C# .NET Core 5 . (Code compatible with TF 1.0)
  • ASP.NET Core 5.0/ ReactJS/Redux Client - SPA application gRPC/Rest clients for MNIST prediction TensorFlow 2.0 Serving

Environment requirements for running example:

  • Docker
  • Windows 10
  • MSVS 2019
  • VS Code

How to run example

  • Run command promt in root directory in repository
cd src
  • Init TensorFlowServing docker image with code (Required only first time)
init_tensorflow_serving_in_docker.bat
  • Run trained model in TensorFlowServing docker container
start run_all_models_serving_in_docker.bat
  • Build and Run .Net Client Application
start run_client.bat

Available examples

Number prediction example - MNIST, based on simple CNN

.NET Core 5.0 TensorFlow 2.0 Client

Cats and Dogs classification example, based on TensorFlow tutorials and MobileNetV2

CatsAndDogsPredictionClient