Search Unity

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:
    53
    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:
    53
    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

    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