Run this model with HF Jobs

Run fujielab/fujielab-fer-nano on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/fujielab/fujielab-fer-nano. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/fujielab/fujielab-fer-nano on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

This model is derived from py-feat's multitask model (face_multitask_v28, designated by its authors for noncommercial research) and from ConvNeXt-V2 ImageNet weights (CC BY-NC 4.0), and was trained on research corpora. It is provided for non-commercial research purposes only, on condition that publications using it cite the fujielab-fer GitHub repository (https://github.com/fujielab/fujielab-fer) and py-feat. Commercial use is not permitted. Requests are reviewed manually. 本モデルは研究目的に限って提供します(商業利用は不可)。研究成果を発表する際は、fujielab-fer の GitHub リポジトリと py-feat を引用してください。申請は手動で確認します。

Log in or Sign Up to review the conditions and access this model content.

fujielab-fer-nano

A facial expression recognition model distilled from py-feat's Detectorv2 multitask model (face_multitask_v28, ConvNeXt-V2 tiny) into a light backbone. Intended use: with a GPU, accuracy first. Use it with fujielab-fer (pip install fujielab-fer).

Online demo: try it in your browser (Hugging Face Space, webcam; CPU, so results update a few times per second).

py-feat v28 を教師にして軽い ConvNeXt-V2 nano に蒸留した顔表情認識のモデルです(GPU あり・精度優先)。研究目的(非商用)に限って提供します。

Outputs (same as the teacher)

  • probabilities of 7 emotions (neutral, happy, sad, surprise, fear, disgust, anger), valence and arousal (-1 to 1)
  • presence probabilities of 20 action units (1, 2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 20, 23, 24, 25, 26, 28, 43)
  • gaze (yaw, pitch), head pose (6 DoF), a 478-point MediaPipe face mesh and 52 blendshapes

Usage

After your access request is approved, log in with hf auth login.

from fujielab_fer import FaceExpressionRecognizer

fer = FaceExpressionRecognizer(weights="fujielab/fujielab-fer-nano")
for f in fer(frame_bgr):
    print(f.emotion_label, f.valence, f.au["AU12"])

Demos: fujielab-fer-demo --weights fujielab/fujielab-fer-nano, fujielab-fer-web --weights fujielab/fujielab-fer-nano (pip install "fujielab-fer[web]").

The input is py-feat's crop (face box x1.2 -> square on the long side -> 256x256) resized to 224x224 (done by the library).

Model

Item Value
Backbone ConvNeXt-V2 nano (convnextv2_nano.fcmae_ft_in22k_in1k, from ImageNet pretraining)
Head width (AU, mesh, ...) 512 (same as the teacher; initialized from the teacher's head weights)
Input 224x224
Parameters 28.5M (teacher 41.7M)
Weights model.safetensors (architecture in the metadata config, final evaluation in meta)

Accuracy (compared with the teacher, py-feat v28)

Same face boxes and definitions as our internal benchmark. UA = mean recall over 7 emotions; AU = mean over 5 AUs (1, 2, 4, 6, 12) (DISFA every 3rd frame).

Metric This model Teacher
RAF-DB test UA 82.83 82.48
AffectNet val UA 60.43 60.49
AffectNet val CCC (V / A) 0.584 / 0.520 0.585 / 0.520
DISFA AU F1 / AUC 70.7 / 96.1 68.9 / 96.7
EmotioNet AU F1 / AUC 71.8 / 96.0 71.1 / 96.0

Agreement with the teacher (4,000 held-out faces): emotion argmax 95.2%, mesh difference 0.46 px (on the 256 chip), gaze difference 2.68°.

Speed (expression model only, one face)

Environment This model Teacher
GPU (RTX 4060 Ti, torch.compile + CUDA Graph) B=1 1.37 ms 1.93 ms
GPU, 8 faces at once (per face) 0.45 ms 0.72 ms
CPU (i9-12900K, 4 threads) 24.6 ms 38.7 ms

Training

  • All teacher outputs distilled without labels (emotion: KL, AU: BCE, gaze: KL over 180 bins, VA / mesh / pose / blendshapes: L1 divided by the teacher's standard deviation). Teacher and student see the same augmented input (affine, flip, color, blur, low resolution; online, teacher in fp16).
  • 668k faces (no labels used): AffectNet train 287k, Hazumi 187k, CMU-MOSEI 78k, MELD 72k, CREMA-D 22k, RAF-DB train 11k, RAVDESS 10k. The evaluation sets (AffectNet val, RAF-DB test, DISFA, EmotioNet, CK+, JAFFE, AIST, FER2013, ExpW) were not used.
  • AdamW (lr 1e-3, cosine), batch 128, 400k x 12 epochs, weight EMA. About 3 hours on one RTX 2080 Ti.

License and terms

  • Non-commercial research use only. Access is gated; do not redistribute the files.
  • This model inherits the terms of its sources:
    • the teacher, py-feat face_multitask_v2 (face_multitask_v28), designated by its authors for noncommercial research. Some of the teacher's training datasets restrict models trained on them (e.g. Gaze360, ETH-XGaze, Aff-Wild2); see py-feat's licensing notes;
    • the ConvNeXt-V2 ImageNet weights used to initialize the backbone (convnextv2_nano.fcmae_ft_in22k_in1k), CC BY-NC 4.0;
    • the corpora whose images were used for distillation (AffectNet, Hazumi, CMU-MOSEI, MELD, CREMA-D, RAF-DB, RAVDESS), most of which are restricted to non-commercial research.
  • The teacher's limitations carry over (e.g. AU20 is effectively non-functional; VA is lower than on the teacher's model card in our setting). On ExpW the student is lower than the teacher (the atto student: 50.8 vs 57.8); ExpW, DISFA and EmotioNet are in the teacher's training data, so scores on them are not held-out.
  • Author: Shinya Fujie (Fujie Laboratory, Chiba Institute of Technology; shinya.fujie@chibatech.ac.jp), 2026-09-27.
Downloads last month
-
Safetensors
Model size
28.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for fujielab/fujielab-fer-nano

Finetuned
(2)
this model

Space using fujielab/fujielab-fer-nano 1

Collection including fujielab/fujielab-fer-nano