DAD-3DHeads

PinataFarms更新放缓

CVPR 2022 发布的大规模 3D 头部对齐数据集,提供密集、准确、多样的标注,用于从单张图像重建 3D 人脸和头部。

Official repo for DAD-3DHeads: A Large-scale Dense, Accurate and Diverse Dataset for 3D Head Alignment from a Single Image (CVPR 2022).

暂无版本513star45fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
conda create --name DAD-3DHeads python=3.8
conda activate DAD-3DHeads
git clone https://github.com/PinataFarms/DAD-3DHeads.git
cd DAD-3DHeads
pip install -r requirements.txt
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

CVPR 2022 的单图 3D 头部对齐数据集与官方代码,提供训练、推理 demo 和评测基准

CVPR 2022 发布的大规模 3D 头部对齐数据集,提供密集、准确、多样的标注,用于从单张图像重建 3D 人脸和头部。

核心能力

  • 提供大规模稠密、准确、多样的 3D 头部对齐数据集
  • 支持 68/191/445 个 2D 人脸关键点可视化
  • 输出人脸网格、头部网格、头部姿态与 3D mesh obj
  • 可导出 FLAME 参数 json 文件
  • 附带 DAD-3DHeads benchmark 评测代码

容易踩的坑

需使用 Python 3.8 环境;训练前需从 Hugging Face 下载数据集并解压到 dataset/DAD-3DHeadsDataset 目录;项目采用 CC BY-NC-SA 4.0 许可,禁止商业使用

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    DAD-3DHeads: A Large-scale Dense, Accurate and Diverse Dataset for 3D Head Alignment from a Single Image

    Paper Conference Project WebPage Dataset CC BY-NC-SA 4.0

    This is an official repository for the paper

    DAD-3DHeads: A Large-scale Dense, Accurate and Diverse Dataset for 3D Head Alignment from a Single Image
    Tetiana Martyniuk, Orest Kupyn, Yana Kurlyak, Igor Krashenyi, Jiři Matas, Viktoriia Sharmanska
    CVPR 2022
    

    📰 News

    • 2026-01-23 - DAD-3DHeads dataset is now available on Hugging Face.
    • 2024-08-27 - Added UV Texture predictor and PNCC estimator.
    • 2022-11-08 - DAD-3DHeads benchmark evaluation code is released.
    • 2022-05-11 - Initial code release.

    📚 Table of Contents

    Installation

    The code uses Python 3.8.

    Create a Conda virtual environment:
    conda create --name DAD-3DHeads python=3.8
    conda activate DAD-3DHeads
    
    Clone the project and install requirements:
    git clone https://github.com/PinataFarms/DAD-3DHeads.git
    cd DAD-3DHeads
    
    pip install -r requirements.txt
    

    Training

    Prepare the DAD-3DHeads dataset:

    First, you need to download the DAD-3DHeads dataset and extract it to the dataset/DAD-3DHeadsDataset directory.

    The dataset directory structure should be the following:

    ./dataset
    --DAD-3DHeadsDataset
    ----train
    ------images
    --------<ID>.png
    ------annotations
    --------<ID>.json
    ------train.json
    ----val
    ------images/<ID>.png
    ------annotations/<ID>.json
    ------val.json
    ----test
    ------images/<ID>.png
    ------test.json
    

    Annotations <ID>.json file structure:

    --vertices
    --model_view_matrix
    --projection_matrix
    

    Metadata [train|val|test].json file structure:

    --item_id
    --annotation_path
    --img_path
    --bbox #[x, y, w, h] format
    ----0
    ----1
    ----2
    ----3
    --attributes
    ----quality #[hq, lq]
    ----gender #[female, male, undefined]
    ----expression #[true, false]
    ----age #[child, young, middle_aged, senior]
    ----occlusions #[true, false]
    ----pose #[front, sided, atypical]
    ----standard light #[true, false]
    

    The training code uses hydra. To change the training setup, add a new or edit the existing .yaml file in the model_training/config folder.

    Visualize the ground-truth labels:
    python visualize.py <subset> <id>
    

    Pick subset from the train, val, test options, and the corresponding item_id (without file extension).

    Run training code:
    python train.py
    

    Demo

    First row (from left to right): input image, 68 2D face landmarks visualization, 191 2D face landmarks visualization, 445 2D face landmarks visualization.
    Second row (from left to right): face mesh visualization, head mesh visualization, head pose visualization, 3D head mesh.

    Run demo:
    python demo.py <path/to/input/image.png> <path/to/output/folder> <type_of_output>
    
    # Visualize 68 2D face landmarks
    python demo.py images/demo_heads/1.jpeg outputs 68_landmarks
    
    # Visualize 191 2D face landmarks
    python demo.py images/demo_heads/1.jpeg outputs 191_landmarks
    
    # Visualize 445 2D face landmarks
    python demo.py images/demo_heads/1.jpeg outputs 445_landmarks
    
    # Visualize face mesh
    python demo.py images/demo_heads/1.jpeg outputs face_mesh
    
    # Visualize head mesh
    python demo.py images/demo_heads/1.jpeg outputs head_mesh
    
    # Visualize head pose
    python demo.py images/demo_heads/1.jpeg outputs pose
    
    # Get 3D mesh .obj file
    python demo.py images/demo_heads/1.jpeg outputs 3d_mesh
    
    # Get flame parameters .json file
    python demo.py images/demo_heads/1.jpeg outputs flame_params
    

    DAD-3DHeads Benchmark

    Please refer to the dad_3dheads_benchmark directory for the evaluation protocol.

    License

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

    CC BY-NC-SA 4.0

    By using this code, you acknowledge that you have read the license terms, understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you must not use the code.

    Citation

    If you use the DAD-3DHeads dataset or this code for your research projects, please cite the following paper:

    @inproceedings{dad3dheads,
        title={DAD-3DHeads: A Large-scale Dense, Accurate and Diverse Dataset for 3D Head Alignment from a Single Image},
        author={Martyniuk, Tetiana and Kupyn, Orest and Kurlyak, Yana and Krashenyi, Igor and Matas, Ji\v{r}i and Sharmanska, Viktoriia},
        booktitle = {Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR)},
        year={2022}
    }