forked from dotnet/machinelearning-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
32 lines (28 loc) · 954 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.IO;
using System.Threading.Tasks;
using ImageClassification.Model;
using static ImageClassification.Model.ConsoleHelpers;
namespace ImageClassification.Predict
{
class Program
{
static async Task Main(string[] args)
{
var assetsPath = ModelHelpers.GetAssetsPath(@"..\..\..\assets");
var tagsTsv = Path.Combine(assetsPath, "inputs", "data", "tags.tsv");
var imagesFolder = Path.Combine(assetsPath, "inputs", "data");
var imageClassifierZip = Path.Combine(assetsPath, "inputs", "imageClassifier.zip");
try
{
var modelScorer = new ModelScorer(tagsTsv, imagesFolder, imageClassifierZip);
modelScorer.ClassifyImages();
}
catch (Exception ex)
{
ConsoleWriteException(ex.Message);
}
ConsolePressAnyKey();
}
}
}