示例#1
0
 public MainWindow()
 {
     InitializeComponent();
     CurModel            = new Model(this.Dispatcher);
     CurModel.FolderPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.Parent.Parent.FullName + "\\Task1\\Images";
     DataContext         = CurModel;
     ImageRecognitionContext CurDbContext = new ImageRecognitionContext();
 }
示例#2
0
 public Model(Dispatcher curDispatcher)
 {
     CurDispatcher = curDispatcher;
     All           = new ObservableCollection <OutputPrediction>();
     Selected      = new ObservableCollection <OutputPrediction>();
     Number        = new ObservableCollection <OutputNumber>();
     RepeatedCalls = new ObservableCollection <OutputRepeatedCalls>();
     CurDbContext  = new ImageRecognitionContext();
     foreach (string label in classifier.classLabels)
     {
         Number.Add(new OutputNumber {
             Label = label, Number = 0
         });
     }
     Labels             = classifier.classLabels;
     classifier.Result += UpdateResult;
 }