Neural nets that sculpt your game face
A Unity pipeline that turns a photo into game-character sliders via imitation learning, replicating a NetEase research paper without the proprietary engine.

What it does Feed it a photo of a real face and it spits out Unity-compatible “sliders”—the numeric parameters that drive a game engine’s character creator. The project reimplements a NetEase research paper, swapping their in-house “Justice” engine for stock Unity 2019. A neural “imitator” learns to reverse-engineer engine parameters from rendered portraits, so you don’t spend twenty minutes manually tweaking jaw width.
The interesting bit The loss function is a three-headed beast: a standard L2 pixel loss, a LightCNN “discriminative loss” that checks whether the generated face looks like the right person, and a facial-segmentation “content loss” that enforces matching eyebrows, nose shape, etc. It’s essentially style transfer where the “style” is your own bone structure and the “canvas” is a game engine’s parameter space.
Key highlights
- Generates training data automatically: Unity renders up to 10,000 random faces at 512×512, 80/20 train/test split, with optional noise injection
- Face alignment via dlib (68 landmarks), identity verification via LightCNN-29, segmentation via BiSeNet (not the paper’s ResNet50)
- Training checkpoints every 500 steps, live preview every 100 steps via TensorBoard
- Outputs a binary
.bytesfile that Unity ingests directly—no manual transcription - Pretrained models and video demos hosted on Baidu Yun and YouTube/Bilibili
Caveats
- Setup is a scavenger hunt: dlib models, LightCNN weights, and BiSeNet checkpoints live on scattered external links (Google Drive, Baidu Yun, Weiyun)
- README is in Chinese; English speakers will need translation or tolerance
- Dependencies are pinned to 2019-era versions (Python 3.5, torch 1.1.0, Unity 2019.2.1f1)
- No mention of inference speed, GPU requirements, or how well it generalizes across different base face meshes
Verdict Worth a look if you’re building character creators and want a concrete, open-ish baseline to iterate from. Skip it if you need a polished, drop-in SDK—this is a research reproduction with rough edges and a lot of manual assembly.