/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
pytorch
Опубликована
26 ноя 2026

frommhr

Языковая модель3 профессии

frommhr восстанавливает форму и параметры цвета 3D-головы взрослого персонажа MHR по фронтальному изображению и левому профилю.

0скачиваний за 30 дней0лайковвеса обновлены26 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

frommhr — модель для восстановления 3D-головы персонажа по двум изображениям: виду спереди и левому профилю. Она предсказывает 20 коэффициентов формы головы Meta Momentum Human Rig (MHR) и 14 параметров пигментации кожи и черт лица, чтобы построить голову на сетке SOMA. Модель разработана для создания игровых персонажей по концепт-изображениям.

Архитектура включает DINOv2 ViT-S/14 для обоих изображений, небольшую свёрточную сеть для области глаз на фронтальном изображении и MLP для предсказания параметров. Модель содержит около 25 млн параметров и обучалась на синтетических рендерах случайных взрослых персонажей MHR. Веса опубликованы в формате safetensors; лицензия — Apache-2.0.

Для работы нужны фронтальное изображение и профиль лысой головы на простом фоне, с нейтральным выражением и малой перспективой. Модель рассчитана на 3D-персонажей и не предназначена для идентификации людей. Она обучена только на синтетических данных одного рендерера, поэтому на фотографиях и изображениях с волосами, очками, макияжем или сложным фоном качество может снижаться. Для детей она подбирает наиболее близкую взрослую форму; цветовая модель ограничена 14 параметрами и не описывает веснушки, шрамы, татуировки и морщины.

Сценарии применения

  • создание 3D-головы игрового персонажа по двум концепт-изображениям
  • подбор формы головы MHR по фронтальному виду и профилю
  • оценка параметров пигментации кожи, губ, бровей и радужек
  • экспорт восстановленной головы в виде сетки OBJ на основе SOMA

Ограничения

Модель обучена на синтетических рендерах и может хуже работать на фотографиях, а также при наличии волос, очков, макияжа, выражений лица или сложного фона. Она рассчитана на взрослые головы, использует упрощённую модель цвета и не предназначена для идентификации людей.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

frommhr

A reader for two pictures of a bald head, the front and the left profile, on a plain backdrop. It reads the head's shape as the 20 head coefficients of Meta's Momentum Human Rig (MHR), and its colour as 14 pigment sliders: skin, cheeks, nose, under the eyes, lips, brows, irises and stubble. It was made for building 3D game characters from concept pictures, and was trained only on synthetic renders of random MHR people on NVIDIA's SOMA mesh.

Generated front pictures, the people built from them, and their mesh

Left, a generated front picture (not a photo of a real person); the reader also got the head's left profile. Middle, the person the Assets Studio server builds from the reader's output, the head's colour projected from the pictures. Right, the same mesh without colour: SOMA's triangles, the head shaped by the reader's 20 coefficients. The children (the three bottom rows) get the closest adult head: see Limitations.

Code for the data, training, evaluation and export: kvladsrc/gym/frommhr on GitHub. The Assets Studio server frommhr puts the head on a rigged, textured SOMA person.

Files

FileHolds
frommhr.safetensorsthe reader's weights and what they need: MHR's identity on SOMA's mesh, SOMA's triangles, the colour tables, the feature masks
predict.pyreads two pictures and prints the coefficients and pigments as JSON
example.jpgthe picture above

The package is one safetensors file: the tensors under dotted keys and everything else as JSON in its metadata, where each tensor stands as {"$tensor": key}. Loading it runs no code; predict.py shows how.

Use

pip install torch timm safetensors mediapipe numpy pillow huggingface_hub
python predict.py front.png profile.png --obj head.obj
{
 "mhr_head": [1.9799, 0.4323, -0.9529, ...],
 "pigments": {"melanin": 0.10335, "eu": 0.16995, "blood": 0.02432, ...},
 "crops_px": {"front": {...}, "left": {...}}
}
  • mhr_head are MHR's identity coefficients 20–39, the head. The body's coefficients 0–19 and the hands' 40–44 are not read.
  • pigments: the skin's melanin (volume fraction in the epidermis), its eumelanin share (eu) and the dermis's blood; factors on them for the cheeks, the nose and under the eyes; the lips' melanin and blood; the brows' and the irises' eumelanin and pheomelanin; and stubble, the share of the beard zone covered by hair of the brows' colour.
  • --obj writes the head on MHR's mean body as SOMA's mesh: metres, Y up, the face towards +Z, no eyeballs.

MediaPipe's Face Landmarker (downloaded once into ~/.cache/frommhr) finds the eye line, and the backdrop the crown. Each picture is framed to its own head as the training renders were, read under nine slightly shifted and scaled crops, and the outputs are averaged. A profile that looks to the picture's right is mirrored. About ten seconds on a CPU. Tested with Python 3.12, PyTorch 2.15, timm 1.0.30 and MediaPipe 1.2.3.

The pictures need:

  • a bald head, no hair, hat or glasses, the whole head in the picture with some backdrop above the crown;
  • a plain, even backdrop;
  • a neutral face with open eyes;
  • the front looking straight at the camera, the profile at 90°;
  • little perspective: the training renders are orthographic, and a close phone camera's perspective is read as shape.

Evaluation

On 256 random MHR people from a seed the training never used, rendered as in training. The head skin's error is the mean distance of its vertices to the truth, rebuilt with the true body, both heads centred and scaled to an adult's head size.

Head skin's error, mmMeanMedian90th percentile
frommhr0.2660.2540.358
MHR's mean head on the true body4.5284.3446.226
One average head for everybody4.5184.2906.098

R² of the 20 head coefficients: 0.97–1.00.

Colour difference, CIE76SkinCheeksNoseUnder the eyesLipsBrowsIrises
Mean1.392.311.872.091.562.271.39
90th percentile2.514.013.213.842.845.132.72

The median error of melanin is 6.5% (log 0.063), of blood 14.3% (log 0.134); the mean error of the stubble share is 0.026. These are evaluate.py's numbers on the CPU; the random people depend on the device, and 256 others drawn on a GPU gave a mean head error of 0.257 mm.

These numbers measure the reader on its own kind of picture. Real or generated pictures have no ground truth here, and the reader will do worse on them.

Training

Each step draws random people: body and head coefficients from N(0, 1) clipped at 2.5, the sliders from a prior of plausible skin and features, random light and a grey backdrop. It renders them orthographically from the front and the left, turned a little, with random shifts, scales, blur, gamma and noise.

The network is DINOv2 ViT-S/14 (timm's vit_small_patch14_dinov2.lvd142m) at 518 px on both pictures, a small CNN on the front picture's eye strip, and an MLP to the 20 coefficients and 14 slider logits, 25 M parameters. The loss rebuilds the head's skin from the predicted coefficients and measures it in mm, plus the coefficients' and sliders' squared errors and the CIE76 difference of the colours.

It trained for 6.8 hours on an RTX 3070 Laptop GPU: 6 502 steps of 32 people, learning rate 2e-5 with a cosine schedule, EMA weights. It started from an earlier reader of ours, the same network trained on renders of another body model (Anny), which is not published. The published code starts from DINOv2's weights.

Limitations

  • Adults only. MHR's identity space was built from adult scans, so a child's picture gets the closest adult head.
  • Synthetic training data. The reader has seen only one renderer, with its light, skin model and features. Photos and generated pictures differ in ways it never saw.
  • Bald heads on plain backdrops. Hair, hats, beards longer than stubble, glasses, make-up, expressions and busy backgrounds are outside what it learnt.
  • A simple colour model. Fourteen pigment sliders; no freckles, scars, tattoos or wrinkles, and the colour of the skin under a light it guessed.
  • Not for identifying people. It reads a head for a 3D character; it was not made or tested to identify or verify anyone.

Licences and attribution

The weights and the package are Apache-2.0. They are built on:

  • SOMA-X v0.3.3 (NVIDIA, Apache-2.0): SOMA's mesh, its rig and its MHR and Anny correspondences;
  • MHR (Meta, Apache-2.0): the identity space, carried onto SOMA's mesh;
  • DINOv2 (Meta, Apache-2.0), through timm: the backbone's starting weights;
  • Anny (NAVER LABS Europe, Apache-2.0), with MPFB2's lip, eyelid and ear masks (CC0): the feature masks;
  • Scott Prahl's tabulation of haemoglobin's molar extinction (omlc.org), from W. B. Gratzer and N. Kollias: the blood's colour.

predict.py uses MediaPipe's Face Landmarker (Google, Apache-2.0).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch

Нельзя запустить

3D-генерация пока не поддерживается рантаймом.

Ревизия весов
3dfec05

0 моделей