Fineface
Towards Localized Fine-Grained Control for Facial Expression Generation
Install / Use
/learn @tvaranka/FinefaceREADME
FineFace
<b>Towards Localized Fine-Grained Control for Facial Expression Generation</b>
<a href='https://arxiv.org/abs/2407.20175'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a>

Environment setup
conda create -n fineface python=3.11
conda activate fineface
pip install -r requirements.txt
Running inference
Commandline:
Change prompt and AUs from the demo.py file
python demo.py
With python using diffusers
from fineface import FineFacePipeline
pipe = FineFacePipeline()
prompt = "a closeup of a boy in a park"
aus = {"AU1": 2.5, "AU6": 2.5, "AU12": 5}
image = pipe(prompt, aus).images[0]
AU + IP-Adapter Pipeline
from fineface import FineFaceIPAdapterPipeline
pipe = FineFaceIPAdapterPipeline()
faceid_embeds = torch.load("path_to_face_embeds.pt")
prompt = "a man as dark hooded emperor"
aus = {"AU4": 5, "AU6": 3}
image = pipe(prompt, aus, faceid_embeds, au_scale=1.0, ip_scale=0.9)
Training
- Download DISFA and AffectNet datasets from their respesctive websites.
- Download the affecnet_metadata.csv and disfa_captions.csv from here.
- Modify the dataset paths in the
train.shscript and run.
What are Action Units (AUs)?
- Action Units are movements of facial muscles that are identified and used to break down facial expressions, like raising inner eyebrows (AU1).
- By mixing different AUs, it is possible to create complex facial expressions, with each AU adding its own unique intensity.
- See below for a quick overview.

For a more comprehensive understanding, see GIFs and images of each AU from https://melindaozel.com/facs-cheat-sheet/.
Citation
@varanka{varanka2024fineface,
title={Towards Localized Fine-Grained Control for Facial Expression Generation},
author={Tuomas Varanka and Huai-Qian Khor and Yante Li and Mengting Wei and Hanwei Kung and Nicu Sebe and Guoying Zhao},
year={2024},
eprint={2407.20175},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2407.20175},
}
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
