ranahanocka / MeshCNN

Convolutional Neural Network for 3D meshes in PyTorch
MIT License
1.56k stars 314 forks source link

Importing segmentation labels as vertex groups in Blender #50

Closed LSnyd closed 4 years ago

LSnyd commented 4 years ago

Hi @ranahanocka, I am currently trying to import the .obj files with their corresponding segmentation into Blender. In my first attempt I imported the high resolution Objekt (.Off file) as well as the segmentation labels (.seg) into Blender. After matching the Face labels within the .seg files to their corresponding vertices and grouping them in vertice groups according to their labels, I received a nicely segmented human body.

Now I want to do the same thing with the low resolution object (.obj file) and the edge labels provided in the .eseg file. After matching the edge labels to their corresponding vertices and adding them to different vertex group depending on their label, I am not receiving any good results. The vertices of class head, look like this for example:

image

Do you have any Idea why it did not work with the low resolution object? Seems like the order of the Vertex Indexes do not match with the labels anymore.

LSnyd commented 4 years ago

My bad, I found my mistake! For everyone else struggling with this: When you import an .obj file to Blender, there is an option under geometry where you can flag that it should "keep the vert order". If you active this, the geometry stays the same and it's also possible to see a great segmentation, when importing the labels from the .eseg file.

Peon26 commented 3 years ago

Hi @LSnyd could you please tell me how exactly the segmentation files could be imported in blender? Thank you in advance.

LSnyd commented 3 years ago

Hi @Peon26 sorry for my late reply! I wrote an article on how I performed the manual segmentation in Blender here. I've also provided some helper scripts in my PartSegmentationToolbox that print the segmentation labels onto the object/extract labels from Blender etc. Hope that helps, otherwise let me know!