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

How to split chair legs based on connectivity #21

Open
qiminchen opened this issue Apr 16, 2021 · 8 comments
Open

How to split chair legs based on connectivity #21

qiminchen opened this issue Apr 16, 2021 · 8 comments

Comments

@qiminchen
Copy link

Hi thanks for the great work. I am wondering how you split chair legs based on connectivity? Is it possible for you to provide code for this? Thanks

@ChrisWu1997
Copy link
Owner

If you are working on voxels, you can use the function skimage.morphology.lable to find connected components, hence splitting chair legs.

@qiminchen
Copy link
Author

qiminchen commented Apr 17, 2021

thanks for the help, I also noticed from mesh-voxelization that the first step is to scale the raw meshes to lie in [0, H] x [0, W] x [0, D] corresponding to the chosen resolution H x D x W, will this affect the calculation of bounding box of each part in rescale_part_vox.py?

I want to resample the part from PartNet dataset but if I directly voxelize parts of an object, it returns all-zero voxels. If I translate and scale the parts then how should I compute the box parameters? Do the translations and size need to be in the range of (0,64), can they be in the range of (0,1) for custom dataset?

@ChrisWu1997
Copy link
Owner

The the calculation of bounding box of each part in rescale_part_vox.py is independent. The function find_bounding_box computes axis-aligned bounding box on any voxel input.

I don't see any difficulties about computing bounding box parameters on meshes or voxels. You simply need to find the max and the min points. Translations and size can be in the range of (0, 1), if you are transforming original meshes.

@lyxhope
Copy link

lyxhope commented Apr 21, 2021

If you are working on voxels, you can use the function skimage.morphology.lable to find connected components, hence splitting chair legs.

May I ask if there are any tools that can implement the split on mesh instead of voxels?

@ChrisWu1997
Copy link
Owner

@lyxhope You can try this trimesh api: https://trimsh.org/trimesh.html#trimesh.Trimesh.split.

@lyxhope
Copy link

lyxhope commented Apr 22, 2021

@lyxhope You can try this trimesh api: https://trimsh.org/trimesh.html#trimesh.Trimesh.split.

Thanks for your help. I have a further question. In your paper, you said that your split based on the second layer of partnet. So did you specifically split the chair legs based on connectivity? Or you split all parts based on connectivity?

@ChrisWu1997
Copy link
Owner

In your paper, you said that your split based on the second layer of partnet. So did you specifically split the chair legs based on connectivity? Or you split all parts based on connectivity?

We specifically split the chair legs based on connectivity. Other parts are not further split.

@lyxhope
Copy link

lyxhope commented Apr 22, 2021

In your paper, you said that your split based on the second layer of partnet. So did you specifically split the chair legs based on connectivity? Or you split all parts based on connectivity?

We specifically split the chair legs based on connectivity. Other parts are not further split.

Thanks a lot!

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

3 participants