-
Notifications
You must be signed in to change notification settings - Fork 322
Segmentation
There are two text files used in segmentation training *.eseg
(edge segmentation id) and *.seseg
(soft edge segmentation ids). Every mesh should have a corresponding eseg and seseg file with the same name (e.g., 01.obj
has 01.eseg
and 01.eseg
).
eseg files are a list of length #edges
, where each row gives the segmentation class of the edge. For example, the 5th-row contains the ground-truth class id for edge #5. This is used as the training label for the cross-entropy loss.
seseg files is a list with dimensions #edges x #classes
, which is only used to print and compute the test accuracy. For a particular edge (i.e., a row in seseg
), any column/s with values greater than zero defines the number of correct segmentation id/ids.
This allows for each edge to have more than one correct segmentation class, which is useful for boundary edges. For example this black edge:
can have either the pink or yellow label, since it is between both of the segments. Seseg is computed from eseg, by looking at the segmentation ids of the 1-ring neighbors of each edge.
- The (expected) edge order is defined inside the mesh loading script, see mesh_prepare.py for details.
Each mesh is simplified to roughly the same number of edges, then new ground-truth segmentation files for the low resolution meshes (eseg) are generated from the original high resolution segmentation files. The seseg can be generated from the new eseg files.
Since I didn't find the time to clean up the code yet, I am posting a Dropbox Link to the disorganized version of the code which does this.
Basically, you need to run "edge_seg.m" , but also add the folder to your matlab path (i.e., addpath(genpath('path/to/edge_seg'))
Now note that, this function expects 2 inputs (mdir, and edir), and i'm attaching the two directories I used from human_seg so you can run an example:
mdir = '/path/to/meshes'; edir = '/path/to/bl_1500';
and then edge_seg(mdir, edir) should work.