Display Val images per class (#12645)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
b95b583237
commit
7cd871dbd0
4 changed files with 13 additions and 8 deletions
|
|
@ -81,7 +81,7 @@ class PoseValidator(DetectionValidator):
|
|||
is_pose = self.kpt_shape == [17, 3]
|
||||
nkpt = self.kpt_shape[0]
|
||||
self.sigma = OKS_SIGMA if is_pose else np.ones(nkpt) / nkpt
|
||||
self.stats = dict(tp_p=[], tp=[], conf=[], pred_cls=[], target_cls=[])
|
||||
self.stats = dict(tp_p=[], tp=[], conf=[], pred_cls=[], target_cls=[], target_img=[])
|
||||
|
||||
def _prepare_batch(self, si, batch):
|
||||
"""Prepares a batch for processing by converting keypoints to float and moving to device."""
|
||||
|
|
@ -118,6 +118,7 @@ class PoseValidator(DetectionValidator):
|
|||
cls, bbox = pbatch.pop("cls"), pbatch.pop("bbox")
|
||||
nl = len(cls)
|
||||
stat["target_cls"] = cls
|
||||
stat["target_img"] = cls.unique()
|
||||
if npr == 0:
|
||||
if nl:
|
||||
for k in self.stats.keys():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue