Skip to content

Commit

Permalink
dev(MeanIoU): add NOTE in self.add
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-tong committed Sep 13, 2022
1 parent 06d9348 commit 3a03812
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmeval/segmentation/mean_iou.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def add(self, predictions: Sequence, labels: Sequence) -> None: # type: ignore
predictions (Sequence): A batch of outputs from the model.
"""
for prediction, label in zip(predictions, labels):
# NOTE: We need to store the confusion matrix from each sample so
# that we can remove pad samples after all-gather.
cm = self.compute_confusion_matrix(prediction, label,
self.num_classes)
self._results.append(cm)
Expand Down

0 comments on commit 3a03812

Please sign in to comment.