You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| v1.1.0 | Dynamic API | up-to-date | Console app | Images and text labels | Images classification | TensorFlow model | DeepLearning model |
6
+
7
+
8
+
## Problem
9
+
The problem is how to run/score a TensorFlow model in a web app/service while using in-memory images.
10
+
11
+
## Solution:
12
+
The model (`model.pb`) is trained using TensorFlow as disscussed in the blogpost [Run with ML.NET C# code a TensorFlow model exported from Azure Cognitive Services Custom Vision](https://devblogs.microsoft.com/cesardelatorre/run-with-ml-net-c-code-a-tensorflow-model-exported-from-azure-cognitive-services-custom-vision/).
13
+
14
+
see the below architecture that shows how to run/score TensorFlow model in ASP.NET Core Razor web app/service
15
+
16
+

17
+
18
+
19
+
The difference between [getting started sample](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started/DeepLearning_ImageClassification_TensorFlow) and this end-to-end sample is that the images are loaded from **file** in getting started sample where as the images are loaded from **in-memory** in this end-to-end sample.
20
+
21
+
**Note:** this sample is trained using Custom images and it predicts the only specific images that are in [TestImages](./TestImages) Folder.
publicImageClassificationController(PredictionEnginePool<ImageInputData,ImageLabelPredictions>predictionEnginePool,IConfigurationconfiguration,ILogger<ImageClassificationController>logger)//When using DI/IoC
list.Add(newImageInputData(){Image=newSystem.Drawing.Bitmap(ImageSettings.imageWidth,ImageSettings.imageHeight)});//Test: Might not need to create the Bitmap.. = null; ?
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20
+
</p>
21
+
<p>
22
+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23
+
It can result in displaying sensitive information from exceptions to end users.
24
+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
0 commit comments