469cd0cd4f
* 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 |
||
---|---|---|
.. | ||
Emoji8 | ||
Emoji8.sln | ||
readme.md |
readme.md
Emoji8
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:
- Windows 10 October 2018 Update [1809]
- Visual Studio 2017 (version 15.7.4+) with Windows 10 SDK Build 17763
- A Twitter developer account (if you want to enable the "Share to Twitter" feature)
- A front-facing camera connected to your computer
Steps to run the sample
-
Load the
Emoji8.sln
into Visual Studio. -
(Optional) Enable the "Share to Twitter" feature with the Windows Community Toolkit Twitter Service.
- Register your local sample as a Twitter app.
- Locate and copy your generated Twitter:
- Consumer Key
- Consumer Secret
- Callback URL
- Paste the above credentials in the their corresponding empty Twitter strings in the
Constants.cs
file.
-
(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.
-
Uninstall the
Microsoft.Services.Store.Engagement
NuGet package. -
Remove Microsoft Engagement Framework from the project References.
-
Delete the following 2 lines in the
Constants.cs
file:using Microsoft.Services.Store.Engagement;
public static StoreServicesCustomEventLogger LOGGER = StoreServicesCustomEventLogger.GetDefault();
-
Delete the following line in the
MainPage.xaml.cs
file:Constants.LOGGER.Log(GameText.LOADER.GetString("LoggerStartButtonClicked"));
-
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"));
-
-
Build and run the solution.
-
Enjoy! :)
3rd Party OSS Usage
- WriteableBitmapEx
- Licensed under the MIT license.
Other Legal Stuff
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 Microsoft’s 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.