This project is the official implementation of the paper "Hierarchical Causal Learning for Face Age Synthesis".
We propose a novel Hierarchical Causal Face Synthesis (HCFace) framework that automatically discovers causal relationships among facial attributes and leverages them to guide age synthesis.
-
Causal Graph Discovery Module
Automatically models the causal relationships of facial attributes, discovers the causal structure among attributes, and constructs hierarchical causal graphs to guide subsequent age editing. -
Non-linear Mapping Module
Takes the discovered hierarchical causal graph as input and guides the model to modify attribute values along the causal paths, generating facial images that realistically reflect facial aging patterns across different age groups.
We recommend train model using the MS1M or CASIA-Webface dataset, a large-scale face recognition dataset.
| Dataset | Description | Download Link |
|---|---|---|
| MS1M (MS-Celeb-1M) | ~10M images, 100k identities. We use the cleaned faces_emore version. |
Link |
| CASIA-Webface | 10K ids/0.5M images | Link |
We evaluate our method on four public age synthesis / age progression benchmarks:
| Dataset | Description | #Images | #Subjects | Download Link |
|---|---|---|---|---|
| CACD | Cross-Age Celebrity Dataset | 163,446 | 2,000 | Link |
| FG-NET | Face Aging Dataset | 1,002 | 82 | Link |
| MORPH2 | Longitudinal Face Dataset | 55,134 | 13,618 | Link |
| ECAF | dataset with a diverse age distribution, comprising 5,265 face images of 613 individuals, with an average age of 41.3 years. |
- | - | Link |
- Python 3.8+
- PyTorch 1.8+
- CUDA 11.1+ (recommended)
- Clone this repository:
- git clone https://github.com/SE-hash/HCFace.git
- cd HCFace
- pip install requirement.txt
- Follow main.py, replace your GPU number and dataset name. Note that you should ensure that the number of compute cards you can use matches the number specified in
--nproc_per_node=x