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

Method evaluate_worker

utils/segmentationMetric.py:30–40  ·  view source on GitHub ↗
(self, pred, label)

Source from the content-addressed store, hash-verified

28 """
29
30 def evaluate_worker(self, pred, label):
31 correct, labeled = batch_pix_accuracy(pred, label)
32 inter, union = batch_intersection_union(pred, label, self.nclass)
33
34 self.total_correct += correct
35 self.total_label += labeled
36 if self.total_inter.device != inter.device:
37 self.total_inter = self.total_inter.to(inter.device)
38 self.total_union = self.total_union.to(union.device)
39 self.total_inter += inter
40 self.total_union += union
41
42 if isinstance(preds, torch.Tensor):
43 evaluate_worker(self, preds, labels)

Callers

nothing calls this directly

Calls 2

batch_pix_accuracyFunction · 0.85
batch_intersection_unionFunction · 0.85

Tested by

no test coverage detected