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

Function hist_info

utils/segmentationMetric.py:155–162  ·  view source on GitHub ↗
(pred, label, num_cls)

Source from the content-addressed store, hash-verified

153
154
155def hist_info(pred, label, num_cls):
156 assert pred.shape == label.shape
157 k = (label >= 0) & (label < num_cls)
158 labeled = np.sum(k)
159 correct = np.sum((pred[k] == label[k]))
160
161 return np.bincount(num_cls * label[k].astype(int) + pred[k], minlength=num_cls ** 2).reshape(num_cls,
162 num_cls), labeled, correct
163
164
165def compute_score(hist, correct, labeled):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected