| 项目 | 内容 |
|---|---|
| 模型 ID | damo/cv_resnet50_face-reconstruction |
| 框架 | PyTorch |
| 任务 | 人脸重建 (Face Reconstruction) |
| 骨干网络 | ResNet-50 |
| 输入分辨率 | 224x224 |
| 输出维度 | 257 (3DMM 系数) |
| 指标 | 值 |
|---|---|
| Cosine Similarity | 0.999999 |
| Max Abs Error | 0.024333 |
| 平均延迟 | 4.81 ms |
| 峰值显存 | 0.09 GB |
| 设备 | Ascend 910B4 |
| 精度 | FP16 |
pip install -r requirements.txtpython -c "from modelscope import snapshot_download; snapshot_download('damo/cv_resnet50_face-reconstruction', cache_dir='./models')"python inference.py --model-dir ./models/damo/cv_resnet50_face-reconstruction --device npu:0python evaluate.py --model-dir ./models/damo/cv_resnet50_face-reconstruction --device npu:0 --output report.json以下为 NPU 推理实际输出(inference.py --device npu:0):
模型目录: models/damo/cv_resnet50_face-reconstruction
设备: npu:0
精度: float16
输出形状: [1, 257]
样本值 (前5个): [-1.8681641 3.6875 1.2851562 1.0585938 -4.0078125]
最小值: -10.703125
最大值: 10.015625
均值: 0.288818
是否有 NaN: False
✓ 推理完成| 指标 | CPU (FP32) | NPU (FP16) | 差异 |
|---|---|---|---|
| Cosine Similarity | - | - | 0.999999 |
| Max Abs Error | - | - | 0.024333 |
| 输出形状 | [1, 257] | [1, 257] | 一致 |
| NaN | 无 | 无 | 通过 |
评测使用相同随机输入(torch.manual_seed(42)),CPU 输出作为基准,NPU 输出与之对比。Cosine Similarity 越接近 1.0 表示精度越高。
本模型是 HRN (Hierarchical Representation Network) 的核心组件,使用 ResNet-50 作为骨干网络,从单张 224x224 人脸图像预测 257 维 3DMM 系数,用于 3D 人脸重建。
本适配由 vision-encoder-npu-adapt Agent Skill 自动完成,包含:
@misc{lei2023hierarchical,
title={A Hierarchical Representation Network for Accurate and Detailed Face Reconstruction from In-The-Wild Images},
author={Biwen Lei and Jianqiang Ren and Mengyang Feng and Miaomiao Cui and Xuansong Xie},
year={2023},
eprint={2302.14434},
archivePrefix={arXiv},
primaryClass={cs.CV}
}