Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageClassificationTestProject", "ProjectBangaloreNugetTest\ImageClassificationTestProject.csproj", "{E99D1A06-2477-4A98-A227-3485C79F25F3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageClassificationTestProject", "ImageClassificationTestProject\ImageClassificationTestProject.csproj", "{E99D1A06-2477-4A98-A227-3485C79F25F3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<ProjectGuid>{E99D1A06-2477-4A98-A227-3485C79F25F3}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProjectBangaloreNugetTest</RootNamespace>
<AssemblyName>ProjectBangaloreNugetTest</AssemblyName>
<RootNamespace>ImageClassificationTest</RootNamespace>
<AssemblyName>ImageClassificationTest</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,17 @@ private async void ButtonRun_Click(object sender, RoutedEventArgs e)


//Call ClassifyImage to get image classes
List<ClassificationResult> list = await SqueezeNetImageClassifier.ClassifyImage(selectedStorageFile, 3);

//Display Image and result
ResultsBlock.Text = "1st guess: " + list[0].category + "\nwith confidence: " + list[0].confidence + " \n\n\n2nd guess: " + list[1].category + "\nwith confidence: " + list[1].confidence + " \n\n\n3rd guess: " + list[2].category + "\nwith confidence: " + list[2].confidence;
await DisplayImage(selectedStorageFile);

if (selectedStorageFile != null)
{
List<ClassificationResult> list = await SqueezeNetImageClassifier.ClassifyImage(selectedStorageFile, 3);
//Display Image and result
ResultsBlock.Text = "1st guess: " + list[0].category + "\nwith confidence: " + list[0].confidence + " \n\n\n2nd guess: " + list[1].category + "\nwith confidence: " + list[1].confidence + " \n\n\n3rd guess: " + list[2].category + "\nwith confidence: " + list[2].confidence;
await DisplayImage(selectedStorageFile);
}
else
{
ResultsBlock.Text = "Select a file";
}
}

private async Task DisplayImage(StorageFile selectedStorageFile)
Expand Down