FairFace-RedConsole-CNano-3Task-224

Overview

A lightweight, high-accuracy 3-task face classification model (race / gender / age) built on ConvNeXt-Nano.

Unlike models initialized directly from generic ImageNet weights, this backbone was first adapted to the face domain on VGGFace2 + MAAD-Face (3.06M real face images, multi-task supervision over 31 facial attributes) β€” the Honeycomb v3 stage checkpoint β€” and then fine-tuned on FairFace with teacher distillation.

Face-domain pretraining measurably improves transfer on tasks that share the same semantic axes. On a strictly frozen 10,931-image test set, compared with the same architecture initialized from ImageNet:

  • age accuracy rises by +1.02pp to 60.80% (98.75% Bootstrap CI excludes zero β€” the first time this model family exceeds the official ResNet34 baseline),
  • race accuracy reaches 75.28%,
  • gender accuracy reaches 95.56%,
  • the three-task mean reaches 77.21%.

Model details

Item Value
Backbone ConvNeXt-Nano (convnext_nano)
Initial weights VGGFace2 + MAAD-Face 31-attribute converged backbone (Honeycomb v3 EMA)
Parameters 14,963,457 (14.96M)
Input RGB, 224Γ—224, BICUBIC resize
Normalization mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)
Outputs race 7-way softmax + gender 2-way softmax + age 8 thresholds (ordinal regression over 9 buckets)
Test set 10,931 images (FairFace official val, deduplicated and frozen against train leakage)

Benchmark comparison

Paired same-image Bootstrap with 10,000 resamples, 98.75% confidence intervals.

Task Official ResNet34 baseline cnano @ ImageNet (native) cnano @ Honeycomb pretrain (this model) Gain vs ImageNet Verdict
race (7 classes) 71.96% 74.92% 75.28% +0.36pp not worse (CI spans 0)
gender (2 classes) 94.40% 95.57% 95.56% -0.01pp on par
age (9 ordinal buckets) 60.47% 59.77% 60.80% +1.02pp βœ… significant (CI [+0.09, +1.94])
3-task mean 75.61% 76.76% 77.21% +0.46pp best across all three

Fixing the weak spot: a ConvNeXt-Nano initialized from ImageNet scores 59.77% on age, below the official ResNet34 baseline of 60.47%. With facial-attribute pretraining it clears the baseline and reaches 60.80%.

Per-class performance

per-class recall

confusion matrix

Files

File Size Purpose
model.pt 114.28 MB PyTorch checkpoint (ema / model state dict + selected_ema flag)
inference.py 2.4 KB Self-contained model definition, load() and predict()
metrics.json 3.6 KB Per-task accuracy / macro-F1 and the paired Bootstrap comparisons
assets/*.png β€” Per-class recall and confusion-matrix plots

model.pt SHA-256: efe3bea598a78e6a5fc0edd5f80dd717a4079e46038d4af881ed6f40db9b7723 (119,834,331 bytes) β€” identical to the ModelScope mirror this repository was copied from.

Quick start

pip install torch torchvision timm pillow

inference.py holds the architecture (a timm ConvNeXt-Nano trunk plus three linear heads), so no custom package is needed:

import json
from inference import load, predict

model = load("model.pt", device="cuda")          # or device="cpu"
res = predict(model, "face_example.jpg", device="cuda")
print(json.dumps(res, indent=2, ensure_ascii=False))

Example response:

{
  "race": "East Asian",
  "race_confidence": 0.9412,
  "gender": "Female",
  "age": "20-29"
}

Limitations

  • Labels follow the FairFace taxonomy (7 race groups, 2 genders, 9 age buckets), which is a dataset convention, not a claim about identity.
  • The age head is ordinal: the script counts predicted thresholds, so outputs are ordered buckets rather than a continuous age.
  • Intended for attribute estimation on cropped, roughly frontal faces at 224Γ—224. It is not a face-recognition or identity-verification model, has no liveness/anti-spoofing component, and was not evaluated on non-photographic or heavily occluded inputs.
  • Reported numbers come from the frozen FairFace val split; expect different figures on other populations, cameras and crops.

Citations

@inproceedings{karkkainenfairface,
  title={FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation},
  author={Karkkainen, Kimmo and Joo, Jungseock},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  year={2021},
  pages={1548--1558}
}

@inproceedings{cao2018vggface2,
  title={VGGFace2: A dataset for recognising faces across pose and age},
  author={Cao, Qiong and Shen, Li and Xie, Weidi and Parkhi, Omkar M and Zisserman, Andrew},
  booktitle={2018 13th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2018)},
  pages={67--74},
  year={2018}
}
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