public static async Task <CNTKGraphModel> CreateCNTKGraphModel(StorageFile file)
        {
            LearningModelPreview learningModel = await LearningModelPreview.LoadModelFromStorageFileAsync(file);

            CNTKGraphModel model = new CNTKGraphModel();

            model.learningModel = learningModel;
            return(model);
        }
Exemplo n.º 2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///FER-Emotion-Recognition.onnx"));

            model = await CNTKGraphModel.CreateCNTKGraphModel(file);

            await Camera.StartAsync();

            Camera.CameraHelper.FrameArrived += CameraHelper_FrameArrived;

            base.OnNavigatedTo(e);
        }