fix bug in the ConfusionMatrix class (#18409)

This commit is contained in:
yuzhj 2024-12-26 21:23:03 +08:00 committed by GitHub
parent 7afec0d89e
commit edf8ba0f17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -372,7 +372,6 @@ class ConfusionMatrix:
else: else:
self.matrix[self.nc, gc] += 1 # true background self.matrix[self.nc, gc] += 1 # true background
if n:
for i, dc in enumerate(detection_classes): for i, dc in enumerate(detection_classes):
if not any(m1 == i): if not any(m1 == i):
self.matrix[dc, self.nc] += 1 # predicted background self.matrix[dc, self.nc] += 1 # predicted background