public static async Task <CNTKGraphModel> CreateCNTKGraphModel(StorageFile file) { LearningModelPreview learningModel = await LearningModelPreview.LoadModelFromStorageFileAsync(file); CNTKGraphModel model = new CNTKGraphModel(); model.learningModel = learningModel; return(model); }
protected override async void OnNavigatedTo(NavigationEventArgs e) { //base.OnNavigatedTo(e); var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync( new Uri("ms-appx:///FER-Emotion-Recognition.onnx")); _model = await CNTKGraphModel.CreateCNTKGraphModel(file); await Camera.StartAsync(); Camera.CameraHelper.FrameArrived += CameraHelper_FrameArrived; }