Cloud User Manager

Cloud User Manager is premium extension of the ‘Cloud Face Detection‘-package. It demonstrates simple to use face & emotion-detection, as well as user-management based on cloud face detection. You can reuse all components and scripts in your Unity projects.

Apart from the face detection and user recognition, you can also find additional information about the users, like their gender, age, smile or emotional status. This way you may tweak the game at run-time accordingly, for optimal user experience. For your convenience, the package includes a tool for back-office group & user management. This package uses Azure cognitive services for face detection and recognition. The package can be used in both Unity Pro and Unity Personal editors.

Free for education:
The package is free for academic use (i.e. in schools, colleges and universities, by students, teachers or researchers). If you match this criterion, please e-mail me to get the CloudUserManager-asset directly from me.

How to run the Face/Emotion Detection and User-Management Demos:
For instructions on how to run the demos, see the ‘Readme-User-Manager.pdf’ file in the package.

* The official release of ‘Cloud User Manager’-package is available at Unity Asset Store.

What’s new in version 1.2:
1. Updated the user selection scene to utilize the new Unity UI system.
2. Updated the face & emotion detection scene to utilize the new Unity UI system.
3. Upgraded the user recognition demo to two-scene demo, i.e. user login and game scene.
4. Renamed FaceManager-component to CloudFaceManager and UserManager-component to CloudUserManager, to avoid interference with similarly named components.
5. Improved the cloud face manager and cloud user manager, to work in non-blocking mode.
6. Removed the package reference to the external Newtonsoft Json library.
7. Updated the package to work with Unity 5.3 and the internal JsonUtility-class.



16 thoughts on “Cloud User Manager

  1. I have this problem: “Assets/DemoScenes/Scripts/FaceDetection.cs(110,35): error CS0103: The name `UnityEditor’ does not exist in the current context” Why?? thanks

    • There is no UnityEditor-functionality in the exe. To fix it, replace this line:
      ‘string filePath = UnityEditor.EditorUtility.OpenFilePanel(“Open image file”, “”, “jpg”);’
      with this:

      #if UNITY_EDITOR
      string filePath = UnityEditor.EditorUtility.OpenFilePanel(“Open image file”, “”, “jpg”);
      string filePath = string.Empty;

      • Oh Good!! thank. Sorry, but now i have a new problem! “Assets/DemoScenes/Scripts/FaceDetection.cs(138,15): error CS1525: Unexpected symbol `private'”
        in the point : 138) private IEnumerator DoFaceDetection()

        Thank you very much

      • Look, if you added an extra {, } or another symbol, while copying the previous code. This is a simple syntax error. Just look more carefully at the code in front of you. I just can’t see it or do anything more for you remotely.

  2. Hello, Exception: Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key.

    How can i solve this problem ?

    • Hi, I think the exception is self-explaining 🙂 Have you got your own subscription key for Azure Cognitive Services, or use the one in the demo scenes? It may become invalid in the meanwhile.

  3. Hello, You did a nice asset. I have some poblems. I created my Azure account and got a couple of keys, but I was not able to find the emotion API. So I used the same key in both keys in the cloud face manage script. It seems to work fine but I get an error in the console. Maybe I set up something wrong. Here is a copy of the error I get
    Exception: 404 – Resource not found
    CloudFaceManager.ProcessFaceError (System.Net.HttpWebResponse response) (at Assets/CloudUserManager/CloudFaceScripts/CloudFaceManager.cs:845)
    CloudFaceManager.RecognizeEmotions (System.Byte[] imageBytes, .FaceRectangle[] faceRects) (at Assets/CloudUserManager/CloudFaceScripts/CloudFaceManager.cs:208)
    CloudFaceDetector+c__Iterator0+c__AnonStorey3.m__0 () (at Assets/CloudUserManager/DemoScenes/Scripts/CloudFaceDetector.cs:157)
    AsyncTask`1[Emotion[]].DoInBackground () (at Assets/CloudUserManager/CloudFaceScripts/AsyncTask.cs:43)
    AsyncTask`1:DoInBackground() (at Assets/CloudUserManager/CloudFaceScripts/AsyncTask.cs:55)
    AsyncTask`1:m__0(Object) (at Assets/CloudUserManager/CloudFaceScripts/AsyncTask.cs:31)

    • Hi, the error happens when recognizing emotions by using the same server and subscription key. Please mind the emotion recognition can only be done by the ‘westus’ Azure-location, according to the Azure API reference. So, please set ‘westus’ as ‘Emotion service location’ and provide the respective key, or clear ‘Emotion subscription key’, if you don’t really need emotion recognition along with the face detection.

  4. Thanks for the great asset! I’m trying to run the user recognition demo but I am getting this error when I click on the upper left webcam feed: How can I train the Person Group?
    Exception: PersonGroupNotTrained – Person group not trained.
    CloudFaceManager.ProcessFaceError (System.Net.HttpWebResponse response) (at Assets/CloudUserManager/CloudFaceScripts/CloudFaceManager.cs:834)
    CloudFaceManager.GetPersonGroupTrainingStatus (System.String groupId) (at Assets/CloudUserManager/CloudFaceScripts/CloudFaceManager.cs:715)
    CloudUserManager.IdentifyUsers (System.Byte[] imageBytes, Face[]& faces, IdentifyResult[]& results) (at Assets/CloudUserManager/CloudFaceScripts/CloudUserManager.cs:225)
    CloudUserRecognizer+c__DisplayClass18_1.b__0 () (at Assets/CloudUserManager/DemoScenes/Scripts/CloudUserRecognizer.cs:149)
    AsyncTask`1[T].DoInBackground () (at Assets/CloudUserManager/CloudFaceScripts/AsyncTask.cs:43)
    AsyncTask`1:DoInBackground() (at Assets/CloudUserManager/CloudFaceScripts/AsyncTask.cs:55)
    AsyncTask`1:b__16_0(Object) (at Assets/CloudUserManager/CloudFaceScripts/AsyncTask.cs:31)

    I am using Unity 2018.3.


    • Hi and sorry for the late response! As far as I remember, you must first run the CloudGroupManager-scene in GroupManager-folder, to train the group you’re going to use later in the user-recognition demo scene.

    • Please debug a bit, to see what string gets returned by the server. This may give you some idea what value exactly is treated as invalid by the JSON parser later.

Leave a Reply to Rumen F. Cancel reply