Skip to main content
Back

MiVOLO v2 Reads Age and Gender Even When Faces Are Hidden

A compact 28.8M parameter transformer estimates age and gender from face and body crops, hitting 97.3% gender accuracy on Adience.

Pro

  • MiVOLO v2 is a 28.8M-parameter multi-input transformer for age and gender estimation on Hugging Face.
  • It fuses face and body crops through a VOLO backbone so it still works when the face is occluded.
  • Reports 70.2% age accuracy and 97.3% gender accuracy on Adience at 384x384 in FP16.
  • Released under Apache 2.0 with 1.77M downloads; runs via transformers with trust_remote_code=True.
  • Backed by two papers: arXiv 2307.04616 and arXiv 2403.02302.
  • Install path uses the MiVOLO GitHub library plus pinned transformers 4.51.0.

Age and gender estimation from photos usually breaks the moment a subject turns their head, wears sunglasses, or gets shot from behind. MiVOLO v2 takes on that failure mode by feeding two crops of a person, one of the face and one of the body, into a single vision transformer that fuses them internally. The model is now live on Hugging Face under Apache 2.0, and it has racked up 1.77 million downloads, making it one of the more quietly successful open computer vision releases of the last year.

Two crops, one transformer

The architecture comes from the original 2023 paper by Kuprashevich and Tolstykh. MiVOLO (Multi Input VOLO) builds on the VOLO vision transformer and folds age and gender into a unified dual input/output model, leveraging not only facial information but also person image data, which improves generalization and delivers usable predictions even when the face is hidden. A follow-up 2024 paper extended the analysis by benchmarking multimodal LLMs on the same task and finding that specialized models like MiVOLO still hold the edge.

MiVOLO architecture diagram showing face and body crops processed through VOLO encoders and a cross-attention feature enhancer that fuses them for age and gender heads.

Under the hood the model runs two parallel VOLO patch-embedding streams, one per crop, and then merges them through a cross-attention feature enhancer before the age regression head and the gender classification head. The v2 checkpoint bumps input resolution from 224x224 to 384x384, which is the main quality jump over v1. Weight count stays modest at 28.8M parameters, with FP32 or FP16 inference.

What the numbers look like

On Adience, the model card reports 70.2 age accuracy and 97.3 gender accuracy at 384px in FP16. For context, the earlier mivolo_d1 checkpoint on the IMDB-cleaned benchmark showed an age MAE of 4.24 and gender accuracy of 99.46 when both face and body were available, versus 6.87 MAE and 96.48 accuracy on body-only inputs. That gap is the whole thesis of the paper: the body stream acts as a fallback that keeps predictions usable when the face is missing, and a booster when it isn't.

The 2023 paper also claimed something stronger than benchmark wins. The authors compare their model's age recognition against human-level accuracy and report that it significantly outperforms humans across a majority of age ranges.

Dropping it into a pipeline

The model uses the standard AutoModelForImageClassification interface but requires trust_remote_code=True because MiVOLO ships custom modeling code. You feed it BGR crops through the provided image processor and get back an age scalar plus a gender class index and probability.

from transformers import AutoModelForImageClassification, AutoImageProcessor
import torch
model = AutoModelForImageClassification.from_pretrained(
    "iitolstykh/mivolo_v2", trust_remote_code=True, torch_dtype=torch.float16
)
proc = AutoImageProcessor.from_pretrained("iitolstykh/mivolo_v2", trust_remote_code=True)
faces = proc(images=[face_crop])["pixel_values"].to(model.device, model.dtype)
bodies = proc(images=[body_crop])["pixel_values"].to(model.device, model.dtype)
out = model(faces_input=faces, body_input=bodies)
age, gender_idx = out.age_output[0].item(), out.gender_class_idx[0].item()

Either input can be None, so the same checkpoint handles face-only, body-only, or fused predictions. The install path is a bit unusual: pip install the MiVOLO library straight from GitHub, then pin transformers==4.51.0 and accelerate==1.8.1. A Hugging Face Space is available if you want to poke at the model without writing code, and a community ComfyUI wrapper already exists for image-generation workflows.

Where it fits and where it doesn't

The obvious targets:

  • Retail and out-of-home analytics where cameras rarely get a clean frontal face
  • Content moderation and age-gating on user-uploaded photos
  • Demographic tagging for large image or video corpora
  • Robotics and HCI where a person may be walking past or turned away
  • Dataset curation for generative models that need age-conditioned filtering

The weak spots are the usual ones for this class of model. Age remains a regression problem with real ambiguity, and Adience-style accuracy metrics collapse fine-grained errors into age buckets. The gender head is binary, which will be a nonstarter for some applications. Because the training set is described only as proprietary and open-source datasets, assume the usual demographic biases and validate on your own distribution before shipping anything user-facing.

The multi-input trick is the reason to reach for MiVOLO over a generic face classifier. If your upstream detector already gives you person boxes, wiring in the body crop is essentially free and it materially improves robustness in the exact cases where single-face models fall apart.