You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/autonomousvision/mip-splatting.git
cd mip-splatting/submodules/diff-gaussian-rasterization/
python setup.py install
Update scripts
diff --git a/demo.py b/demo.py
index befdd84..a0543df 100644
--- a/demo.py
+++ b/demo.py
@@ -17,5 +17,9 @@ mask = load_single_mask("notebook/images/shutterstock_stylish_kidsroom_164080656
output = inference(image, mask, seed=42)
# export gaussian splat
-output["gs"].save_ply(f"splat.ply")
-print("Your reconstruction has been saved to splat.ply")
+# output["gs"].save_ply(f"splat.ply")
+# print("Your reconstruction has been saved to splat.ply")
+
+glb = output["glb"] # trimesh object
+glb.export("model.glb") # save mesh w/ vertex colors
+print("Your reconstruction has been saved to model.glb")
\ No newline at end of file
diff --git a/sam3d_objects/pipeline/inference_pipeline.py b/sam3d_objects/pipeline/inference_pipeline.py
index e4b81fe..507b29e 100644
--- a/sam3d_objects/pipeline/inference_pipeline.py
+++ b/sam3d_objects/pipeline/inference_pipeline.py
@@ -546,9 +546,9 @@ class InferencePipeline:
simplify=0.95, # Ratio of triangles to remove in the simplification process
texture_size=1024, # Size of the texture used for the GLB
verbose=False,
- with_mesh_postprocess=with_mesh_postprocess,
- with_texture_baking=with_texture_baking,
- use_vertex_color=use_vertex_color,
+ with_mesh_postprocess=True,
+ with_texture_baking=True,
+ use_vertex_color=False,
rendering_engine=self.rendering_engine,
)
Export a Textured Mesh (*.glb)
Enable conda environment
conda activate sam3d-objects
Check torch cuda version
Install cuda-toolkit
Install nvdiffrast
git clone https://github.com/NVlabs/nvdiffrast.git
Update common_opts with cuda include path
Install diff_gaussian_rasterization
Update scripts
Run demo.py
python demo.py