Windows-Machine-Learning/Samples/Emoji8/UWP/cs
Xiang Zhang 469cd0cd4f
User/xianz/update sample 2 (#309)
* change output directory for AdapterSelection Sample

* change output directory for Custom Operator Sample

* change output directory for SqueezeNetObjectDetection Sample

* Update test certificate for Emoji8 Sample

* Update test certificate for MNIST_Demo Sample

* Update test certificate for MNIST_Demo Sample

* Update test certificate for FNSCandyStyleTransfer Sample

* Update test certificate for SqueezeNetObjectDetection Sample

* Update azure-pipelines-samples.yml for Azure Pipelines

Check whether OS 18362 exists

* check if OS18362 exists

* revert relu_shader.h change

* rename artifacts

* temporary disabled build for squeezenet sample
2020-04-14 00:46:05 -07:00
..
Emoji8 User/xianz/update sample 2 (#309) 2020-04-14 00:46:05 -07:00
Emoji8.sln User/orilevari/normalize samples build flavors (#243) 2019-06-12 15:57:18 -07:00
readme.md Update readme.md 2020-01-16 10:23:34 -08:00

readme.md

Emoji8

Emoji8 logo

Overview

This sample shows you how you can use Windows Machine Learning to power a fun emotion-detecting application.

Emoji8 is sample UWP application that evaluates your facial expressions while you imitate a random selection of emojis. The app takes in a video feed from your computer's webcam and evaluates the images with the FER+ Emotion Recognition model (version 1.2) locally on your machine. You can tweet a gif summarizing your best scoring pics when you have an internet connection and continue playing even when you don't have one!

This app will give you a great end-to-end example of how you can use the Windows ML APIs to create simple yet magical experiences.

Assumptions

This sample assumes you have the following installed/established:

  1. Windows 10 October 2018 Update [1809]
  2. Visual Studio 2017 (version 15.7.4+) with Windows 10 SDK Build 17763
  3. A Twitter developer account (if you want to enable the "Share to Twitter" feature)
  4. A front-facing camera connected to your computer

Steps to run the sample

  1. Load the Emoji8.sln into Visual Studio.

  2. (Optional) Enable the "Share to Twitter" feature with the Windows Community Toolkit Twitter Service.

    1. Register your local sample as a Twitter app.
    2. Locate and copy your generated Twitter:
      • Consumer Key
      • Consumer Secret
      • Callback URL
    3. Paste the above credentials in the their corresponding empty Twitter strings in the Constants.cs file.
  3. (Optional) Remove the Dev Center logging. This non-personal data is only successfully transmitted when playing a Store-published version of the app, so running this OSS code locally will not actually collect any data.

    1. Uninstall the Microsoft.Services.Store.Engagement NuGet package.

    2. Remove Microsoft Engagement Framework from the project References.

    3. Delete the following 2 lines in the Constants.cs file:

      using Microsoft.Services.Store.Engagement;
      
      public static StoreServicesCustomEventLogger LOGGER = StoreServicesCustomEventLogger.GetDefault();
      
    4. Delete the following line in the MainPage.xaml.cs file:

      Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerStartButtonClicked"));
      
    5. Lastly, delete the following 7 lines in the ResultsPage.xaml.cs file:

      Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerPlayAgainClicked"));
      
      Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerShareToTwitterClicked"));
      
      Constants.LOGGER.Log($"{GameText.LOADER.GetString("LoggerShareToTwitterError")} {ex.Message}");
      
      Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerContinuePostingYesClicked"));
      
      Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerContinuePostingNoClicked"));
      
      Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerPostTweetCancelClicked"));
      
      Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerPostTweetClicked"));
      
  4. Build and run the solution.

  5. Enjoy! :)

3rd Party OSS Usage

Data Collection

The software may collect information about you and your use of the software, and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in Step 3 of "Steps to run the sample" above. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsofts privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.