Implement Face Emotion/Gender/Age/Ethnical Detection into Unreal Engine

I am new in Unreal Engine and Machine Learning.
I want to know if it is possible to implement Face detection modules like emotion/gender/Age/Race detection into Unreal Engine.
There are different modules out there working for example with tensorflow to detect those things and I would like to know if I can use this in realtime.

For example:
I have a male character in the game. While playing / watching I want the machine to detect the person infront of the screen and based on this exchange the mesh. For example if there is a women playing I want the character to become female.

I saw something similar for Unity3D:
Or maybe as a work around:
Can I import some variables from outside of the Engine into the running game. So I have separately running the game and my detection and I import the variable from the Machine Learning module into the game while it is running.

Thank you for your help.