Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Can you use Barracuda for Electrocardiagram (ECG) based emotion detection

Discussion in 'Barracuda' started by James_Adey, Aug 19, 2021.

  1. James_Adey

    James_Adey

    Joined:
    Jul 4, 2018
    Posts:
    19
    Hi,
    I am a masters student currently doing my project. I have trained a neural network with ECG data to try and predict emotion. I have also made a small FPS game in Unity and I am wanting to try and use my neural network to predict the players emotion. Upon predicting this emotion, my hopes is that i can create a script which will alter the difficulty of the FPS game. For example, if the neural network thinks that the player is getting stressed, it will change the difficulty to easy. The opposite would then be done if the AI thinks the game needs to be harder for the player.

    I was wondering if Barracuda is capable of doing this as the only work I have seen by others involes emotion detection with images and video rather than ECG data.

    Any help or advice would be appreciated!
     
  2. alexandreribard_unity

    alexandreribard_unity

    Unity Technologies

    Joined:
    Sep 18, 2019
    Posts:
    52
    James_Adey likes this.
  3. James_Adey

    James_Adey

    Joined:
    Jul 4, 2018
    Posts:
    19
    That's great thanks! I tried adding my model to Unity but I get 3 errors come up (see attached image). The model I have got is not the final one i will be using but i thought I would saved and export it just to try and set up everything I need. I appreciate the help!

    Also, how would I send you my ONNX exported model as this thread does not allow me to upload.

    Thanks,
    James
     

    Attached Files:

  4. alexandreribard_unity

    alexandreribard_unity

    Unity Technologies

    Joined:
    Sep 18, 2019
    Posts:
    52
    Usually people upload their model on a drive.
    Or you can zip it and send it to us at barracuda-support@unity3d.com

    Let me know what works best for you
     
    James_Adey likes this.
  5. James_Adey

    James_Adey

    Joined:
    Jul 4, 2018
    Posts:
    19
  6. amirebrahimi_unity

    amirebrahimi_unity

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    400
    Hi @James_Adey,

    I took a look at your model and it imports correctly for me. My guess is that you are on an older version of Barracuda? Could you try updating to the latest preview version and see if it imports correctly?

    https://docs.unity3d.com/Packages/com.unity.barracuda@2.1/manual/Installing.html

    There are notes in there for the different Unity versions, so you may have to make some manual adjustments to your `manifest.json` file to update to the latest version.

    -Amir
     
    James_Adey likes this.
  7. James_Adey

    James_Adey

    Joined:
    Jul 4, 2018
    Posts:
    19
    thank you i will take a look! I did not have the latest preview package so hopefully that fixes things
     
    Last edited: Aug 24, 2021
unityunity