/ Модель

Характеристики

Опубликована
10 апр 2024

LN3Diff

Языковая модель

LN3Diff — латентная диффузионная модель, создающая 3D-сетки объектов по текстовым описаниям.

0скачиваний за 30 дней8лайковвеса обновлены19 окт 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

LN3Diff — исследовательская модель генерации 3D-объектов из текстовых описаний, разработанная авторами из Nanyang Technological University, Peking University и Shanghai Artificial Intelligence Laboratory. Это каскад из VAE для представления 3D-сцены и латентной диффузионной модели, которая генерирует 3D-объектную сетку по тексту. Авторы заявляют генерацию за 8 секунд на V100.

Модель предназначена для создания объектов по текстовому запросу на данных Objaverse и ShapeNet, а также генерации лиц на данных FFHQ. Для экспорта сетки требуется около 24 ГиБ видеопамяти; генерация с пакетным размером 4 использует около 16 ГиБ. Репозиторий содержит предварительно обученные контрольные точки и код обучения и инференса; для работы требуются NVIDIA GPU и PyTorch. В метаданных указан формат PyTorch/SafeTensors. Лицензия в предоставленных данных не указана.

Сценарии применения

  • генерация 3D-модели объекта по текстовому запросу
  • создание 3D-ресурсов для прототипов и визуализаций
  • генерация объектов из категорий автомобилей, стульев и самолётов
  • генерация 3D-моделей объектов из Objaverse

Ограничения

Для извлечения сетки требуется около 24 ГиБ видеопамяти, а для запуска необходима NVIDIA GPU. Качество и охват генерации зависят от доступных контрольных точек, обученных на Objaverse, ShapeNet и FFHQ.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

For more visual results, go checkout our project page :page_with_curl:

This repository contains the official implementation of LN3Diff: Scalable Latent Neural Fields Diffusion for Speedy 3D Generation


:mega: Updates

[03/2024] Initial release.

[04/2024] Inference and training codes on Objaverse, ShapeNet and FFHQ are released, including pre-trained model and training dataset.

:dromedary_camel: TODO

  • Release the inference and training code.
  • Release the pre-trained checkpoints of ShapeNet and FFHQ.
  • Release the pre-trained checkpoints of T23D Objaverse model trained with 30K+ instances dataset.
  • Release the stage-1 VAE of Objaverse trained with 80K+ instances dataset.
  • Add Gradio demo.
  • Polish the dataset preparation and training doc.
  • add metrics evaluation scripts and samples.
  • Lint the code.
  • Release the new T23D Objaverse model trained with 80K+ instances dataset.

:handshake: Citation

If you find our work useful for your research, please consider citing the paper:

@misc{lan2024ln3diff,
title={LN3Diff: Scalable Latent Neural Fields Diffusion for Speedy 3D Generation}, 
author={Yushi Lan and Fangzhou Hong and Shuai Yang and Shangchen Zhou and Xuyi Meng and Bo Dai and Xingang Pan and Chen Change Loy},
year={2024},
eprint={2403.12019},
archivePrefix={arXiv},
primaryClass={cs.CV}
}

:desktop_computer: Requirements

NVIDIA GPUs are required for this project. We conduct all the training on NVIDIA V100-32GiB (ShapeNet, FFHQ) and NVIDIA A100-80GiB (Objaverse). We have test the inference codes on NVIDIA V100. We recommend using anaconda to manage the python environments.

The environment can be created via conda env create -f environment_ln3diff.yml, and activated via conda activate ln3diff. If you want to reuse your own PyTorch environment, install the following packages in your environment:

# first, check whether you have installed pytorch (>=2.0) and xformer.
conda install -c conda-forge openexr-python git
pip install openexr lpips imageio kornia opencv-python tensorboard tqdm timm ffmpeg einops beartype imageio[ffmpeg] blobfile ninja lmdb webdataset opencv-python click torchdiffeq transformers
pip install git+https://github.com/nupurkmr9/vision-aided-gan.

:running_woman: Inference

Download Models

The pretrained stage-1 VAE and stage-2 LDM can be downloaded via OneDrive.

Put the downloaded checkpoints under checkpoints folder for inference. The checkpoints directory layout should be

checkpoints
├── ffhq
│         └── model_joint_denoise_rec_model1580000.pt
├── objaverse
│        ├── model_rec1680000.pt
│        └── model_joint_denoise_rec_model2310000.pt
├── shapenet
│        └── car
│                 └── model_joint_denoise_rec_model1580000.pt
│        └── chair
│                 └── model_joint_denoise_rec_model2030000.pt
│        └── plane
│                 └── model_joint_denoise_rec_model770000.pt
└── ...

Inference Commands

Note that to extract the mesh, 24GiB VRAM is required.

Stage-1 VAE 3D reconstruction

For (Objaverse) stage-1 VAE 3D reconstruction and extract VAE latents for diffusion learning, please run

bash shell_scripts/final_release/inference/sample_obajverse.sh

which shall give the following result:

The marching-cube extracted mesh can be visualized with Blender/MeshLab:

We upload the pre-extracted vae latents at here, which contains the correponding VAE latents (with shape 32x32x12) of 76K G-buffer Objaverse objects. Feel free to use them in your own task.

For more G-buffer Objaverse examples, download the demo data.

Stage-2 Text-to-3D

We train 3D latent diffusion model on top of the stage-1 extracted latents. For the following bash inference file, to extract mesh from the generated tri-plane, set --export_mesh True. To change the text prompt, set the prompt variable. For unconditional sampling, set the cfg guidance unconditional_guidance_scale=0. Feel free to tune the cfg guidance scale to trade off diversity and fidelity.

Note that the diffusion sampling batch size is set to 4, which costs around 16GiB VRAM. The mesh extraction of a single instance costs 24GiB VRAM.

For text-to-3D on Objaverse, run

bash shell_scripts/final_release/inference/sample_obajverse.sh

For text-to-3D on ShapeNet, run one of the following commands (which conducts T23D on car, chair and plane.):

bash shell_scripts/final_release/inference/sample_shapenet_car_t23d.sh
bash shell_scripts/final_release/inference/sample_shapenet_chair_t23d.sh
bash shell_scripts/final_release/inference/sample_shapenet_plane_t23d.sh

For text-to-3D on FFHQ, run

bash shell_scripts/final_release/inference/sample_ffhq_t23d.sh

:running_woman: Training

Dataset

For Objaverse, we use the rendering provided by G-buffer Objaverse. A demo subset for stage-1 VAE reconstruction can be downloaded from here. Note that for Objaverse training, we pre-process the raw data into wds-dataset shards for fast and flexible loading. The sample shard data can be found in here.

For ShapeNet, we render our own data with foreground mask for training, which can be downloaded from here. For training, we convert the raw data to LMDB for faster data loading. The pre-processed LMDB file can be downloaded from here.

For FFHQ, we use the pre-processed dataset from EG3D and compress it into LMDB, which can also be found in the onedrive link above.

Training Commands

Coming soon.

:newspaper_roll: License

Distributed under the S-Lab License. See LICENSE for more information.

Contact

If you have any question, please feel free to contact us via lanyushi15@gmail.com or Github issues.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

3D-генерация пока не поддерживается.

Ревизия весов
37a02d7

0 моделей