SAR3D

cyw-3d长期未更新

用多尺度 3D VQVAE 把单张图片或文本自回归生成 3D 物体,同时支持 3D 理解,适合做图生 3D 和多模态 3D 研究。

Official repository for "SAR3D: Autoregressive 3D Object Generation and Understanding via Multi-scale 3D VQVAE"

暂无版本202star5fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/cyw-3d/SAR3D.git
cd SAR3D
conda env create -f environment.yml
bash test_image.sh
硬件要求按 README 说明

README 只在 Ubuntu 20.04 上测试过,使用 NVIDIA A6000 和 CUDA 11.7;未说明显存大小,也未说明能否用 CPU 运行。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用多尺度 3D VQVAE 做自回归 3D 物体生成与理解,支持图像和文本条件

用多尺度 3D VQVAE 把单张图片或文本自回归生成 3D 物体,同时支持 3D 理解,适合做图生 3D 和多模态 3D 研究。

核心能力

  • 用多尺度 3D VQVAE 把 3D 物体编码成离散 token
  • 自回归建模生成 3D 物体,README 称生成耗时不到 1 秒
  • 支持图像条件生成,把图片放进 test_images 后运行脚本
  • 支持文本条件生成,在 test_text.json 中填写 prompt
  • 提供 VQVAE 与图像、文本条件模型的训练脚本

容易踩的坑

首次运行会自动下载预训练模型到 checkpoints 目录,也可以从 Hugging Face 手动下载;环境按 Python 3.9.16、PyTorch 2.0.0、CUDA 11.7 测试,版本不匹配可能出问题;训练需要额外下载 Hugging Face 上的 sar3d-dataset 数据集。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Yongwei Chen¹  •  Yushi Lan¹  •  Shangchen Zhou¹  •  Tengfei Wang²  •  Xingang Pan¹

    ¹S-lab, Nanyang Technological University
    ²Shanghai Artificial Intelligence Laboratory

    CVPR 2025

    https://github.com/user-attachments/assets/badac244-f8ee-41c2-8129-b09cf6404b91

    🌟 Features

    • 🔄 Autoregressive Modeling
    • ⚡️ Ultra-fast 3D Generation (<1s)
    • 🔍 Detailed Understanding

    🛠️ Installation & Usage

    Prerequisites

    We've tested SAR3D on the following environment:

    • Python 3.9.16
    • PyTorch 2.0.0
    • CUDA 11.7
    • NVIDIA A6000

    Quick Start

    1. Clone the repository
    git clone https://github.com/cyw-3d/SAR3D.git
    cd SAR3D
    
    1. Set up environment
    conda env create -f environment.yml
    
    1. Download pretrained models 📥

    The pretrained models will be automatically downloaded to the checkpoints folder during first run.

    You can also manually download them from our model zoo:

    ModelDescriptionLink
    VQVAEBase VQVAE modelvqvae-ckpt.pt
    VQVAEFlexicubes VQVAE modelvqvae-flexicubes-ckpt.pt
    GenerationImage-conditioned modelimage-condition-ckpt.pth
    GenerationText-conditioned modeltext-condition-ckpt.pth
    1. Run inference 🚀

    To test the model on your own images:

    1. Place your test images in the test_files/test_images folder
    2. Run the inference script:
    bash test_image.sh
    

    To test the model on your own text prompts:

    1. Place your test prompts in the test_files/test_text.json file
    2. Run the inference script:
    bash test_text.sh
    

    📚 Training

    Dataset

    The dataset is available for download at Hugging Face.

    The dataset consists of 8 splits containing preprocessed data based on G-buffer Objaverse, including:

    • Rendered images
    • Depth maps
    • Camera poses
    • Text descriptions
    • Normal maps
    • Latent embeddings

    The dataset covers over 170K unique 3D objects, augmented to more than 630K data pairs. A data.json file is provided that maps object IDs to their corresponding categories.

    After downloading and unzipping the dataset, you should have the following structure:

    /dataset-root/
    ├── 1/
    ├── 2/
    ├── ...
    ├── 8/
    │   └── 0/
    │       ├── raw_image.png
    │       ├── depth_alpha.jpg
    │       ├── c.npy
    │       ├── caption_3dtopia.txt
    │       ├── normal.png
    │       ├── ...
    │       └── image_dino_embedding_lrm.npy
    └── dataset.json
    

    Training Commands

    The following scripts allow you to train both image-conditioned and text-conditioned models using the dataset stored in the specified <DATA_DIR> location.

    For image-conditioned model training:

    bash train_image.sh <MODEL_DEPTH> <BATCH_SIZE> <GPU_NUM> <VQVAE_PATH> <OUT_DIR> <DATA_DIR>
    

    For text-conditioned model training:

    bash train_text.sh <MODEL_DEPTH> <BATCH_SIZE> <GPU_NUM> <VQVAE_PATH> <OUT_DIR> <DATA_DIR>
    

    For VQVAE training

    bash train_VQVAE.sh <DATA_DIR> <GPU_NUM> <BATCH_SIZE> <OUT_DIR>
    

    📋 Roadmap

    • Inference and Training Code for Image-conditioned Generation
    • Dataset Release
    • Inference Code for Text-conditioned Generation
    • Training Code for Text-conditioned Generation
    • VQVAE training code
    • Code for Understanding

    📝 Citation

    If you find this work useful for your research, please cite our paper:

    @inproceedings{chen2024sar3d,
        title={SAR3D: Autoregressive 3D Object Generation and Understanding via Multi-scale 3D VQVAE},
        author={Chen, Yongwei and Lan, Yushi and Zhou, Shangchen and Wang, Tengfei and Pan, Xingang},
        booktitle={CVPR},
        year={2025}
    }