专栏名称: GitHubStore
分享有意思的开源项目
目录
相关文章推荐
威海交通  ·  数码产品国补“满月” 超2671万名消费者参与 ·  10 小时前  
爱否科技  ·  OPPO Find X8 Ultra ... ·  昨天  
新闻广角  ·  金价,涨了! ·  3 天前  
51好读  ›  专栏  ›  GitHubStore

LGM:生成高质量3D模型

GitHubStore  · 公众号  ·  · 2024-04-30 07:19

正文

项目简介

这是 LGM:用于高分辨率 3D 内容创建的大型多视图高斯模型的官方实现。 支持文字生成模型、图片生成模型,分辨率512*512,5秒内即可生成。


安装

# xformers is required! please refer to https://github.com/facebookresearch/xformers for details.# for example, we use torch 2.1.0 + cuda 11.8pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118pip install -U xformers --index-url https://download.pytorch.org/whl/cu118
# a modified gaussian splatting (+ depth, alpha rendering)git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterizationpip install ./diff-gaussian-rasterization
# for mesh extractionpip install git+https://github.com/NVlabs/nvdiffrast
# other dependenciespip install -r requirements.txt


预训练权重

我们预先训练的重量可以从huggingface下载。

例如,要下载用于推理的 fp16 模型:

mkdir pretrained && cd pretrainedwget https://huggingface.co/ashawkey/LGM/resolve/main/model_fp16_fixrot.safetensorscd ..

对于 MVDream 和 ImageDream,我们使用扩散器实现。他们的权重将自动下载。


推理

推理大约需要 10GB GPU 内存(加载所有 imagedream、mvdream 和我们的 LGM)。

### gradio app for both text/image to 3Dpython app.py big --resume pretrained/model_fp16.safetensors
### test# --workspace: folder to save output (*.ply and *.mp4)# --test_path: path to a folder containing images, or a single imagepython infer.py big --resume pretrained/model_fp16.safetensors --workspace workspace_test --test_path data_test
### local gui to visualize saved plypython gui.py big --output_size 800 --test_path workspace_test/saved.ply
### mesh conversionpython convert.py big --test_path workspace_test/saved.ply

有关更多选项,请查看选项。


训练

注意:由于我们训练中使用的数据集基于 AWS,因此不能直接用于新环境中的训练。我们提供必要的训练代码框架,请检查并修改数据集实现!


我们还提供了 ~80K 的 Objaverse 子集,用于在 objaverse_filter 中训练 LGM。

# debug training






请到「今天看啥」查看全文