Cognitive Toolkit Model Evaluation in UWP

  1. Brink's Avatar
    Posts : 35,226
    64-bit Windows 10 Pro build 18312
       31 Aug 2017 #1

    Cognitive Toolkit Model Evaluation in UWP

    We are excited the share with you that Microsoft Cognitive Toolkit (CNTK) 2.1 has added support for model evaluation on UWP applications. This means you can harness the power of deep learning in your Windows apps delivered via the Windows Store! Read on to find out how can infuse your apps with the power of AI.

    The Virtuous Intelligence Cycle

    Cloud-connected devices can perform operations locally or delegate them to the cloud. The virtually unlimited compute power of the cloud makes it a good choice for running tasks that need significant compute power but don’t require low latency. In machine learning, model training is an example of such a task. It might require hours or days to train a model, but once the model is trained, deploying it closer to where the data is generated has some very useful properties. First, it reduces the roundtrip latency inherently unavoidable in cloud communication. This is critical for time-sensitive deep learning scenarios like self-driving cars and industrial equipment failure detection. Second, it can unlock insights from data that were previously discarded due to network transmission costs. And finally, it allows machine learning solutions in scenarios with intermittent network connectivity like search & rescue, agriculture and others.

    We refer to devices with non-trivial compute power that are in closer proximity to the data source as “intelligent edge” devices. Intelligent edge devices can vary broadly depending on scenario as shown in the figure below.

    In the virtuous intelligence cycle, deep learning models trained in the cloud are deployed and evaluated at the edge. Additionally, the edge feeds valuable data back to the cloud where the models are improved and redeployed to the edge, hence completing the virtuous cycle.

    The improvements described in this post allow UWP applications to be part of the intelligent edge where deep learning models can be evaluated.

    Image Classification Example

    Let’s look at an example where an image classification machine learning model is built into an UWP application. The app allows you to pick a CNTK compatible model to perform image classification on an image. Several pre-trained models to use for this purpose are available at this link.

    The code for the entire solution is available in the CNTK Github repo.

    Currently, only C++ CNTK UWP bindings are supported. However, the sample demonstrates how a C# based UWP solution can perform model evaluation by referencing a WinRT library that wraps the UWP-compatible CNTK native components available on NuGet.

    packages.config specifies the NuGet packages the library uses, and points to the UWP-compatible package:

    <?xml version="1.0" encoding="utf-8"?>
    <package id="CNTK.UWP.CPUOnly" version="2.1.0" targetFramework="native" />

    This NuGet package provides UWP-compatible CNTK components, including the OpenBLAS math library, for CPU-based model evaluation. ImageRecognizerLib exposes Create and RecognizeObjectAsync methods used to load the pre-trained CNTK model and classify the specified image input as an array of bytes.

    The rest of the solution is a few simple XAML UI elements to accept input from the user. Here is a quick animation of the app in action:

    Now it’s your turn!

    We’ve demonstrated how you can use the newly added UWP support in CNTK to bring the next level of intelligence to your Windows applications. We can’t wait to see the awesome apps you will build with this exciting new technology!

    Source: Cognitive Toolkit Model Evaluation in UWP - Building Apps for Windows
      My ComputersSystem Spec

  2. Josey Wales's Avatar
    Posts : 17,365
    Win 10 RS5 64 Bit
       31 Aug 2017 #1

    Artificial Intelligence (AI) is just around the corner..
      My ComputerSystem Spec


Related Threads
Read more:
Read more: Microsoft to make more Cognitive Services tools available to developers | ZDNet
ESD Toolkit in Software and Apps
ESD Toolkit - a tool for use with the ESD files Features: Converting ESD in ISO Getting information about ESD file ESD editing files (under development) Creating a bootable USB drive Automatically download new crypto Batch files
MSMG ToolKit in Software and Apps
Hi Guys, what do we think about this program ? I discory him in forum my digital life.. is a hack ?
VR-Holo HoloLens Interaction Model in Windows 10 News
Source: HoloLens Interaction Model | Building Apps for Windows
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:53.
Find Us