Code Monkey home page Code Monkey logo

custom-vision-onnx-uwp's Introduction

Use an ONNX file exported from the Custom Vision Service with Windows ML

This example demonstrates how to take an ONNX file that was exported from the Cognitive Services Custom Vision service, and use it in a UWP application. Specifically, this example demonstrates how to use the camera on a Windows 10 device as the image source for the model.

IMPORTANT: This example requires Windows 10 build 17738 or higher, along with the matching Windows 10 SDK.

Features

  • Displays a preview of what the camera sees.
  • Displays the tags and score returned from the model.

Getting Started

Prerequisites

Quickstart

(Add steps to get up and running quickly)

  1. git clone https://github.com/Azure-Samples/Custom-Vision-ONNX-UWP
  2. Open the VisionApp.sln file using Visual Studio.
  3. Use F5 to build and run the application.
  4. Point the camera at a dog or cat (or a picture of one). The score below the preview shows whether the model thinks that a dog or cat is in the scene. A label of "Negative" indicates that no dog or cat is in the image.

See also

https://github.com/Azure-Samples/cognitive-services-onnx12-customvision-sample/

custom-vision-onnx-uwp's People

Contributors

blackmist avatar microsoftopensource avatar msftgits avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

custom-vision-onnx-uwp's Issues

'Windows.AI.MachineLearning.Preview.LearningModelPreview' is not registered.'

I'm experiencing the issue in execution of this sample.


This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [x] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Just download and try to execute, you will face this error.

Any log messages given by the failure

System.TypeLoadException: 'Requested Windows Runtime type 'Windows.AI.MachineLearning.Preview.LearningModelPreview' is not registered.'

Expected/desired behavior

It should work fine.

OS and Version?

Windows 10 1709, 16299.492

Versions

SDK 10.0.17134.0

Mention any other details that might be useful

I am running the most updated SDK of UWP and I am not sure why it's not working.

Error when running this sample for the first time: System.NullReferenceException

###This issue is for a:

- [x] bug report 
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

clone the repo, load the project in Visual Studio, click F5 to run, the error is immediately thrown in VS

Any log messages given by the failure

Line 128: Exception User-Unhandled "System.NullReferenceException: 'Object reference not set to an instance of an object.'"
The evalOutput object is Null.

**Also, receives a warning: "The certificate specified is not valid for signing..." "Certificate file 'VisionApp_TemporaryKey.pfx' not found'".

Expected/desired behavior

App launches and opens camera for taking photos to test Custom Vision identification.

OS and Version?

Windows 10 with October Update on a Surface Book

Versions

Windows 10 v.1809, build 17758.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.