Metrics
Module including routines computing metrics.
This module includes the following functions:
abs_error(est_depth, gt_depth)
- Computes the absolute error between an estimated and groun-truth depth map.accuracy_eval(est_ply, gt_ply, mask_th, est_filt=None, gt_filt=None)
- Computes the accuracy of an estimated point cloud against the provided ground-truth.completeness_eval(est_ply, gt_ply, mask_th=20.0, est_filt=None, gt_filt=None)
- Computes the completeness of an estimated point cloud against the provided ground-truth.filter_outlier_points(est_ply, gt_ply, outlier_th)
- Filters out points from an estimated point cloud that are farther than some threshold to the ground-truth point cloud.
abs_error(est_depth, gt_depth)
Computes the absolute error between an estimated and groun-truth depth map.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
est_depth |
np.ndarray
|
Estimated depth map. |
required |
gt_depth |
np.ndarray
|
Ground-truth depth map. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
The absolute error map for the estimated depth map. |
Source code in cvt/metrics.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
accuracy_eval(est_ply, gt_ply, mask_th, est_filt=None, gt_filt=None)
Computes the accuracy of an estimated point cloud against the provided ground-truth.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
est_ply |
np.ndarray
|
Estimated point cloud to be evaluated. |
required |
gt_ply |
np.ndarray
|
Ground-truth point cloud. |
required |
mask_th |
float
|
Masking threshold used to remove points from the evaluation farther than a specified distance value. |
required |
est_filt |
Optional[np.ndarray]
|
Optional filter to remove unwanted point from the estimated point cloud in the evaluation |
None
|
gt_filt |
Optional[np.ndarray]
|
Optional filter to remove unwanted point from the ground-truth point cloud in the evaluation |
None
|
Returns:
Name | Type | Description |
---|---|---|
valid_est_ply |
o3d.geometry.PointCloud
|
Point cloud containing all the valid evaluation points after filtering. |
dists_est |
np.ndarray
|
Estimated distances of all valid points in the estimated point cloud to the closest point in the ground-truth point cloud. |
colors_est |
np.ndarray
|
Estimated colors for the points in the valid point cloud. |
Source code in cvt/metrics.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
completeness_eval(est_ply, gt_ply, mask_th=20.0, est_filt=None, gt_filt=None)
Computes the completeness of an estimated point cloud against the provided ground-truth.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
est_ply |
o3d.geometry.PointCloud
|
Estimated point cloud to be evaluated. |
required |
gt_ply |
o3d.geometry.PointCloud
|
Ground-truth point cloud. |
required |
mask_th |
float
|
Masking threshold used to remove points from the evaluation farther than a specified distance value. |
20.0
|
est_filt |
Optional[np.ndarray]
|
Optional filter to remove unwanted point from the estimated point cloud in the evaluation |
None
|
gt_filt |
Optional[np.ndarray]
|
Optional filter to remove unwanted point from the ground-truth point cloud in the evaluation |
None
|
Returns:
Name | Type | Description |
---|---|---|
ply_points |
np.ndarray
|
Point cloud vertices containing all the valid evaluation points after filtering. |
dists |
np.ndarray
|
Distances of all valid points in the ground-truth point cloud to the closest point in the estimated point cloud. |
colors |
np.ndarray
|
Colors for the points in the valid point cloud. |
Source code in cvt/metrics.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
filter_outlier_points(est_ply, gt_ply, outlier_th)
Filters out points from an estimated point cloud that are farther than some threshold to the ground-truth point cloud.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
est_ply |
o3d.geometry.PointCloud
|
Estimated point cloud to filter. |
required |
gt_ply |
o3d.geometry.PointCloud
|
Ground-truth point cloud for reference. |
required |
outlier_th |
float
|
Distance threshold used for filtering. |
required |
Returns:
Type | Description |
---|---|
o3d.geometry.PointCloud
|
The filtered point cloud. |
Source code in cvt/metrics.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|