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,
)
Thank you for your excellent work.
I still don’t fully understand Ubuntu.
I’m trying to set up the environment for an RTX 5070 Ti, but when I try to build PyTorch3D with:
python setup.py install
I get an error saying that the file cannot be found.
Could you tell me where I should place the following files you provided?
Some cd commands were skipped. As for the PyTorch3D installation, the command python setup.py install should be executed under the PyTorch3D project root.
sam3d-objects-single.yml can be put anywhere as it doesn't depend on any project.
requirements.txt and sam3d-objects.yml list all packages for reference purposes, i.e., if some package is missing, they can be referred to.
Thank you very much for your kind response.
I tried it, but it didn’t work.
I feel like I may have made a mistake from the very beginning.
If possible, could you please teach me the steps in a way that even a beginner can understand?
I’m sorry for making such a selfish request
Thank you.
I was struggling with a dependency problem for three days, and it was driving me crazy.
But you saved me in the end. Seriously, thanks a lot—I really appreciate it!
@Lona-arnoa You are welcome! I am glad to hear it helps. My intention for this gist was that I anticipated others might face the same problem, so I posted it.
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