Example of how to use Tensorflow model in .NET Core 2 web app
.NET Core 2 API project that uses TensorflowSharp library in order to run Tensorflow model to recognize objects on uploaded images. For images to test it, pick label from labels file and then put it in Google Image Search. Look into ExampleRequest file for example Postman request.
In case you see the following error:
Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'libtensorflow': The specified module could not be found.
Copy the libtensorflow.dll file from the relevant %userprofile%.nuget\packages\tensorflowsharp runtimes folder of your OS into the same folder as the compiled executable. It is known an issue with TensorflowSharp library.
Code is partly based on examples in TensorFlowSharp repo.