Update val max_dets=args.max_det=300 (#3051)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-06-07 08:17:39 +02:00
committed by GitHub
parent 8ac8ff72ae
commit 3ae81ee9d1
3 changed files with 10 additions and 9 deletions

View File

@ -156,7 +156,7 @@ class PoseValidator(DetectionValidator):
"""Plots predictions for YOLO model."""
pred_kpts = torch.cat([p[:, 6:].view(-1, *self.kpt_shape)[:15] for p in preds], 0)
plot_images(batch['img'],
*output_to_target(preds, max_det=15),
*output_to_target(preds, max_det=self.args.max_det),
kpts=pred_kpts,
paths=batch['im_file'],
fname=self.save_dir / f'val_batch{ni}_pred.jpg',