6

基于DAD-3DHeads 的特征点标记、姿态评估、头部3D对齐Demo

 1 year ago
source link: https://liruilongs.github.io/2023/06/12/%E5%BE%85%E5%8F%91%E5%B8%83/%E5%9F%BA%E4%BA%8EDAD-3DHeads-%E7%9A%84%E5%A7%BF%E6%80%81%E8%AF%84%E4%BC%B0%E5%A4%B4%E9%83%A83D%E5%AF%B9%E9%BD%90Demo/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
2023-06-12   99+  5 分钟  0.8 k2次访问

基于DAD-3DHeads 的特征点标记、姿态评估、头部3D对齐Demo

对每个人而言,真正的职责只有一个:找到自我。然后在心中坚守其一生,全心全意,永不停息。所有其它的路都是不完整的,是人的逃避方式,是对大众理想的懦弱回归,是随波逐流,是对内心的恐惧 ——赫尔曼·黑塞《德米安》


  • 工作中遇到,简单整理
  • 理解不足小伙伴帮忙指正

对每个人而言,真正的职责只有一个:找到自我。然后在心中坚守其一生,全心全意,永不停息。所有其它的路都是不完整的,是人的逃避方式,是对大众理想的懦弱回归,是随波逐流,是对内心的恐惧 ——赫尔曼·黑塞《德米安》


https://github.com/PinataFarms/DAD-3DHeads.git

模型文件,如果没有科学上网,需要提前下载,放到家目录下: C:\Users\liruilong\.dad_checkpoints

dad_3dheads.trcd: https://media.pinatafarm.com/public/research/dad-3dheads/dad_3dheads.trcd

创建虚拟环境

(base) C:\Users\liruilong\Documents\GitHub>cd DAD-3DHeads_Demo

(base) C:\Users\liruilong\Documents\GitHub\DAD-3DHeads_Demo>conda create --name DAD-3DHeads python=3.8

(base) C:\Users\liruilong\Documents\GitHub\DAD-3DHeads_Demo>conda activate DAD-3DHeads

(DAD-3DHeads) C:\Users\liruilong\Documents\GitHub\DAD-3DHeads_Demo>pip install -r requirements.txt -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple/

运行 Demo 测试

68 个特征点标记

(DAD-3DHeads) C:\Users\liruilong\Documents\GitHub\DAD-3DHeads_Demo> python demo.py images\\demo_heads\\1.jpeg outputs 68_landmarks

面部曲面标记

(DAD-3DHeads) C:\Users\liruilong\Documents\GitHub\DAD-3DHeads_Demo> python demo.py images/demo_heads/1.jpeg outputs face_mesh

头部3D曲面标记

python demo.py images/demo_heads/1.jpeg outputs head_mesh
python demo.py images/demo_heads/1.jpeg outputs pose

其他的所有 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

博文部分内容参考

© 文中涉及参考链接内容版权归原作者所有,如有侵权请告知,这是一个开源项目,如果你认可它,不要吝啬星星哦 :)


https://github.com/PinataFarms/DAD-3DHeads


© 2018-2023 [email protected], All rights reserved. 保持署名-非商用-相同方式共享(CC BY-NC-SA 4.0)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK