Created
January 28, 2019 02:13
-
-
Save elbruno/6ff51a14f71113944dc850a9c9374707 to your computer and use it in GitHub Desktop.
CVOnnxFps.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Stopwatch _stopwatch; | |
private async Task LoadAndEvaluateModelAsync(VideoFrame videoFrame) | |
{ | |
_stopwatch = Stopwatch.StartNew(); | |
_predictions = await _objectDetection.PredictImageAsync(videoFrame); | |
_stopwatch.Stop(); | |
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => | |
{ | |
var message = $"{DateTime.Now.ToLongTimeString()} - {1000f / _stopwatch.ElapsedMilliseconds,4:f1} fps"; | |
TextBlockResults.Text = message; DrawFrames(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment