private async Task LoadFaceDetectionModelAsync() { //Load a machine learning model StorageFile modelFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/Models/version-RFB-320.onnx")); rfbModelGen = await RfbModel.CreateFromStreamAsync(modelFile as IRandomAccessStreamReference); }
public static async Task <RfbModel> CreateFromStreamAsync(IRandomAccessStreamReference stream) { RfbModel learningModel = new RfbModel(); learningModel.model = await LearningModel.LoadFromStreamAsync(stream); learningModel.session = new LearningModelSession(learningModel.model); learningModel.binding = new LearningModelBinding(learningModel.session); return(learningModel); }