Include FPs for images with no labels in confusion matrix (#17481)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
3cf467f7f0
commit
7da74600ad
3 changed files with 6 additions and 6 deletions
|
|
@ -155,8 +155,8 @@ class DetectionValidator(BaseValidator):
|
||||||
# Evaluate
|
# Evaluate
|
||||||
if nl:
|
if nl:
|
||||||
stat["tp"] = self._process_batch(predn, bbox, cls)
|
stat["tp"] = self._process_batch(predn, bbox, cls)
|
||||||
if self.args.plots:
|
if self.args.plots:
|
||||||
self.confusion_matrix.process_batch(predn, bbox, cls)
|
self.confusion_matrix.process_batch(predn, bbox, cls)
|
||||||
for k in self.stats.keys():
|
for k in self.stats.keys():
|
||||||
self.stats[k].append(stat[k])
|
self.stats[k].append(stat[k])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,8 +138,8 @@ class PoseValidator(DetectionValidator):
|
||||||
if nl:
|
if nl:
|
||||||
stat["tp"] = self._process_batch(predn, bbox, cls)
|
stat["tp"] = self._process_batch(predn, bbox, cls)
|
||||||
stat["tp_p"] = self._process_batch(predn, bbox, cls, pred_kpts, pbatch["kpts"])
|
stat["tp_p"] = self._process_batch(predn, bbox, cls, pred_kpts, pbatch["kpts"])
|
||||||
if self.args.plots:
|
if self.args.plots:
|
||||||
self.confusion_matrix.process_batch(predn, bbox, cls)
|
self.confusion_matrix.process_batch(predn, bbox, cls)
|
||||||
|
|
||||||
for k in self.stats.keys():
|
for k in self.stats.keys():
|
||||||
self.stats[k].append(stat[k])
|
self.stats[k].append(stat[k])
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,8 @@ class SegmentationValidator(DetectionValidator):
|
||||||
stat["tp_m"] = self._process_batch(
|
stat["tp_m"] = self._process_batch(
|
||||||
predn, bbox, cls, pred_masks, gt_masks, self.args.overlap_mask, masks=True
|
predn, bbox, cls, pred_masks, gt_masks, self.args.overlap_mask, masks=True
|
||||||
)
|
)
|
||||||
if self.args.plots:
|
if self.args.plots:
|
||||||
self.confusion_matrix.process_batch(predn, bbox, cls)
|
self.confusion_matrix.process_batch(predn, bbox, cls)
|
||||||
|
|
||||||
for k in self.stats.keys():
|
for k in self.stats.keys():
|
||||||
self.stats[k].append(stat[k])
|
self.stats[k].append(stat[k])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue