modosaic.services.tolerance¶
modosaic.services.tolerance ¶
ToleranceService ¶
Metrics that compare predicted edges and target boundaries with slack.
compute_boundary_alignment_stats
staticmethod
¶
compute_boundary_alignment_stats(edge_map, boundary_map, tolerance_radius)
Compute precision, recall, F1, and IoU with tolerance dilation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edge_map
|
ndarray
|
Boolean predicted edge map with shape |
required |
boundary_map
|
ndarray
|
Boolean target boundary map with shape |
required |
tolerance_radius
|
int
|
Pixel radius used to dilate maps for precision and recall. |
required |
Returns:
| Type | Description |
|---|---|
BoundaryAlignmentStats
|
Boundary-alignment statistics. |
Source code in modosaic/services/tolerance.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |