Skip to content

Commit

Permalink
Eliminate unused ConfusionMatrix.matrix() method (#10309)
Browse files Browse the repository at this point in the history
* fix bug in confusion_matrix

Signed-off-by: Hu Ye <xiaohuzc@gmail.com>

* Update metrics.py

* Update metrics.py

* Update metrics.py

Signed-off-by: Hu Ye <xiaohuzc@gmail.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
xiaohu2015 and glenn-jocher committed Nov 30, 2022
1 parent 10c025d commit e808f22
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ def process_batch(self, detections, labels):
if not any(m1 == i):
self.matrix[dc, self.nc] += 1 # predicted background

def matrix(self):
return self.matrix

def tp_fp(self):
tp = self.matrix.diagonal() # true positives
fp = self.matrix.sum(1) - tp # false positives
Expand Down

0 comments on commit e808f22

Please sign in to comment.