MCPcopy Create free account
hub / github.com/IRMVLab/SemGauss-SLAM / compute_score

Function compute_score

utils/segmentationMetric.py:165–173  ·  view source on GitHub ↗
(hist, correct, labeled)

Source from the content-addressed store, hash-verified

163
164
165def compute_score(hist, correct, labeled):
166 iu = np.diag(hist) / (hist.sum(1) + hist.sum(0) - np.diag(hist))
167 mean_IU = np.nanmean(iu)
168 mean_IU_no_back = np.nanmean(iu[1:])
169 freq = hist.sum(1) / hist.sum()
170 freq_IU = (iu[freq > 0] * freq[freq > 0]).sum()
171 mean_pixel_acc = correct / labeled
172
173 return iu, mean_IU, mean_IU_no_back, mean_pixel_acc

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected