Commit
·
57535bb
1
Parent(s):
4a295c2
tweak docs
Browse files- hoho/wed.py +4 -4
hoho/wed.py
CHANGED
|
@@ -29,15 +29,15 @@ def preregister_mean_std(verts_to_transform, target_verts, single_scale=True):
|
|
| 29 |
|
| 30 |
|
| 31 |
def compute_WED(pd_vertices, pd_edges, gt_vertices, gt_edges, cv=-1, ce=1.0, normalized=True, preregister=True, single_scale=True):
|
| 32 |
-
'''The function computes the
|
| 33 |
pd_vertices: list of predicted vertices
|
| 34 |
pd_edges: list of predicted edges
|
| 35 |
gt_vertices: list of ground truth vertices
|
| 36 |
gt_edges: list of ground truth edges
|
| 37 |
-
cv: vertex cost
|
| 38 |
-
ce: edge cost
|
| 39 |
normalized: if True, the WED is normalized by the total length of the ground truth edges
|
| 40 |
-
preregister: if True, the predicted vertices
|
| 41 |
'''
|
| 42 |
|
| 43 |
# vertex coordinates are in centimeters, so cv and ce are set to 100.0 and 1.0 respectively.
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
def compute_WED(pd_vertices, pd_edges, gt_vertices, gt_edges, cv=-1, ce=1.0, normalized=True, preregister=True, single_scale=True):
|
| 32 |
+
'''The function computes the Wireframe Edge Distance (WED) between two graphs.
|
| 33 |
pd_vertices: list of predicted vertices
|
| 34 |
pd_edges: list of predicted edges
|
| 35 |
gt_vertices: list of ground truth vertices
|
| 36 |
gt_edges: list of ground truth edges
|
| 37 |
+
cv: vertex cost (the cost in centimeters of missing a vertex, default is -1, which means 1/4 of the diameter of the ground truth mesh)
|
| 38 |
+
ce: edge cost (multiplier of the edge length for edge deletion and insertion, default is 1.0)
|
| 39 |
normalized: if True, the WED is normalized by the total length of the ground truth edges
|
| 40 |
+
preregister: if True, the predicted vertices have their mean and scale matched to the ground truth vertices
|
| 41 |
'''
|
| 42 |
|
| 43 |
# vertex coordinates are in centimeters, so cv and ce are set to 100.0 and 1.0 respectively.
|