Skip to content

Commit 522fbdb

Browse files
authored
Minor edits to the DeepLearning Binary classification sample (#868)
* Minor edits to the DeepLearning Binary classification sample * Add necessary library for when running on net core 2.1
1 parent c3d984e commit 522fbdb

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

samples/csharp/getting-started/DeepLearning_ImageClassification_Binary/DeepLearning_ImageClassification/DeepLearning_ImageClassification.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="$(MicrosoftMLVersion)" />
1111
<PackageReference Include="Microsoft.ML.Vision" Version="$(MicrosoftMLVersion)" />
1212
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.3.0" />
13+
<PackageReference Condition="'$(TargetFramework)'=='netcoreapp2.1'" Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
1314
</ItemGroup>
1415

1516
<ItemGroup>

samples/csharp/getting-started/DeepLearning_ImageClassification_Binary/DeepLearning_ImageClassification/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ static void Main(string[] args)
5353
MetricsCallback = (metrics) => Console.WriteLine(metrics),
5454
TestOnTrainSet = false,
5555
ReuseTrainSetBottleneckCachedValues = true,
56-
ReuseValidationSetBottleneckCachedValues = true,
57-
WorkspacePath=workspaceRelativePath
56+
ReuseValidationSetBottleneckCachedValues = true
5857
};
5958

6059
var trainingPipeline = mlContext.MulticlassClassification.Trainers.ImageClassification(classifierOptions)

samples/csharp/getting-started/DeepLearning_ImageClassification_Binary/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ products:
1919

2020
For a detailed explanation of how to build this application, see the accompanying [tutorial](https://docs.microsoft.com/en-us/dotnet/machine-learning/tutorials/image-classification-api-transfer-learning) on the Microsoft Docs site.
2121

22+
This sample may be downloaded and built directly. However, for a succesful run, you **must** first unzip *assets.zip* in the project directory, and copy its subdirectories into the *assets* directory.
23+
2224
## Understanding the problem
2325

2426
Image classification is a computer vision problem. Image classification takes an image as input and categorizes it into a prescribed class. This sample shows a .NET Core console application that trains a custom deep learning model using transfer learning, a pretrained image classification TensorFlow model and the ML.NET Image Classification API to classify images of concrete surfaces into one of two categories, cracked or uncracked.

0 commit comments

Comments
 (0)