# LHM-plusplus **Repository Path**: localhost_test/LHM-plusplus ## Basic Information - **Project Name**: LHM-plusplus - **Description**: https://github.com/aigc3d/LHM-plusplus 副本 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-16 - **Last Updated**: 2026-04-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # **LHM++** - 官方 PyTorch 实现 #####

[Lingteng Qiu*](https://lingtengqiu.github.io/), [Peihao Li*](https://liphao99.github.io/), [Heyuan Li*](https://scholar.google.com/), [Qi Zuo](https://scholar.google.com/citations?user=UDnHe2IAAAAJ&hl=zh-CN), [Xiaodong Gu](https://scholar.google.com.hk/citations?user=aJPO514AAAAJ&hl=zh-CN&oi=ao), [Yuan Dong](https://scholar.google.com/), [Weihao Yuan](https://weihao-yuan.com/), [Rui Peng](https://scholar.google.com/), [Siyu Zhu](https://scholar.google.com/), [Xiaoguang Han](https://scholar.google.com/), [Guanying Chen](https://guanyingc.github.io/), [Zilong Dong](https://baike.baidu.com/item/%E8%91%A3%E5%AD%90%E9%BE%99/62931048)

#####

通义实验室 · 阿里巴巴集团 · 中山大学 · 港中大(深圳)· 复旦大学

[![Project Website](https://img.shields.io/badge/🌐-项目主页-blueviolet)](https://lingtengqiu.github.io/LHM++/) [![arXiv Paper](https://img.shields.io/badge/📜-arXiv:2506-13766v2)](https://arxiv.org/pdf/2506.13766v2) [![HuggingFace](https://img.shields.io/badge/🤗-HuggingFace_Space-blue)](https://huggingface.co/spaces/Lingteng/LHMPP) [![YouTube](https://img.shields.io/badge/▶️-YouTube_视频-red)](https://www.youtube.com/watch?v=Nipf3jdSi34) [![Apache License](https://img.shields.io/badge/📃-Apache--2.0-929292)](https://www.apache.org/licenses/LICENSE-2.0)

**LHM++** 是一款高效的大规模人体重建模型,能够从一张或多张无姿态约束的图像在数秒内生成高质量、可驱动的 3D 虚拟人。通过 Encoder-Decoder Point-Image Transformer 架构,相比 LHM-0.7B 实现了显著加速。更多详情请参见[项目主页](https://lingtengqiu.github.io/LHM++/)。 #### 模型规格 | 类型 | 视角 | 特征维度 | 注意力头数 | GS 点数 | 编码器维度 | 显存需求 | 推理时间 (1v) | 推理时间 (4v) | 推理时间 (8v) | 推理时间 (16v) | |------|------|----------|------------|---------|------------|----------|---------------|---------------|---------------|----------------| | LHMPP-700M | Any | 1024 | 16 | 160,000 | 1024 | 8 GB | 0.79 s | 1.00 s | 1.31 s | 2.13 s | | LHMPPS-700M | Any | 1024 | 16 | 160,000 | 1024 | 7.3 GB | 0.79 s | 1.00 s | 1.31 s | 2.13 s | #### 效率分析 LHM++ 通过 Encoder-Decoder Point-Image Transformer 架构实现了显著加速。以下展示不同配置下的效率对比。

For English readers, see [README in English](./README.md). ## 📢 最新动态 ### TODO List - [x] 核心推理流程 (v0.1) 🔥🔥🔥 - [x] 发布代码与预训练权重 - [x] HuggingFace 演示集成 🤗🤗🤗 - [ ] ModelScope Space 在线演示 - [ ] 发布训练与测试数据(许可可用) - [ ] 发布训练代码 ## 🚀 快速开始 ### 环境配置 克隆仓库。 ```bash git clone https://github.com/aigc3d/LHM-plusplus cd LHM-plusplus ``` ```bash # 安装 torch 2.3.0 cuda 12.1 pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121 pip install -U xformers==0.0.26.post1 --index-url https://download.pytorch.org/whl/cu121 # 安装依赖 pip install -r requirements.txt pip install rembg[cpu] # 仅在提取稀疏视角输入时使用 # 安装 pointops cd ./lib/pointops/ && python setup.py install && cd ../../ pip install spconv-cu121 # pip install torch_scatter,请根据 CUDA 版本选择 [wheel](https://data.pyg.org/whl/) # 例如 (PyTorch 2.3 + CUDA 12.1 + Python 3.10): pip install torch_scatter-2.1.2+pt23cu121-cp310-cp310-linux_x86_64.whl # 安装 pytorch3d pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu121_pyt230/download.html # 安装 diff-gaussian-rasterization pip install git+https://github.com/ashawkey/diff-gaussian-rasterization/ # 或 # git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization # pip install ./diff-gaussian-rasterization # 安装 simple-knn pip install git+https://github.com/camenduru/simple-knn/ # 安装 gsplat # 从预编译 [wheel](https://docs.gsplat.studio/whl/gsplat/) 安装 gsplat # 例如 (PyTorch 2.3 + CUDA 12.1 + Python 3.10): # gsplat-1.4.0+pt23cu121-cp310-cp310-linux_x86_64.whl pip install gsplat-1.4.0+pt23cu121-cp310-cp310-linux_x86_64.whl ``` 安装已在 Python 3.10、CUDA 12.1 环境下测试。 如需逐步安装依赖,请参考 [INSTALL_CN.md](INSTALL_CN.md)。 ### 模型权重 #### 一键下载(推荐) 一次下载 assets(motion_video)、先验模型、预训练权重: ```bash # 一键:motion_video + 先验模型 + 预训练权重 python scripts/download_all.py # 跳过已有部分 python scripts/download_all.py --skip-asset --skip-models # 强制重新下载 motion_video python scripts/download_all.py --force-asset ``` #### 预训练模型下载(分步) 使用下载脚本获取先验模型(human_model_files、voxel_grid、arcface 等)及 LHM++ 权重。已存在文件会跳过。优先从 HuggingFace 下载,失败时回退至 ModelScope。 ```bash # 下载先验模型 + 预训练权重(默认) python scripts/download_pretrained_models.py # 仅先验模型 (human_model_files, voxel_grid, BiRefNet 等) python scripts/download_pretrained_models.py --prior # 仅 LHM++ 模型权重 (LHMPP-700M, LHMPP-700MC, LHMPPS-700M) python scripts/download_pretrained_models.py --models # 自定义保存目录 python scripts/download_pretrained_models.py --save-dir /path/to/pretrained_models ``` #### 从 ModelScope 手动下载 ```python from modelscope import snapshot_download # LHMPP-700M(默认模型权重) model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPP-700M', cache_dir='./pretrained_models') # 或: LHMPP-700MC, LHMPPS-700M # model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPP-700MC', cache_dir='./pretrained_models') # model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPPS-700M', cache_dir='./pretrained_models') # LHMPP-Prior(先验模型:human_model_files, voxel_grid, BiRefNet 等) model_dir = snapshot_download(model_id='Damo_XR_Lab/LHMPP-Prior', cache_dir='./pretrained_models') ``` #### 动作视频下载 Gradio 动作示例需要该数据。若项目根目录下 `./motion_video` 不存在,从 [Damo_XR_Lab/LHMPP-Assets](https://www.modelscope.cn/models/Damo_XR_Lab/LHMPP-Assets) 下载(模型,将 motion_video.tar 解压到项目根目录): ```bash # 需要先安装: pip install modelscope python scripts/download_motion_video.py # 自定义父目录(默认: . 即项目根目录) python scripts/download_motion_video.py --save-dir . ``` 下载权重和数据后,项目结构如下: ```bash ├── app.py ├── assets │ ├── efficiency_analysis │ ├── example_aigc_images │ ├── example_multi_images │ └── example_videos ├── benchmark ├── configs │ └── train │ ├── LHMPP-1view.yaml │ ├── LHMPP-any-view.yaml │ ├── LHMPP-any-view-convhead.yaml │ └── LHMPP-any-view-DPTS.yaml ├── core │ ├── datasets │ ├── losses │ ├── models │ ├── modules │ ├── outputs │ ├── runners │ ├── structures │ ├── utils │ └── launch.py ├── dnnlib ├── engine │ ├── BiRefNet │ ├── pose_estimation │ └── ouputs.py ├── exps │ ├── checkpoints │ ├── releases │ └── ... ├── lib │ └── pointops ├── pretrained_models │ ├── dense_sample_points │ ├── gagatracker │ ├── human_model_files │ ├── voxel_grid │ ├── arcface_resnet18.pth │ ├── BiRefNet-general-epoch_244.pth │ ├── Damo_XR_Lab │ └── huggingface ├── scripts │ ├── exp │ ├── inference │ ├── mvs_render │ ├── pose_estimator │ ├── test │ ├── convert_hf.py │ ├── download_all.py │ ├── download_motion_video.py │ ├── download_pretrained_models.py │ └── upload_hub.py ├── tools │ └── metrics ├── train_data │ ├── example_imgs │ └── motion_video ├── motion_video ├── INSTALL.md ├── INSTALL_CN.md ├── README.md ├── README_CN.md └── requirements.txt ``` ### 💻 本地 Gradio 运行 现已支持用户自定义动作序列输入。由于姿态估计需要占用一定 GPU 显存,运行 LHMPP-700M 且使用 8 视角输入时,Gradio 应用至少需要 8 GB 显存。 ```bash ## 快速开始;测试代码 python ./scripts/test/test_app_video.py --input_video ./assets/example_videos/woman.mp4 python ./scripts/test/test_app_case.py # 启动 LHM++ Gradio 应用 python ./app.py --model_name [LHMPP-700M, LHMPPS-700M],默认 LHMPP-700M ``` **运行建议:** 保证输入的图像足够高清,尽量能够看到手部信息,输入中至少有一张图片中身体足够舒展开来。 ## 更多工作 欢迎关注我们团队的其他工作: - [LHM](https://github.com/aigc3d/LHM) - [AniGS](https://github.com/aigc3d/AniGS) ## ✨ Star History [![Star History](https://api.star-history.com/svg?repos=aigc3d/LHM-plusplus)](https://star-history.com/#aigc3d/LHM-plusplus&Date) ## 引用 若本工作对您有帮助,请考虑引用。 **LHM++**(高效大规模人体重建模型,任意图像到 3D): ``` @article{qiu2025lhmpp, title={LHM++: An Efficient Large Human Reconstruction Model for Pose-free Images to 3D}, author={Lingteng Qiu and Peihao Li and Heyuan Li and Qi Zuo and Xiaodong Gu and Yuan Dong and Weihao Yuan and Rui Peng and Siyu Zhu and Xiaoguang Han and Guanying Chen and Zilong Dong}, journal={arXiv preprint arXiv:2503.10625}, year={2025} } ``` **LHM**: ``` @inproceedings{qiu2025LHM, title={LHM: Large Animatable Human Reconstruction Model from a Single Image in Seconds}, author={Lingteng Qiu and Xiaodong Gu and Peihao Li and Qi Zuo and Weichao Shen and Junfei Zhang and Kejie Qiu and Weihao Yuan and Guanying Chen and Zilong Dong and Liefeng Bo}, booktitle={ICCV}, year={2025} } ```