Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I avoid dirty meshes? and mesh size is too small #138

Closed
hanjoonwon opened this issue Feb 13, 2024 · 2 comments
Closed

Can I avoid dirty meshes? and mesh size is too small #138

hanjoonwon opened this issue Feb 13, 2024 · 2 comments

Comments

@hanjoonwon
Copy link

hanjoonwon commented Feb 13, 2024

@Anttwo
First of all, thank you for the work that makes it easier to get a good quality mesh than instant-ngp and a good mesh than sdfstudio.

SUGAR saw that the fg and bg meshes were generated separately and annotated the background to get only the foreground.
But the object I want is on a pedestal, so even if I get only the foreground, the mesh is too dirty where the two meet, and the bottom of the object is not filled properly and is open. How can I improve the quailty?

++ and i want to know how to get real size meshes.. I tried to get the same mesh as the real size and print it with 3d printer but it came out too small unlike the real size.

my images are here https://drive.google.com/drive/folders/1Q9zSM8sCsQ4n-6QKl4GEujuznx-abxvh?usp=drive_link
image
image

@hanjoonwon hanjoonwon changed the title Can I avoid dirty background meshes? Can I avoid dirty meshes? and mesh size is too small Feb 17, 2024
@Anttwo
Copy link
Owner

Anttwo commented Feb 17, 2024

Hello @hanjoonwon,

Thank you for your nice words!

Please see my answer to your other issue for more advice about how to smooth the mesh and avoid holes in the surface (I added such advice to the Tips section of the README.md file). You will get everything you need to make you mesh smoother and avoid some holes.

Also, if you want your foreground to include a larger part of your scene, you have two options:

  1. You can take a small step back and capture your images from further viewpoints (the foreground bounding box is automatically computed as the bounding box of the camera positions). You can also just increase the value of fg_bbox_factor from 1 to 2 at line 40 of sugar_extractors/coarse_mesh.py, this will increase the size of the foreground bounding box.
  2. The other option is to provide a bounding box by yourself. Please see the README.md file and the list of arguments for train.py for more information.

Finally, concerning your scale issues, unfortunately almost all mesh reconstruction algorithms are scale-independant: it does not recover the absolute, real scale of your scene. You need to rescale your object by yourself using a mesh edition software like Blender (wich is 100% free), for example. I'm sorry for that.

Wish you a great day!

@hanjoonwon
Copy link
Author

hanjoonwon commented Feb 18, 2024

Hello @hanjoonwon,

Thank you for your nice words!

Please see my answer to your other issue for more advice about how to smooth the mesh and avoid holes in the surface (I added such advice to the Tips section of the README.md file). You will get everything you need to make you mesh smoother and avoid some holes.

Also, if you want your foreground to include a larger part of your scene, you have two options:

  1. You can take a small step back and capture your images from further viewpoints (the foreground bounding box is automatically computed as the bounding box of the camera positions). You can also just increase the value of fg_bbox_factor from 1 to 2 at line 40 of sugar_extractors/coarse_mesh.py, this will increase the size of the foreground bounding box.
  2. The other option is to provide a bounding box by yourself. Please the README.md file and the list of arguments for train.py for more information.

Finally, concerning your scale issues, unfortunately almost all mesh reconstruction algorithms are scale-independant: it does not recover the absolute, real scale of your scene. You need to rescale your object by yourself using a mesh edition software like Blender (wich is 100% free), for example. I'm sorry for that.

Wish you a great day!

I'm a device engineering major, so I'm still a newbie and lack of knowledge, so I apologize for cluttering it up with some duplicate issues.

I currently have bg generate uncommented to remove it and restore only fg, but if i want to restore only objects and clean up the mess around it, sounds like I can lower the fg_bbox_factor, is that correct?

Even if I know the actual dimensions of the object I want to restore, it's hard to reconstruct it directly. I'll have to try using a tool like meshlab.
Thanks for your kind reply as always and have a nice day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants