Windows-Machine-Learning/Samples/Emoji8/UWP/cs
Killian McCoy 2473882dc8 User/kimccoy/emoji8readme (#87)
* added Emoji8 source code to Samples folder

* simplified session object creation in the IntelligenceService

* added default values and modified countdown if statement

* added aka.ms links and logo to readme

* Update readme.md
2018-11-09 09:39:05 -08:00
..
Emoji8 User/kimccoy/emoji8readme (#87) 2018-11-09 09:39:05 -08:00
Emoji8.sln Added Emoji8 source code to Samples folder (#81) 2018-11-07 16:42:43 -08:00
readme.md User/kimccoy/emoji8readme (#87) 2018-11-09 09:39:05 -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 available in the Store 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.