PQ-NET icon indicating copy to clipboard operation
PQ-NET copied to clipboard

How to split chair legs based on connectivity

Open qiminchen opened this issue 3 years ago • 8 comments

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

qiminchen avatar Apr 16 '21 02:04 qiminchen

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

ChrisWu1997 avatar Apr 16 '21 05:04 ChrisWu1997

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?

qiminchen avatar Apr 17 '21 18:04 qiminchen

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.

ChrisWu1997 avatar Apr 18 '21 01:04 ChrisWu1997

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?

lyxhope avatar Apr 21 '21 14:04 lyxhope

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

ChrisWu1997 avatar Apr 21 '21 14:04 ChrisWu1997

@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?

lyxhope avatar Apr 22 '21 03:04 lyxhope

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.

ChrisWu1997 avatar Apr 22 '21 04:04 ChrisWu1997

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!

lyxhope avatar Apr 22 '21 05:04 lyxhope