Skip to content

Emotionally responsive Virtual Metahuman CV with Real-Time User Facial Emotion Detection (Unreal Engine 5).

License

Notifications You must be signed in to change notification settings

Prem-ium/Metahuman-Emotion-Recognition

Repository files navigation

🧠💻 Real-Time Emotion Recognition Metahuman 🧠💻

Creating real-time facial and emotion recognition software to pair with Unreal Engine 5 Metahuman to predict and mimic user emotions.

Github Sponsor

Our objective is to develop a 3D Virtual Human (3DVH) prototype that can mirror a user’s emotional reaction. The user emotional reaction is captured using a computer vision-based technique and a camera system. The virtual human will mimic user emotions in real-time.

Contributors 🎓

  • Python Scripting: Prem Patel (@Prem-ium)
  • Unreal Engine Integration: Gabe Vindas (@GabeV95) & Dustin Lynn (@Onemorehell)
  • Emotion Animations in Unreal Engine: Matthew Goetz

Supported Emotions 😃:

  • Anger 😡
  • Fear 😨
  • Happy 😄
  • Neutral 😐
  • Sad 😢
  • Surprised 😲

Our Virtual Humans 🎭

image They're terrifying, we know.

Example Results 🎯

image (Showcasing Happy & Surprised)

Features 🔑

  • Emotion Recognition
  • Age & Gender Prediction
  • Enviornmental Variables Customization
  • Headless mode
  • Flexible Emotion Selection: Choose between the most common emotion every X captured emotions or the latest emotion.

Installation Process & Setup Process ⚙️️

Run locally:

  1. Clone this repository, cd into it, and install dependancies:
   git clone https://github.com/Prem-ium/Metahuman-Emotion-Recognition.git
   cd EmotionDetection
   pip install -r requirements.txt
  1. Configure your .env file (See below and example for options)
  2. Run the main script:
   python emotional-detection-main.py
  1. Open Unreal Engine Project & Run the Blueprint
  2. Click the button to trigger the text reader to process the most common emotion recorded.
  3. The Metahuman mimics the user's most common emotion.
  4. Repeat Steps 5-6 until desired termination

Enviornmental Variables 🛠️

Configure your variables in a .env file within the same directory. All .env variables are optional and have default values if not specified.

Variable Description Default Value
HEADLESS True or False. Whether to open a GUI for testing webcam accuracy. True
PRODUCTION True or False. Whether the program is running in Unreal Engine. False
DELAY Integer value of how many seconds the program will wait before starting the next iteration -
FILE_PATH Path of directory containing the model and weights -
WEIGHTS Name of the model being used -

Need Help? 🤔

I regret to inform you that I'm currently unable to respond to any issues for this repository. I have disabled the ability to start an issue in this repository. Please refrain from contacting me regarding any issues at this time.

Donations 🎁

GitHub Sponsor Buy Me A Coffee

License

MIT