Skip to content

Mrguanglei/3D_Blender

Repository files navigation

train the E-Mesh

Code License Weight License LRM

HF Models HF Demo

News

Setup

Installation

git clone https://github.com/Mrguanglei/Instantmesh_scriptData.git
cd OpenLRM

Environment

  • Install requirements for OpenLRM first.
    conda create --name Openlrm  python=3.9 -y
    pip install -r requirements.txt
    
  • Please then follow the xFormers installation guide to enable memory efficient attention inside DINOv2 encoder.

Quick Start

Dataset format

|--rendering_random_32views
|--- 1 # object id
| |--- 000.png
| |--- 000_normal.png
| |--- 000_depth.png
| |--- ...
| |--- 031.png
| |--- 031_normal.png
| |--- 031_depth.png
| |--- camera.npz # 
|--- 2 # object id
| |--- 000.png
| |--- 000_normal.png
| |--- 000_depth.png
| |--- ...
| |--- 031.png
| |--- 031_normal.png
| |--- 031_depth.png
| |--- camera.npz #
|--- 3 # object id
| |--- 000.png
| |--- 000_normal.png
| |--- 000_depth.png
| |--- ...
| |--- 031.png
| |--- 031_normal.png
| |--- 031_depth.png
| |--- camera.npz # 
|-- valid_paths.json
|-- ...

valid_paths.json fomerat:

{
  "good_objs":[
      "1",
      "2",
      ...
  ]

}

Downloading the dataset

I took over 200 glb files from the Objaverse dataset and used the glb to render the dataset we needed

1.Downloading the dataset:Dataset address.

2.Place the glb file in the data folder

Modifying the script

  • Find the script that we need to modify scripts/data/objaverse/blender.sh,

    DIRECTORY="/your/path/OpenLRM/data"    #Put the path to the dataset file you downloaded here

Blender:

Run blender.sh .

This will automatically render the dataset we need above.

Tips

  • The recommended PyTorch version is >=2.1. Code is developed and tested under PyTorch 2.1.2.
  • If you encounter CUDA OOM issues, please try to reduce the frame_size in the inference configs.
  • You should be able to see UserWarning: xFormers is available if xFormers is actually working.
  • If there is no module in bpy and mathutils, please look up the information yourself.

Citation

If you find this work useful for your research, please consider citing:

@article{hong2023lrm,
  title={Lrm: Large reconstruction model for single image to 3d},
  author={Hong, Yicong and Zhang, Kai and Gu, Jiuxiang and Bi, Sai and Zhou, Yang and Liu, Difan and Liu, Feng and Sunkavalli, Kalyan and Bui, Trung and Tan, Hao},
  journal={arXiv preprint arXiv:2311.04400},
  year={2023}
}

License

Star History Chart

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors