AgeSynth – Age Scalar ⇄ Chronological Age Regression Models

This directory stores regression models that convert the StyleGAN age scalar obtained when traversing the AgeSynth age-direction in StyleGAN2’s W space into an estimated chronological age (and vice-versa), depending on the original subject's age. The mappings were produced by fitting linear and polynomial regressions on a curated subset of images from the UTKFace dataset, after projecting each image into StyleGAN2 and measuring the scalar value along the learned age direction.

Overview

License

Copyright (c) 2025 Idiap Research Institute

CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0 International) This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

Model output structure:

  • Files:
    • age_fit_linear_pos.pkl : for linear fittings in the 'aging' direction.
    • age_fit_linear_neg.pkl : for linear fittings in de 'de-aging' direction.
    • age_fit_5_dict.pkl : for polynomial fittings in the 'aging' and 'de-aging' direction.
  • Format:
    • dict with keys corresponding to age brackets of the original subject's age, with lower bound inclusive and upper bound exclusive. The available keys are: ['below-8', '8-to-13', '13-to-18', 18-to-25', '25-to-35', '35-to-45','45-to-55', '55-to-65', 'above-65']
    • Each value is a NumPy array containing the polynomial or linear coefficients (highest order first) that map latent scalar β†’ chronological age for that bracket.

Minimal code to instantiate the model and perform inference:

Example for estimating a subject's age from a scalar offset in the latent space

import pickle
import numpy as np

# Load 5th-order polynomial model for the 25-35 age bracket
#original_subject_age = 30

with open("age_fit_5_dict.pkl", "rb") as f:
    model_dict = pickle.load(f)
coeffs = model_dict["25-to-35"]  # numpy array of length 6 (highest order first)

# 
scalar_origin = 0.0 #corresponds to 30 years old in the 25-to-35 age group

# Predict chronological age in years
age_pred = np.polyval(coeffs, scalar_origin)
print(f"Predicted age: {age_pred:.1f} years")

Available Models

File Model type Intended direction Brief description
age_fit_linear_pos.pkl Ordinary Least Squares – linear Ageing (+) Linear mapping for positive age deltas
age_fit_linear_neg.pkl Ordinary Least Squares – linear De-ageing (–) Linear mapping for traversing the age direction in the negative direction
age_fit_5_dict.pkl 5-th order polynomial Both Captures non-linear relationship between latent scalar and real age

Training Data & Procedure

  • Curated UTKFace image lists (covering the 0–116 year span) were projected into StyleGAN2’s w space.
  • The latent scalars were regressed against the chronological ages to obtain the linear and 5-th order polynomial mappings.
  • Model selection was validated on a held-out split.

Usage

  1. Obtain the StyleGAN age scalar for a face (dot-product of the latent with the AgeSynth direction).
  2. Pick the corresponding age bracket (e.g. 25-to-35).
  3. Retrieve the coefficients from the dictionary and evaluate the polynomial / linear function with NumPy to get the predicted age in years.

No additional libraries are required beyond NumPy and pickle for loading.

Limitations & Biases

  • Trained on UTKFace; inherits demographic biases (age/ethnicity imbalance).
  • Accuracy deteriorates outside the 0–116 y range.
  • Not intended for biometric age estimation nor decision making.

Citation

If you use these models, please cite:

@InProceedings{luevano2024agesynth,
  title={Identity-Preserving Aging and De-Aging of Faces in the StyleGAN Latent Space},
  author={Luevano, Luis S. and Korshunov, Pavel and Marcel, SΓ©bastien},
  booktitle={2025 IEEE International Joint Conference on Biometrics (IJCB)},
  year={2025}
}

Third-Party Data

This model was derived from the UTKFace dataset. UTKFace images are licensed for non-commercial research purposes only. Any use of these regression models must therefore remain non-commercial.

The UTKFace dataset license states (excerpt):

The UTKFace dataset is available for non-commercial research purposes only.
Copyright for the original images belongs to the respective owners.

Full license text available at https://susanqq.github.io/UTKFace/.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support