public async Task <CNTKGraphModelOutput> EvaluateAsync(CNTKGraphModelInput input) { CNTKGraphModelOutput output = new CNTKGraphModelOutput(); LearningModelBindingPreview binding = new LearningModelBindingPreview(learningModel); binding.Bind("Input338", input.Input338); binding.Bind("Plus692_Output_0", output.Plus692_Output_0); LearningModelEvaluationResultPreview evalResult = await learningModel.EvaluateAsync(binding, string.Empty); return(output); }
private async void CameraHelper_FrameArrived(object sender, FrameEventArgs e) { try { var input = new CNTKGraphModelInput { Input338 = e.VideoFrame }; var output = await model.EvaluateAsync(input); await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { var emotions = Emotion.CreateEmotionList(output.Plus692_Output_0); Results.ItemsSource = emotions; }); } catch { } }