---
title: cv_3d-human-synthesis-library
canonical_url: "https://www.modelscope.cn/models/iic/cv_3d-human-synthesis-library"
md_url: "https://www.modelscope.cn/models/iic/cv_3d-human-synthesis-library.md"
repository: iic/cv_3d-human-synthesis-library
chinese_name: "En3D生成式3D人物模型库"
last_updated: 2023-12-28
license: "Apache License 2.0"
model_type:
  - "3D render"
library_name:
  - pytorch
frameworks:
  - pytorch
domain:
  - cv
downloads: 888
stars: 16
tags:
  - "3D human library"
  - "3D generation"
  - "Neural Rendering"
  - "三维生成"
  - "3D人物模型库"
---

# cv_3d-human-synthesis-library

> cv_3d-human-synthesis-library - iic 在 ModelScope 开源的模型。3DHuman-Syn是一个生成式3D人物模型库，通过预训练模型批量生成得到，目前开放1000个Avatar模型的下载、渲染、驱动等功能，生成的3D模型可直接用于现有3D生产管线（支持OBJ、GLB、FBX等，可用于Blender等）

iic/cv_3d-human-synthesis-library 是 ModelScope 魔搭社区上的机器学习模型，采用 Apache License 2.0 许可。

- **Repository**: iic/cv_3d-human-synthesis-library
- **License**: Apache License 2.0
- **Tags**: 3D human library, 3D generation, Neural Rendering, 三维生成, 3D人物模型库
- **Downloads**: 888
- **Stars**: 16
- **Last updated**: 2023-12-28

Source: https://www.modelscope.cn/models/iic/cv_3d-human-synthesis-library

---

# En3D生成式三维模型使用及渲染

### [论文](https://arxiv.org/abs/to-be-released) ｜ [项目主页](https://menyifang.github.io/projects/to-be-released.html)


3DHuman-Syn是一个生成式3D人物模型库，通过预训练模型批量生成得到，目前开放1000个Avatar模型的下载、渲染、驱动等功能，生成的3D模型可直接用于现有3D生产管线（支持OBJ、GLB、FBX等，可用于Blender等）

## 效果展示
模型库部分人物渲染缩略图：

![渲染缩略图](description/grid.png)


MashLab预览：

![预览](description/preview.png)


## 模型及功能描述

### 模型库描述

- 模型库包含1000个标准化的3D人物角色，呈标准姿态A字形分布；

- 每个实例模型采用triangular mesh结构，包含10w顶点、20w面片、以及2048*2048分辨率的纹理贴图；

- 人物范围涵盖男士、女士、老人、小孩等，服装涵盖各类日常服饰（如衬衫、西装、外套、裙装、牛仔服、休闲裤、紧身衣、风衣等）


### 功能描述

通过modelscope提供模型库中3D实例下载、渲染及角色驱动功能

## 使用方法

### 环境安装
安装好基础modelscope环境后，安装nvdiffrast
```
# 安装nvdiffrast
git clone https://github.com/NVlabs/nvdiffrast.git
cd nvdiffrast
pip install .

# 安装nvdiffrast所需依赖（opengl等）
apt-get install freeglut3-dev
apt-get install binutils-gold g++ cmake libglew-dev mesa-common-dev build-essential libglew1.5-dev libglm-dev
apt-get install mesa-utils
apt-get install libegl1-mesa-dev 
apt-get install libgles2-mesa-dev
apt-get install libnvidia-gl-525
pip install 'numpy<=1.22.0' 'pandas<1.4.0' 
```

### 3D模型下载及渲染

在 ModelScope 框架上，通过简单的 pipeline 即可实现指定3D角色的下载及渲染推理

```python
import os
import imageio
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.utils.test_utils import test_level
from modelscope.outputs import OutputKeys
from modelscope.models.cv.face_reconstruction.utils import write_obj

def save_results(result, save_root):
    os.makedirs(save_root, exist_ok=True)

    # save mesh
    mesh = result[OutputKeys.OUTPUT]['mesh']
    write_obj(os.path.join(save_root, 'mesh.obj'), mesh)

    # save rendered color video
    frames_color = result[OutputKeys.OUTPUT]['frames_color']
    imageio.mimwrite(os.path.join(save_root, 'render_color.gif'), frames_color, duration=30)
    del frames_color

    # save rendered normals video
    frames_normals = result[OutputKeys.OUTPUT]['frames_normal']
    imageio.mimwrite(os.path.join(save_root, 'render_normals.gif'), frames_normals, duration=30)
    del frames_normals
    print(f'Output written to {os.path.abspath(save_root)}')

human3d = pipeline(Tasks.human3d_render,model='damo/cv_3d-human-synthesis-library')
input = {'dataset_id': 'damo/3DHuman_synthetic_dataset',
        'case_id': '000039'}
output = human3d(input)
save_results(output, './human3d_results')

print('finished')

```

### 人物驱动
参见[3D角色驱动模型](https://modelscope.cn/models/damo/cv_3d-human-animation/summary)



### 模型局限性以及可能的偏差
3D模型质量进一步迭代优化中，定期更新


## 引用
如果该模型对你有所帮助，请引用相关的论文：

```BibTeX
To be updated
```
